:root{
  --primary:#229ed9;
  --primary-dark:#176b99;
  --card-bg:#e9f5fb;
  --muted:#555;
}
body{
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin:0;
  padding:0 1rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-attachment: fixed;
  color:#222;
  min-height:100vh;
  position: relative;
  transition: all 0.5s ease;
}

/* Category-specific backgrounds */
body.crypto-bg {
  background: 
    linear-gradient(135deg, rgba(255, 193, 7, 0.15) 0%, rgba(0, 150, 136, 0.15) 100%),
    radial-gradient(circle at 20% 30%, rgba(255, 193, 7, 0.3) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(0, 188, 212, 0.3) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(255, 152, 0, 0.2) 0%, transparent 60%);
  background-size: 100% 100%, 400px 400px, 300px 300px, 500px 500px;
}

body.gaming-bg {
  background: 
    linear-gradient(135deg, rgba(76, 175, 80, 0.2) 0%, rgba(156, 39, 176, 0.2) 100%),
    radial-gradient(circle at 25% 25%, rgba(0, 255, 0, 0.4) 0%, transparent 30%),
    radial-gradient(circle at 75% 75%, rgba(255, 0, 255, 0.4) 0%, transparent 30%),
    radial-gradient(circle at 50% 80%, rgba(0, 255, 255, 0.3) 0%, transparent 40%);
  background-size: 100% 100%, 200px 200px, 250px 250px, 300px 300px;
}

body.adult-bg {
  background: 
    linear-gradient(135deg, rgba(233, 30, 99, 0.2) 0%, rgba(156, 39, 176, 0.2) 100%),
    radial-gradient(ellipse at 30% 40%, rgba(255, 64, 129, 0.4) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(156, 39, 176, 0.4) 0%, transparent 50%),
    radial-gradient(circle at 50% 20%, rgba(233, 30, 99, 0.3) 0%, transparent 40%);
  background-size: 100% 100%, 300px 400px, 250px 350px, 200px 200px;
}

body.stiri-bg {
  background: 
    linear-gradient(135deg, rgba(96, 125, 139, 0.2) 0%, rgba(69, 90, 100, 0.2) 100%),
    linear-gradient(45deg, rgba(69, 90, 100, 0.1) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(96, 125, 139, 0.1) 25%, transparent 25%),
    repeating-linear-gradient(0deg, transparent, transparent 20px, rgba(69, 90, 100, 0.05) 20px, rgba(69, 90, 100, 0.05) 40px);
  background-size: 100% 100%, 60px 60px, 60px 60px, 100% 100%;
}

body.retete-bg {
  background: 
    linear-gradient(135deg, rgba(255, 152, 0, 0.2) 0%, rgba(255, 193, 7, 0.2) 100%),
    radial-gradient(circle at 20% 80%, rgba(255, 87, 34, 0.4) 0%, transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(255, 193, 7, 0.4) 0%, transparent 30%),
    radial-gradient(circle at 60% 60%, rgba(76, 175, 80, 0.3) 0%, transparent 25%);
  background-size: 100% 100%, 150px 150px, 200px 200px, 100px 100px;
}

body.tehnologie-bg {
  background: 
    linear-gradient(135deg, rgba(0, 188, 212, 0.2) 0%, rgba(63, 81, 181, 0.2) 100%),
    repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0, 188, 212, 0.1) 2px, rgba(0, 188, 212, 0.1) 4px),
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(63, 81, 181, 0.1) 2px, rgba(63, 81, 181, 0.1) 4px),
    radial-gradient(circle at 30% 70%, rgba(0, 188, 212, 0.3) 0%, transparent 40%);
  background-size: 100% 100%, 20px 20px, 20px 20px, 200px 200px;
}

body.promo-bg {
  background: 
    linear-gradient(135deg, rgba(244, 67, 54, 0.2) 0%, rgba(255, 193, 7, 0.2) 100%),
    radial-gradient(circle at 20% 20%, rgba(244, 67, 54, 0.5) 0%, transparent 25%),
    radial-gradient(circle at 80% 80%, rgba(255, 193, 7, 0.5) 0%, transparent 25%),
    radial-gradient(circle at 50% 50%, rgba(255, 87, 34, 0.4) 0%, transparent 30%),
    conic-gradient(from 0deg at 70% 30%, rgba(244, 67, 54, 0.2), rgba(255, 193, 7, 0.2), rgba(244, 67, 54, 0.2));
  background-size: 100% 100%, 100px 100px, 120px 120px, 80px 80px, 300px 300px;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.3) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}
header{
  padding:2rem 0;
  text-align:center;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(20px);
  border-radius: 0 0 30px 30px;
  margin-bottom: 2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}
.header-content{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:1rem;
}
.telegram-logo{ 
  width:50px; 
  height:50px; 
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
  animation: float 3s ease-in-out infinite;
}
header h1{ 
  margin:0; 
  font-size:2rem; 
  font-weight:800;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
header p {
  color: rgba(255,255,255,0.9);
  font-size: 1.1rem;
  margin-top: 0.5rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}
main{ max-width:1100px; margin:0 auto; padding-top:1rem; }

/* auth */
#auth-section{ 
  text-align:center; 
  margin-bottom:2rem; 
}

#register-form, #login-form, #user-info{
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(20px);
  border-radius:20px;
  padding:2rem;
  margin:1rem auto;
  max-width:420px;
  box-shadow: 
    0 8px 32px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  position: relative;
  overflow: hidden;
}

#register-form::before, #login-form::before, #user-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
}

#register-form h2, #login-form h2{
  margin-top:0;
  color:var(--primary-dark);
  font-weight:700;
}
#auth-section input{ 
  padding:0.75rem 1rem; 
  margin:0.5rem; 
  border-radius:12px; 
  border:2px solid #e1e8ed; 
  width:220px; 
  font-size:0.95rem;
  transition: all 0.3s ease;
  background:#fff;
}
#auth-section input:focus{
  outline:none;
  border-color:var(--primary);
  box-shadow: 0 0 0 3px rgba(34,158,217,0.1);
  transform: translateY(-1px);
}
#auth-section button{ 
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color:#fff; 
  border:none; 
  padding:0.75rem 1.5rem; 
  border-radius:12px; 
  cursor:pointer;
  font-weight:600;
  font-size:0.95rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(34,158,217,0.3);
}
#auth-section button:hover{
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(34,158,217,0.4);
}

/* categories */
.categories-menu{ display:flex; flex-wrap:wrap; justify-content:center; gap:0.4rem; margin-top:0.6rem; }
.cat-btn{
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  color:#fff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius:25px;
  padding:0.8rem 1.5rem;
  font-weight:600;
  cursor:pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cat-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.cat-btn:hover::before {
  left: 100%;
}

.cat-btn.active, .cat-btn:hover{ 
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  border-color: rgba(255,255,255,0.5);
}

/* grid for first 6 */
.channels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-bottom: 2rem;
}
@media (max-width: 900px) {
  .channels-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .channels-grid { grid-template-columns: 1fr; }
}

/* card */
.channel-card{
  display:flex;
  gap:1rem;
  align-items:flex-start;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(20px);
  border-radius:20px;
  padding:1.5rem;
  box-shadow: 
    0 8px 32px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,0.3);
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.channel-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 
    0 20px 60px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.4);
}

.channel-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.channel-card:hover::before {
  opacity: 1;
}
.channel-logo{
  width:64px;
  height:64px;
  border-radius:16px;
  object-fit:cover;
  border:3px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.9);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.channel-card:hover .channel-logo {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}
.channel-info{ flex:1; }
.channel-title{ font-weight:700; margin-bottom:0.2rem; }
.channel-desc{ color:var(--muted); font-size:0.95rem; margin-bottom:0.4rem; }
.channel-link{ color:var(--primary); text-decoration:none; font-weight:600; }
.channel-link:hover{ text-decoration:underline; }

/* delete */
.delete-btn{
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color:#fff;
  border:none;
  padding:0.5rem 0.8rem;
  border-radius:8px;
  cursor:pointer;
  margin-left:0.5rem;
  font-size:0.85rem;
  font-weight:600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(231,76,60,0.3);
}
.delete-btn:hover{ 
  background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(231,76,60,0.4);
}

/* add channel section - modern styling */
#add-channel-section{
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(20px);
  border-radius:25px;
  padding:2.5rem;
  margin:2rem auto;
  box-shadow: 
    0 20px 60px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  max-width:650px;
  position: relative;
  overflow: hidden;
}

#add-channel-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

#add-channel-section h2{
  margin-top:0;
  margin-bottom:1.5rem;
  color:var(--primary-dark);
  font-size:1.5rem;
  text-align:center;
  font-weight:700;
}

#add-channel-section input[type="text"],
#add-channel-section input[type="url"]{
  width:100%;
  padding:1rem 1.5rem;
  margin:0.75rem 0;
  border:2px solid rgba(255,255,255,0.3);
  border-radius:15px;
  font-size:1rem;
  transition: all 0.4s ease;
  background: rgba(255,255,255,0.9);
  box-sizing:border-box;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#add-channel-section input[type="text"]:focus,
#add-channel-section input[type="url"]:focus{
  outline:none;
  border-color: #667eea;
  box-shadow: 
    0 0 0 4px rgba(102, 126, 234, 0.2),
    0 10px 25px rgba(102, 126, 234, 0.3);
  transform: translateY(-2px) scale(1.02);
  background: rgba(255,255,255,0.95);
}

#add-channel-section select{
  width:100%;
  padding:0.9rem 1.2rem;
  margin:0.5rem 0;
  border:2px solid #e1e8ed;
  border-radius:12px;
  font-size:0.95rem;
  background:#fff;
  transition: all 0.3s ease;
  box-sizing:border-box;
}

#add-channel-section select:focus{
  outline:none;
  border-color:var(--primary);
  box-shadow: 0 0 0 3px rgba(34,158,217,0.1);
}

#add-channel-section button{
  width:100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color:#fff;
  border:none;
  padding:1.2rem 2rem;
  border-radius:15px;
  cursor:pointer;
  font-weight:700;
  font-size:1.1rem;
  margin-top:1.5rem;
  transition: all 0.4s ease;
  box-shadow: 
    0 10px 30px rgba(102, 126, 234, 0.4),
    inset 0 1px 0 rgba(255,255,255,0.2);
  position: relative;
  overflow: hidden;
}

#add-channel-section button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

#add-channel-section button:hover::before {
  left: 100%;
}

#add-channel-section button:hover{
  transform: translateY(-3px) scale(1.02);
  box-shadow: 
    0 15px 40px rgba(102, 126, 234, 0.5),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

/* add channel hints */
.hint{ 
  font-size:0.85rem; 
  color:var(--muted); 
  margin-top:0.8rem; 
  text-align:center;
  background: rgba(34,158,217,0.05);
  padding:0.8rem;
  border-radius:8px;
  border-left: 4px solid var(--primary);
}

/* Admin Panel Styles */
.admin-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.admin-tab-btn {
  padding: 0.7rem 1.2rem;
  border: none;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
  color: white;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.admin-tab-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.admin-tab-btn.active {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(231,76,60,0.3);
}

.admin-tab-content {
  background: rgba(255,255,255,0.9);
  padding: 1.5rem;
  border-radius: 0.8rem;
  margin-top: 1rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
}

.admin-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.admin-actions button {
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 0.5rem;
  color: white;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.admin-actions button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.admin-channel-item, .admin-user-item {
  background: rgba(255,255,255,0.8);
  padding: 1rem;
  margin-bottom: 0.8rem;
  border-radius: 0.8rem;
  border-left: 4px solid #3498db;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-channel-item.pending {
  border-left-color: #f39c12;
  background: rgba(243,156,18,0.1);
}

.admin-channel-item.rejected {
  border-left-color: #e74c3c;
  background: rgba(231,76,60,0.1);
}

.admin-item-info {
  flex: 1;
}

.admin-item-actions {
  display: flex;
  gap: 0.3rem;
}

.admin-item-actions button {
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 0.4rem;
  color: white;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.admin-item-actions button:hover {
  transform: scale(1.05);
}

.admin-item-actions .approve { background: #27ae60; }
.admin-item-actions .reject { background: #e74c3c; }
.admin-item-actions .edit { background: #3498db; }
.admin-item-actions .delete { background: #e67e22; }
.admin-item-actions .ban { background: #8e44ad; }

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-stat-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1.5rem;
  border-radius: 1rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.admin-stat-card h4 {
  margin: 0 0 0.5rem 0;
  font-size: 2rem;
  font-weight: 700;
}

.admin-stat-card p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.admin-settings label {
  display: block;
  margin-bottom: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.admin-settings input[type="checkbox"] {
  margin-right: 0.5rem;
  transform: scale(1.2);
}

/* Admin Only Stats Section */
.admin-only-stats {
  background: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(20px);
  padding: 3rem 2rem;
  margin-top: 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-only-stats h2 {
  color: #fff;
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.admin-stats-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.admin-stats-overview .admin-stat-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: white;
}

.admin-stats-overview .admin-stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.admin-stats-overview .admin-stat-card h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.admin-stat-number {
  font-size: 1.8rem;
  font-weight: bold;
  color: #ffc107;
  text-shadow: 0 2px 10px rgba(255, 193, 7, 0.3);
  margin: 0;
  line-height: 1.2;
}

/* footer */
footer{ 
  text-align:center; 
  margin-top:2rem; 
  color:#fff; 
  font-size:0.9rem; 
  background: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(20px);
  padding: 2rem;
}
/* Modal styles for admin dialogs */
.modal {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.modal-content {
  background: linear-gradient(135deg,#ffffff 0%, #f7f7f8 100%);
  padding: 1.5rem;
  border-radius: 12px;
  width: 90%;
  max-width: 480px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}
.modal-content input[type="email"], .modal-content input[type="text"], .modal-content input[type="password"] {
  width: 100%;
  padding: 0.65rem 0.8rem;
  margin-top: 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.08);
}

/* Verified badge */
.verified-badge {
  display: inline-block;
  margin-left: 0.5rem;
  background: linear-gradient(135deg,#2ecc71 0%, #27ae60 100%);
  color: white;
  font-size: 0.75rem;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
}