/* ===================================================
   LuumynOS HUB - Dark Modern Theme
   =================================================== */

:root {
  --bg-primary:    #0a0a0a;
  --bg-secondary:  #111111;
  --bg-card:       #1a1a1a;
  --bg-hover:      #222222;
  --bg-input:      #1e1e1e;
  --border:        rgba(255,255,255,0.08);
  --accent:        #ff6b35;
  --accent-hover:  #ff8555;
  --accent-glow:   rgba(255,107,53,0.15);
  --blue:          #3b82f6;
  --green:         #22c55e;
  --red:           #ef4444;
  --yellow:        #f59e0b;
  --purple:        #8b5cf6;
  --text-primary:  #f0f0f0;
  --text-secondary:#a0a0a0;
  --text-muted:    #666666;
  --sidebar-width: 290px;
  --topnav-h:      64px;
  --radius:        10px;
  --radius-lg:     16px;
  --shadow:        0 4px 24px rgba(0,0,0,0.4);
  --transition:    0.2s cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed;
  left: 0; top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-logo {
  padding: 16px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-logo a {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden;
}

.logo-icon {
  width: 34px; height: 34px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.logo-text {
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-nav {
  padding: 12px 0;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 8px;
  margin: 2px 8px;
  transition: all var(--transition);
  position: relative;
}

.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active { background: var(--accent-glow); color: var(--accent); }
.nav-item i { width: 18px; text-align: center; flex-shrink: 0; }

.nav-divider { height: 1px; background: var(--border); margin: 8px 16px; }

.nav-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 6px 24px 4px;
}

.premium-item { color: var(--yellow) !important; }
.admin-item { color: var(--accent) !important; }

.badge-premium {
  margin-left: auto;
  background: linear-gradient(135deg, var(--yellow), #f97316);
  color: #000;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.badge-alert {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

/* ===== MAIN WRAPPER ===== */
.main-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition);
}

/* ===== TOPNAV ===== */
.topnav {
  position: sticky;
  top: 0;
  height: var(--topnav-h);
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  z-index: 90;
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: 8px;
  transition: background var(--transition);
}
.menu-toggle:hover { background: var(--bg-hover); }
.menu-toggle span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

.search-wrap { flex: 1; max-width: 600px; }

.search-form {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  transition: border-color var(--transition);
}
.search-form:focus-within { border-color: var(--accent); }

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 10px 18px;
  font-size: 0.88rem;
  color: var(--text-primary);
  font-family: inherit;
}
.search-input::placeholder { color: var(--text-muted); }

.search-btn {
  padding: 10px 18px;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.search-btn:hover { color: var(--accent); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-upload {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
}
.btn-upload:hover { border-color: var(--accent); color: var(--accent); }

.btn-signin {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.btn-signin:hover { color: var(--text-primary); border-color: var(--text-muted); }

.btn-signup {
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background var(--transition);
}
.btn-signup:hover { background: var(--accent-hover); }

/* ===== NOTIFICATION DROPDOWN ===== */
.notif-wrap {
  position: relative;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: all var(--transition);
}
.notif-wrap:hover { background: var(--bg-hover); color: var(--text-primary); }

.notif-badge {
  position: absolute;
  top: 4px; right: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  z-index: 200;
  overflow: hidden;
}
.notif-dropdown.open { display: block; }

.notif-header {
  padding: 14px 16px;
  font-weight: 600;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.notif-item:hover { background: var(--bg-hover); }
.notif-icon { color: var(--accent); margin-top: 2px; }
.notif-item p { font-size: 0.83rem; margin-bottom: 4px; }
.notif-item small { color: var(--text-muted); font-size: 0.75rem; }
.notif-empty { padding: 20px; text-align: center; color: var(--text-muted); font-size: 0.85rem; }

/* ===== USER MENU ===== */
.user-menu-wrap {
  position: relative;
  cursor: pointer;
}

.user-avatar-sm {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  transition: border-color var(--transition);
}
.user-menu-wrap:hover .user-avatar-sm { border-color: var(--accent); }

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  z-index: 200;
  overflow: hidden;
}
.user-dropdown.open { display: block; }

.user-drop-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.user-drop-header img {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.user-drop-header strong { font-size: 0.88rem; display: block; }
.user-role { font-size: 0.75rem; color: var(--text-muted); }

.user-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.user-dropdown a:hover { background: var(--bg-hover); color: var(--text-primary); }
.user-dropdown a i { width: 16px; }
.upgrade-link { color: var(--yellow) !important; }
.drop-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ===== PAGE CONTENT ===== */
.page-content { flex: 1; padding: 24px; }

/* ===== FLASH MESSAGES ===== */
.flash-msg {
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-weight: 500;
  font-size: 0.88rem;
}

/* ===== VIDEO GRID ===== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.section-link {
  font-size: 0.83rem;
  color: var(--accent);
}
.section-link:hover { text-decoration: underline; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.video-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all var(--transition);
  cursor: pointer;
}
.video-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,107,53,0.3);
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}

.video-thumb-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #0a0a0a;
}
.video-thumb-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}
.video-card:hover .video-thumb-wrap img { transform: scale(1.04); }

.video-duration {
  position: absolute;
  bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.85);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.video-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all var(--transition);
}
.video-card:hover .video-play-overlay {
  background: rgba(0,0,0,0.35);
  opacity: 1;
}
.play-circle {
  width: 52px; height: 52px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
}

.video-info { padding: 14px; }

.video-channel-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.channel-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-top: 2px;
}

.video-meta { flex: 1; min-width: 0; }

.video-title {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
  color: var(--text-primary);
  transition: color var(--transition);
}
.video-card:hover .video-title { color: var(--accent); }

.video-channel {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 3px;
}
.video-channel:hover { color: var(--text-primary); }

.video-stats {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  gap: 6px;
}

/* ===== HERO SECTION ===== */
.hero-section {
  background: linear-gradient(135deg, rgba(255,107,53,0.12) 0%, transparent 60%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,107,53,0.08), transparent 70%);
  pointer-events: none;
}
.hero-title {
  font-family: 'Syne', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.hero-title span { color: var(--accent); }
.hero-sub { color: var(--text-secondary); font-size: 1rem; margin-bottom: 24px; max-width: 560px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 4px 16px rgba(255,107,53,0.35); }

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--text-muted); background: var(--bg-hover); }

.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #dc2626; }

.btn-warning { background: var(--yellow); color: #000; }
.btn-warning:hover { background: #d97706; }

.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #16a34a; }

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

/* ===== FORMS ===== */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 480px;
  margin: 40px auto;
}

.form-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  text-align: center;
}

.form-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 28px;
}

.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}
.form-control:focus { border-color: var(--accent); }
.form-control::placeholder { color: var(--text-muted); }

textarea.form-control { resize: vertical; min-height: 100px; }

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: 0.78rem; color: var(--red); margin-top: 5px; }

.form-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.form-footer a { color: var(--accent); }

/* ===== VIDEO PLAYER PAGE ===== */
.watch-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}

.video-player-wrap {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
  position: relative;
}

.video-player-wrap video {
  width: 100%; height: 100%;
  display: block;
}

.video-details { margin-top: 20px; }

.video-page-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

.video-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.video-views-time { font-size: 0.85rem; color: var(--text-secondary); }

.video-btns { display: flex; gap: 8px; }

.btn-like, .btn-dislike, .btn-share, .btn-save, .btn-download {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  font-family: inherit;
}
.btn-like:hover { border-color: var(--green); color: var(--green); }
.btn-dislike:hover { border-color: var(--red); color: var(--red); }
.btn-like.active { background: rgba(34,197,94,0.12); border-color: var(--green); color: var(--green); }
.btn-dislike.active { background: rgba(239,68,68,0.12); border-color: var(--red); color: var(--red); }
.btn-download:hover { border-color: var(--accent); color: var(--accent); }

.channel-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  gap: 12px;
}

.channel-info-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.channel-avatar-lg {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.channel-name { font-weight: 600; font-size: 0.95rem; display: block; }
.channel-subs { font-size: 0.8rem; color: var(--text-secondary); }

.btn-subscribe {
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
  border-radius: 24px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.btn-subscribe:hover { background: var(--accent-hover); }
.btn-subscribe.subscribed {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.video-description-box {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  font-size: 0.87rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 24px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Comments */
.comments-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.comment-form { margin-bottom: 24px; display: flex; gap: 12px; align-items: flex-start; }
.comment-form img { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; margin-top: 2px; }
.comment-form-inner { flex: 1; }
.comment-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.87rem;
  outline: none;
  resize: none;
  transition: border-color var(--transition);
}
.comment-input:focus { border-color: var(--accent); }
.comment-form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

.comment-item {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.comment-item img { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.comment-body { flex: 1; }
.comment-author { font-weight: 600; font-size: 0.85rem; margin-right: 8px; }
.comment-time { font-size: 0.77rem; color: var(--text-muted); }
.comment-text { font-size: 0.87rem; margin: 6px 0; line-height: 1.6; }
.comment-actions { display: flex; gap: 12px; font-size: 0.78rem; color: var(--text-muted); }
.comment-actions button { color: var(--text-muted); font-size: 0.78rem; font-family: inherit; }
.comment-actions button:hover { color: var(--text-primary); }

/* Sidebar panel */
.sidebar-panel { }
.sidebar-panel-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 14px; }
.sidebar-video-list { display: flex; flex-direction: column; gap: 12px; }
.sidebar-video-item { display: flex; gap: 10px; }
.sidebar-video-item:hover .sidebar-video-title { color: var(--accent); }
.sidebar-thumb {
  width: 120px; height: 68px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--bg-card);
}
.sidebar-video-info { flex: 1; min-width: 0; }
.sidebar-video-title { font-size: 0.83rem; font-weight: 600; line-height: 1.3; margin-bottom: 4px; transition: color var(--transition); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sidebar-video-ch { font-size: 0.76rem; color: var(--text-secondary); }
.sidebar-video-stats { font-size: 0.75rem; color: var(--text-muted); }

/* ===== UPLOAD PAGE ===== */
.upload-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 700px;
  margin: 0 auto;
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 50px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  margin-bottom: 24px;
}
.dropzone:hover, .dropzone.drag-over {
  border-color: var(--accent);
  background: var(--accent-glow);
}
.dropzone-icon { font-size: 3rem; color: var(--accent); margin-bottom: 12px; }
.dropzone-text { font-weight: 600; font-size: 1rem; margin-bottom: 6px; }
.dropzone-sub { color: var(--text-muted); font-size: 0.83rem; }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

.progress-bar-wrap {
  background: var(--bg-input);
  border-radius: 8px;
  overflow: hidden;
  height: 8px;
  margin-top: 12px;
}
.progress-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 8px;
  transition: width 0.3s ease;
  width: 0;
}

/* ===== CHANNEL PAGE ===== */
.channel-banner {
  height: 180px;
  background: linear-gradient(135deg, rgba(255,107,53,0.2) 0%, rgba(59,130,246,0.1) 100%);
  border-radius: var(--radius-lg);
  margin-bottom: -50px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.channel-banner img { width: 100%; height: 100%; object-fit: cover; }

.channel-profile-row {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  padding: 0 24px;
  margin-bottom: 24px;
  position: relative;
}

.channel-profile-avatar {
  width: 100px; height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-primary);
  background: var(--bg-card);
}

.channel-profile-info { flex: 1; padding-bottom: 8px; }
.channel-profile-name { font-family: 'Syne', sans-serif; font-size: 1.5rem; font-weight: 700; }
.channel-profile-stats { color: var(--text-secondary); font-size: 0.88rem; margin-top: 4px; }

/* ===== MEMBERSHIP PAGE ===== */
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 440px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.pricing-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
}
.pricing-badge {
  display: inline-block;
  background: var(--accent-glow);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 16px;
  border: 1px solid rgba(255,107,53,0.3);
}
.pricing-price {
  font-family: 'Syne', sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.pricing-price sup { font-size: 1.5rem; vertical-align: super; }
.pricing-period { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 28px; }
.pricing-features { text-align: left; margin-bottom: 28px; }
.pricing-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.pricing-feature:last-child { border: none; }
.pricing-feature .check { color: var(--green); }
.pricing-feature .cross { color: var(--red); }

/* ===== GAMES PAGE ===== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(255,107,53,0.15);
}
.game-icon { font-size: 3rem; margin-bottom: 12px; }
.game-name { font-weight: 700; font-size: 1rem; margin-bottom: 6px; }
.game-desc { font-size: 0.8rem; color: var(--text-secondary); }

/* ===== STATS CARDS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.stat-label { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 8px; }
.stat-value { font-family: 'Syne', sans-serif; font-size: 1.8rem; font-weight: 700; }
.stat-accent { color: var(--accent); }
.stat-green { color: var(--green); }
.stat-blue { color: var(--blue); }
.stat-yellow { color: var(--yellow); }

/* ===== TABS ===== */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.tab-btn {
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 8px 8px 0 0;
  transition: all var(--transition);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ===== BADGE ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-green { background: rgba(34,197,94,0.15); color: var(--green); }
.badge-red { background: rgba(239,68,68,0.15); color: var(--red); }
.badge-yellow { background: rgba(245,158,11,0.15); color: var(--yellow); }
.badge-blue { background: rgba(59,130,246,0.15); color: var(--blue); }
.badge-gray { background: var(--bg-hover); color: var(--text-secondary); }

/* ===== TABLE ===== */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 14px 16px;
  font-size: 0.87rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:hover td { background: var(--bg-hover); }
.data-table tr:last-child td { border-bottom: none; }

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
}
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { font-size: 0.82rem; color: var(--text-secondary); }
.footer-links a:hover { color: var(--accent); }
.footer-copy { font-size: 0.78rem; color: var(--text-muted); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .watch-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }
  .sidebar { transform: translateX(-240px); width: 240px; }
  .sidebar.open { transform: translateX(0); }
  .main-wrapper { margin-left: 0; }
  .page-content { padding: 16px; }
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .hero-title { font-size: 1.5rem; }
  .btn-upload span { display: none; }
}

@media (max-width: 480px) {
  .video-grid { grid-template-columns: 1fr; }
  .form-card { padding: 20px; margin: 20px 16px; }
  .topnav { gap: 10px; padding: 0 12px; }
  .search-input { font-size: 0.85rem; }
  .btn-signup { display: none; }
}

/* ===== PREMIUM LOCKED OVERLAY ===== */
.locked-overlay {
  position: relative;
}
.locked-overlay::after {
  content: '🔒 Premium Only';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--yellow);
  border-radius: var(--radius);
  backdrop-filter: blur(2px);
  font-size: 0.9rem;
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 24px 0;
}
.page-btn {
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 480px;
  width: 90%;
  box-shadow: var(--shadow);
}
.modal-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ===== LOADING ===== */
.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== LIGHT MODE THEME ===== */
[data-theme="light"] {
  --bg-primary:    #f5f5f5;
  --bg-secondary:  #ffffff;
  --bg-card:       #ffffff;
  --bg-hover:      #f0f0f0;
  --bg-input:      #f8f8f8;
  --border:        rgba(0,0,0,0.1);
  --text-primary:  #111111;
  --text-secondary:#444444;
  --text-muted:    #888888;
  --accent:        #ff6b35;
  --accent-hover:  #ff8555;
  --accent-glow:   rgba(255,107,53,0.1);
}
[data-theme="light"] body { background:#f5f5f5; color:#111; }
[data-theme="light"] .topnav { background:rgba(255,255,255,0.95); }
[data-theme="light"] .sidebar { background:#ffffff; border-right:1px solid rgba(0,0,0,0.08); }
[data-theme="light"] .video-card { background:#fff; box-shadow:0 2px 8px rgba(0,0,0,0.06); }
[data-theme="light"] .form-control,
[data-theme="light"] .form-card,
[data-theme="light"] .search-form { background:#fff; border-color:rgba(0,0,0,0.12); }
[data-theme="light"] .video-description-box { background:#f8f8f8; }

/* ===== THEME TOGGLE BUTTON ===== */
.theme-toggle {
  padding:7px;
  border-radius:8px;
  color:var(--text-secondary);
  background:none;
  border:1px solid var(--border);
  cursor:pointer;
  font-size:0.95rem;
  transition:all var(--transition);
  display:flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
}
.theme-toggle:hover { background:var(--bg-hover); color:var(--accent); border-color:var(--accent); }

/* ===== UPLOAD PROGRESS ===== */
.progress-bar-wrap {
  background:var(--bg-input);
  border-radius:8px;
  overflow:hidden;
  height:10px;
  margin-top:10px;
}
.progress-bar-inner {
  height:100%;
  background:linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius:8px;
  transition:width 0.3s ease;
  width:0%;
  position:relative;
  overflow:hidden;
}
.progress-bar-inner::after {
  content:'';
  position:absolute;
  top:0; left:-100%;
  width:100%; height:100%;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation:shimmer 1.5s infinite;
}
@keyframes shimmer { to { left:100%; } }

/* ===== COMMENT LIKES ===== */
.comment-like-btn {
  display:inline-flex; align-items:center; gap:4px;
  font-size:0.77rem; color:var(--text-muted);
  background:none; border:none; cursor:pointer;
  font-family:inherit; padding:3px 7px; border-radius:4px;
  transition:all 0.15s;
}
.comment-like-btn:hover { background:var(--bg-hover); color:var(--text-primary); }
.comment-like-btn.liked { color:var(--accent); }

/* ===== PLAYLIST ===== */
.playlist-dropdown { position:relative; display:inline-block; }
.playlist-menu {
  display:none; position:absolute; right:0; top:calc(100%+6px);
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius); box-shadow:var(--shadow); z-index:200;
  min-width:220px; overflow:hidden;
}
.playlist-menu.open { display:block; }
.btn-save {
  display:flex; align-items:center; gap:6px;
  padding:8px 14px; background:var(--bg-card);
  border:1px solid var(--border); color:var(--text-secondary);
  border-radius:8px; font-size:0.83rem; font-weight:500;
  cursor:pointer; font-family:inherit; transition:all var(--transition);
}
.btn-save:hover { border-color:var(--accent); color:var(--accent); }

/* ===== LOGO IMAGE ===== */
.logo-img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}
