/* ══════════════════════════════════════════════════════════════
   THE CHAIRMAN SHOW — Dual Theme (Light + Dark) + Smooth
   ══════════════════════════════════════════════════════════════ */

/* ═══ DARK THEME (default) ═══ */
:root,
[data-theme="dark"] {
  --gold-primary: #D4AF37;
  --gold-light: #F4D03F;
  --gold-dark: #B8860B;
  --gold-glow: rgba(212, 175, 55, 0.4);
  --gold-soft: rgba(212, 175, 55, 0.12);

  --bg-base: #0a0a0f;
  --bg-surface: #101015;
  --bg-surface-2: #16161d;
  --bg-surface-3: #1c1c26;
  --bg-elevated: #202028;
  --bg-glass: rgba(255,255,255,.03);
  --bg-glass-hover: rgba(255,255,255,.06);

  --accent-cyan: #00d4ff;
  --accent-purple: #7c3aed;
  --accent-pink: #ec4899;
  --accent-green: #10b981;
  --accent-orange: #f59e0b;
  --accent-red: #ef4444;

  --text-primary: #f4f4f7;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --text-dim: #4b5563;

  --border-soft: rgba(255,255,255,.06);
  --border-mid: rgba(255,255,255,.1);
  --border-gold: rgba(212,175,55,.4);

  --shadow-sm: 0 2px 8px rgba(0,0,0,.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,.5);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.6);
  --shadow-gold: 0 0 40px rgba(212,175,55,.3);
}

/* ═══ LIGHT THEME ═══ */
[data-theme="light"] {
  --gold-primary: #B8860B;
  --gold-light: #D4AF37;
  --gold-dark: #8B6914;
  --gold-glow: rgba(184, 134, 11, 0.3);
  --gold-soft: rgba(184, 134, 11, 0.1);

  --bg-base: #f8f9fc;
  --bg-surface: #ffffff;
  --bg-surface-2: #f1f3f8;
  --bg-surface-3: #e8ebf2;
  --bg-elevated: #ffffff;
  --bg-glass: rgba(255,255,255,.7);
  --bg-glass-hover: rgba(255,255,255,.9);

  --accent-cyan: #0284c7;
  --accent-purple: #7c3aed;
  --accent-pink: #db2777;
  --accent-green: #059669;
  --accent-orange: #d97706;
  --accent-red: #dc2626;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  --border-soft: rgba(0,0,0,.08);
  --border-mid: rgba(0,0,0,.12);
  --border-gold: rgba(184,134,11,.4);

  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,.08);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.12);
  --shadow-gold: 0 0 40px rgba(184,134,11,.15);
}

/* ═══ FONTS + RADIUS ═══ */
:root {
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-royal: 'Cinzel', serif;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-full: 9999px;

  --t-fast: .15s cubic-bezier(.4,0,.2,1);
  --t-mid: .28s cubic-bezier(.4,0,.2,1);
  --t-slow: .45s cubic-bezier(.16,1,.3,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-primary) transparent;
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  transition: background .4s cubic-bezier(.16,1,.3,1),
              color .4s cubic-bezier(.16,1,.3,1);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 20%, var(--gold-soft) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(124,58,237,.06) 0%, transparent 45%);
  pointer-events: none;
  z-index: 0;
  transition: opacity .5s ease;
}

[data-theme="light"] body::before { opacity: .5; }

#particlesCanvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .6;
}

[data-theme="light"] #particlesCanvas { opacity: .3; }

/* ═══ SCROLLBAR ═══ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold-primary), var(--gold-dark));
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--gold-light), var(--gold-primary));
  background-clip: content-box;
  border: 2px solid transparent;
}

::selection { background: var(--gold-primary); color: #000; }

/* ══════════════════════════════════════════════════════════════
   KEYFRAMES
   ══════════════════════════════════════════════════════════════ */
@keyframes goldShimmer {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
@keyframes crownFloat {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-12px) rotate(3deg); }
}
@keyframes pulseGlow {
  0%, 100% { opacity: .6; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}
@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.1); }
  66% { transform: translate(-30px, 30px) scale(.9); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeIn { to { opacity: 1; } }
@keyframes popIn {
  0% { transform: scale(0); }
  80% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: none; }
}
@keyframes titleSlideIn {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: none; }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: none; }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(40px); }
}
@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.15); }
  30% { transform: scale(1); }
  45% { transform: scale(1.1); }
  60% { transform: scale(1); }
}
@keyframes badgeGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(212,175,55,0); }
  50% { box-shadow: 0 0 30px rgba(212,175,55,.3); }
}
@keyframes bootLineIn { to { opacity: 1; } }
@keyframes bootFill { to { width: 100%; } }
@keyframes loginCardIn {
  from { opacity: 0; transform: translateY(40px) scale(.95); }
  to { opacity: 1; transform: none; }
}
@keyframes logoEntrance {
  from { opacity: 0; transform: scale(.8); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes featIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes tBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30% { transform: translateY(-4px); opacity: 1; }
}
@keyframes dotBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30% { transform: translateY(-6px); opacity: 1; }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ══════════════════════════════════════════════════════════════
   BOOT LOADER
   ══════════════════════════════════════════════════════════════ */
#bootLoader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(ellipse at center, var(--bg-surface) 0%, var(--bg-base) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .6s, visibility .6s;
}
#bootLoader.hide { opacity: 0; visibility: hidden; pointer-events: none; }

.boot-content { text-align: center; padding: 2rem; }
.boot-crown {
  font-size: 3.5rem;
  color: var(--gold-primary);
  margin-bottom: 1rem;
  animation: crownFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 0 30px var(--gold-glow));
}
.boot-logo-text {
  font-family: var(--font-royal);
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 4px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary), var(--gold-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: goldShimmer 3s linear infinite;
  margin-bottom: 2rem;
}
.boot-terminal {
  width: min(440px, 90vw);
  font-family: var(--font-mono);
  font-size: .88rem;
  padding: 1.5rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  backdrop-filter: blur(20px);
  text-align: left;
  margin: 0 auto;
}
.boot-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: .5rem;
  opacity: 0;
  animation: bootLineIn .5s cubic-bezier(.16,1,.3,1) forwards;
}
.boot-line:nth-child(1) { animation-delay: 0s; }
.boot-line:nth-child(2) { animation-delay: .35s; }
.boot-line:nth-child(3) { animation-delay: .75s; }
.boot-line:nth-child(4) { animation-delay: 1.15s; }
.boot-prompt { color: var(--gold-primary); font-weight: 700; }
.boot-cmd { color: var(--text-secondary); }
.boot-name { color: var(--gold-light); font-weight: 700; }
.boot-ok { color: var(--accent-green); font-weight: 700; }
.boot-bar {
  margin-top: 1.2rem;
  height: 3px;
  background: var(--border-soft);
  border-radius: 2px;
  overflow: hidden;
}
.boot-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold-primary), var(--gold-light), var(--gold-primary));
  background-size: 200% auto;
  border-radius: 2px;
  animation: bootFill 2s cubic-bezier(.4,0,.2,1) forwards, goldShimmer 2s linear infinite;
  box-shadow: 0 0 12px var(--gold-glow);
}
.boot-cursor {
  color: var(--gold-primary);
  animation: blink 1s infinite;
  font-size: 1rem;
  margin-top: 1rem;
  display: inline-block;
}

/* ══════════════════════════════════════════════════════════════
   LOGIN SCREEN
   ══════════════════════════════════════════════════════════════ */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, var(--bg-surface) 0%, var(--bg-base) 100%);
  padding: 20px;
  overflow-y: auto;
}
.login-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--gold-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--gold-soft) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  pointer-events: none;
}
.login-glow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 700px; height: 700px;
  background: radial-gradient(circle, var(--gold-soft) 0%, transparent 60%);
  filter: blur(50px);
  pointer-events: none;
  animation: pulseGlow 6s ease-in-out infinite;
}
.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.login-orb-1 {
  top: 10%; left: 5%;
  width: 300px; height: 300px;
  background: rgba(124,58,237,.15);
  animation: floatOrb 15s ease-in-out infinite;
}
.login-orb-2 {
  bottom: 10%; right: 5%;
  width: 350px; height: 350px;
  background: rgba(0,212,255,.12);
  animation: floatOrb 15s ease-in-out infinite reverse;
}
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: var(--bg-glass);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-xl);
  padding: 44px 36px;
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  animation: loginCardIn .8s cubic-bezier(.16,1,.3,1);
}
.css-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.2rem;
  animation: logoEntrance 1s cubic-bezier(.16,1,.3,1);
}
.logo-crown {
  color: var(--gold-primary);
  font-size: 1.8rem;
  margin-bottom: -6px;
  filter: drop-shadow(0 0 20px var(--gold-glow));
  animation: crownFloat 4s ease-in-out infinite;
}
.logo-chair { width: 46px; height: 40px; position: relative; }
.chair-back {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 32px; height: 28px;
  background: var(--gold-primary);
  border-radius: 4px 4px 0 0;
  box-shadow: 0 0 20px var(--gold-glow);
}
.chair-seat {
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 46px; height: 12px;
  background: var(--gold-primary);
  border-radius: 3px;
  box-shadow: 0 0 20px var(--gold-glow);
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo h1 {
  font-family: var(--font-royal);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 3px;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.login-logo h1 span {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary), var(--gold-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: goldShimmer 3s linear infinite;
}
.login-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}
.login-divider .line {
  width: 40px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-primary));
}
.login-divider .line:last-child {
  background: linear-gradient(90deg, var(--gold-primary), transparent);
}
.login-divider .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-glow);
}
.login-tagline {
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--text-muted);
}
.terminal-text { color: var(--text-secondary); }
.blink { color: var(--gold-primary); animation: blink 1s infinite; }

.login-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 28px;
}
.login-feat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  font-size: .82rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: var(--t-mid);
  opacity: 0;
  animation: featIn .5s cubic-bezier(.16,1,.3,1) forwards;
}
.login-feat:nth-child(1) { animation-delay: .2s; }
.login-feat:nth-child(2) { animation-delay: .3s; }
.login-feat:nth-child(3) { animation-delay: .4s; }
.login-feat:nth-child(4) { animation-delay: .5s; }
.login-feat:hover {
  background: var(--gold-soft);
  border-color: var(--border-gold);
  color: var(--text-primary);
  transform: translateY(-2px);
}
.login-feat i {
  color: var(--gold-primary);
  font-size: 1rem;
  width: 18px;
  text-align: center;
}
.google-btn {
  width: 100%;
  padding: 14px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.1);
  border-radius: var(--r-md);
  color: #1a1a1a;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: var(--t-mid);
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.google-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,0,0,.15), var(--shadow-gold);
}
.login-terms {
  text-align: center;
  font-size: .74rem;
  color: var(--text-dim);
  margin-top: 18px;
  font-family: var(--font-mono);
}
.login-error {
  display: none;
  color: #fca5a5;
  font-size: .84rem;
  text-align: center;
  margin-top: 12px;
  padding: 10px;
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.25);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
}

/* ══════════════════════════════════════════════════════════════
   HEADER / NAVBAR
   ══════════════════════════════════════════════════════════════ */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border-soft);
  transition: var(--t-mid);
}
.nav-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: .8rem 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  white-space: nowrap;
  transition: var(--t-mid);
}
.logo:hover { transform: translateY(-1px); }
.logo-mini {
  position: relative;
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--bg-surface-2);
  border: 1.5px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--gold-soft);
  transition: var(--t-mid);
}
.logo:hover .logo-mini {
  box-shadow: 0 0 30px var(--gold-glow);
  transform: scale(1.05);
}
.logo-crown-mini {
  position: absolute;
  top: -8px;
  font-size: .8rem;
  color: var(--gold-primary);
  filter: drop-shadow(0 0 8px var(--gold-glow));
}
.logo-text-mini {
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: .95rem;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
  margin-top: 4px;
}
.logo-brand { display: flex; flex-direction: column; line-height: 1; }
.logo-brand-the {
  font-family: var(--font-royal);
  font-size: .55rem;
  letter-spacing: 3px;
  color: var(--gold-primary);
  font-weight: 700;
  margin-bottom: 2px;
}
.logo-brand-main {
  font-family: var(--font-royal);
  font-size: .92rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: var(--text-primary);
}
.logo-brand-main em {
  font-style: normal;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* NAV LINKS */
.nav-links {
  display: flex;
  list-style: none;
  gap: .2rem;
  flex-wrap: wrap;
}
.nav-item {
  padding: .55rem .9rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-full);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: var(--t-mid);
  position: relative;
}
.nav-item i { font-size: .85rem; }
.nav-item:hover {
  color: var(--text-primary);
  background: var(--bg-glass-hover);
  border-color: var(--border-soft);
}
.nav-item.active {
  background: var(--gold-soft);
  color: var(--gold-primary);
  border-color: var(--border-gold);
}
.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 2px;
  background: var(--gold-primary);
  border-radius: 2px;
  box-shadow: 0 0 12px var(--gold-glow);
}
.nav-badge-cine {
  position: absolute;
  top: -3px; right: -3px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  background: var(--accent-red);
  color: #fff;
  border-radius: var(--r-full);
  font-size: .62rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-base);
  animation: popIn .3s ease;
}

/* NAV ACTIONS */
.nav-actions {
  display: flex;
  align-items: center;
  gap: .6rem;
}

/* THEME TOGGLE */
.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--t-mid);
  position: relative;
  overflow: hidden;
}
.theme-toggle:hover {
  border-color: var(--border-gold);
  color: var(--gold-primary);
  transform: rotate(20deg) scale(1.05);
  box-shadow: 0 0 20px var(--gold-soft);
}
[data-theme="light"] .theme-toggle {
  background: rgba(0,0,0,.04);
}

/* USER MENU */
.user-menu { position: relative; }
.user-avatar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  background: var(--bg-glass);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-full);
  color: var(--text-primary);
  font-family: inherit;
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--t-mid);
}
.user-avatar-btn:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-gold);
  box-shadow: 0 0 20px var(--gold-soft);
}
.user-avatar-btn img {
  width: 30px; height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-primary);
}
.user-avatar-btn i { font-size: .7rem; color: var(--text-muted); }
.user-name-nav {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 260px;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg), 0 0 30px var(--gold-soft);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--t-mid);
  z-index: 1100;
}
.user-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.dropdown-header {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-soft);
}
.dropdown-header img {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid var(--gold-primary);
}
.dd-name { font-weight: 700; font-size: .9rem; }
.dd-email { font-size: .75rem; color: var(--text-muted); }
.dropdown-divider { height: 1px; background: var(--border-soft); margin: 4px 0; }
.dropdown-item {
  width: 100%;
  padding: 11px 16px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: .85rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--t-fast);
}
.dropdown-item:hover {
  background: var(--gold-soft);
  color: var(--gold-primary);
}
.dropdown-item i { width: 16px; color: var(--text-muted); font-size: .85rem; }
.dropdown-item.danger { color: #ef4444; }
.dropdown-item.danger i { color: var(--accent-red); }
.dropdown-item.danger:hover { background: rgba(239,68,68,.08); }

/* ══════════════════════════════════════════════════════════════
   UNIVERSAL BACK BUTTON
   ══════════════════════════════════════════════════════════════ */
.universal-back-btn {
  position: fixed;
  top: 90px;
  left: 20px;
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: .6rem 1.1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-full);
  color: var(--gold-primary);
  font-family: inherit;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--t-mid);
  box-shadow: var(--shadow-md);
}
.universal-back-btn:hover {
  background: var(--gold-soft);
  transform: translateX(-4px);
  box-shadow: 0 0 25px var(--gold-glow);
}

/* ══════════════════════════════════════════════════════════════
   MAIN LAYOUT
   ══════════════════════════════════════════════════════════════ */
main {
  flex: 1;
  max-width: 1440px;
  width: 100%;
  margin: 96px auto 40px;
  padding: 0 1.6rem;
  position: relative;
  z-index: 2;
}
.tab-content { display: none; }
.tab-content.active {
  display: block;
  animation: tabFadeIn .5s cubic-bezier(.16,1,.3,1);
}

/* ══════════════════════════════════════════════════════════════
   HERO CINEMATIC
   ══════════════════════════════════════════════════════════════ */
.hero-cinematic {
  position: relative;
  padding: 4rem 2rem 3rem;
  margin-bottom: 2rem;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: linear-gradient(135deg, var(--gold-soft) 0%, rgba(124,58,237,.04) 100%);
  border: 1px solid var(--border-mid);
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--gold-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--gold-soft) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse at center, black 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 10%, transparent 75%);
  pointer-events: none;
}
.hero-orbs { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: floatOrb 15s ease-in-out infinite;
}
.orb-gold {
  top: -100px; left: 10%;
  width: 400px; height: 400px;
  background: var(--gold-soft);
}
.orb-purple {
  bottom: -100px; right: 10%;
  width: 400px; height: 400px;
  background: rgba(124,58,237,.15);
  animation-delay: -5s;
}
.orb-cyan {
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 300px; height: 300px;
  background: rgba(0,212,255,.08);
  animation-delay: -10s;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: .55rem 1.2rem;
  background: var(--gold-soft);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-full);
  font-size: .78rem;
  font-weight: 700;
  color: var(--gold-primary);
  letter-spacing: .3px;
  margin-bottom: 1.5rem;
  animation: badgeGlow 3s ease-in-out infinite;
}
.hero-crown {
  font-size: .9rem;
  filter: drop-shadow(0 0 8px var(--gold-glow));
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 1.5rem;
}
.title-line {
  display: block;
  opacity: 0;
  animation: titleSlideIn .9s cubic-bezier(.16,1,.3,1) forwards;
}
.title-line.line-1 { animation-delay: .1s; }
.title-line.line-2 { animation-delay: .3s; }
.title-line.line-3 { animation-delay: .5s; }
.gradient-text {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 50%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: goldShimmer 4s linear infinite;
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 2rem;
  line-height: 1.7;
  opacity: 0;
  animation: fadeUp 1s .6s cubic-bezier(.16,1,.3,1) forwards;
}
.hero-sub strong { color: var(--gold-primary); font-weight: 700; }
.hero-ctas {
  display: flex;
  gap: .8rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 1s .8s cubic-bezier(.16,1,.3,1) forwards;
}

/* BUTTONS */
.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: .95rem 1.6rem;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  color: #0a0a0f;
  border: none;
  border-radius: var(--r-full);
  font-family: inherit;
  font-size: .92rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: var(--t-mid);
  box-shadow: 0 8px 24px var(--gold-glow);
  position: relative;
  overflow: hidden;
}
.btn-hero-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px var(--gold-glow);
}
.btn-hero-primary i { font-size: .85rem; }
.btn-arrow { transition: transform var(--t-mid); }
.btn-hero-primary:hover .btn-arrow { transform: translateX(4px); }

.btn-hero-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: .95rem 1.6rem;
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-full);
  font-family: inherit;
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: var(--t-mid);
  backdrop-filter: blur(10px);
}
.btn-hero-ghost:hover {
  background: var(--gold-soft);
  border-color: var(--border-gold);
  color: var(--gold-primary);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px var(--gold-soft);
}

/* HERO TERMINAL */
.hero-terminal {
  max-width: 560px;
  margin: 0 auto;
  background: rgba(0,0,0,.4);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-lg);
  overflow: hidden;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--gold-soft);
  text-align: left;
  opacity: 0;
  animation: fadeUp 1s 1s cubic-bezier(.16,1,.3,1) forwards;
}
[data-theme="light"] .hero-terminal { background: rgba(15,23,42,.95); }
.terminal-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: .7rem 1rem;
  background: rgba(255,255,255,.02);
  border-bottom: 1px solid var(--border-soft);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }
.terminal-title {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: .74rem;
  color: var(--text-muted);
}
[data-theme="light"] .terminal-title { color: #94a3b8; }
.terminal-body {
  padding: 1.2rem;
  font-family: var(--font-mono);
  font-size: .88rem;
  line-height: 1.9;
}
.terminal-line {
  display: flex;
  gap: 10px;
  opacity: 0;
  animation: fadeIn 1s forwards;
}
[data-theme="light"] .terminal-line .t-code,
[data-theme="light"] .terminal-line .t-output { color: #e5e5e5; }
.terminal-line.fade-1 { animation-delay: 1.3s; }
.terminal-line.fade-2 { animation-delay: 1.9s; }
.terminal-line.fade-3 { animation-delay: 2.5s; }
.t-prompt { color: var(--gold-primary); font-weight: 700; }
.t-code { color: var(--text-primary); }
.t-string { color: var(--accent-green); }
.t-number { color: var(--accent-orange); }
.t-output { color: var(--text-secondary); margin-left: 30px; }
.t-cursor-blink { color: var(--gold-primary); animation: blink 1s infinite; }

/* STATS STRIP */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .8rem;
  margin-bottom: 2rem;
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 1.2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  transition: var(--t-mid);
  opacity: 0;
  animation: fadeUp .8s cubic-bezier(.16,1,.3,1) forwards;
  position: relative;
  overflow: hidden;
}
.stat-card:nth-child(1) { animation-delay: .2s; }
.stat-card:nth-child(2) { animation-delay: .3s; }
.stat-card:nth-child(3) { animation-delay: .4s; }
.stat-card:nth-child(4) { animation-delay: .5s; }
.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-md), 0 0 30px var(--gold-soft);
}
.stat-icon {
  width: 46px; height: 46px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.icon-gold { background: var(--gold-soft); color: var(--gold-primary); }
.icon-purple { background: rgba(124,58,237,.15); color: var(--accent-purple); }
.icon-cyan { background: rgba(0,212,255,.15); color: var(--accent-cyan); }
.icon-green { background: rgba(16,185,129,.15); color: var(--accent-green); }
.stat-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.5px;
  line-height: 1;
  color: var(--text-primary);
}
.stat-lbl {
  font-size: .72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-top: 4px;
  font-weight: 600;
}

/* SECTION HEADS */
.section-head-cinematic {
  text-align: center;
  margin-bottom: 2rem;
}
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: .4rem 1rem;
  background: var(--gold-soft);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-full);
  color: var(--gold-primary);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.section-title-cine {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: .5rem;
  line-height: 1.15;
  color: var(--text-primary);
}
.section-sub-cine {
  color: var(--text-secondary);
  font-size: 1rem;
}
.text-gold { color: var(--gold-primary); font-weight: 700; }

/* LOADING / EMPTY */
.loading-cine {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.loading-spinner-cine {
  width: 44px; height: 44px;
  margin: 0 auto 1rem;
  border: 3px solid var(--border-soft);
  border-top-color: var(--gold-primary);
  border-right-color: var(--gold-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: 0 0 20px var(--gold-soft);
}
.empty-state-cine {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.empty-state-cine i {
  font-size: 3rem;
  opacity: .4;
  display: block;
  margin-bottom: 1rem;
  color: var(--gold-primary);
}
.empty-state-cine h4 {
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: .3rem;
  font-family: var(--font-display);
}
.empty-state-cine p { font-size: .88rem; }

/* UTILITY */
#scrollProgress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--gold-primary), var(--gold-light), var(--gold-primary));
  background-size: 200% auto;
  animation: goldShimmer 3s linear infinite;
  z-index: 1100;
  transition: width .1s;
  box-shadow: 0 0 12px var(--gold-glow);
}
#backToTop {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 500;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  color: var(--gold-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--t-mid);
}
#backToTop.show { opacity: 1; visibility: visible; transform: none; }
#backToTop:hover {
  background: var(--gold-primary);
  color: #0a0a0f;
  box-shadow: 0 0 25px var(--gold-glow);
  transform: translateY(-3px);
}
#confettiCanvas { position: fixed; inset: 0; z-index: 6000; pointer-events: none; }

/* TOASTS */
#toastStack {
  position: fixed;
  top: 90px; right: 20px;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(340px, calc(100vw - 40px));
}
.toast {
  padding: 12px 14px;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-md);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  border-left: 3px solid var(--gold-primary);
  animation: toastIn .35s cubic-bezier(.16,1,.3,1);
}
.toast.success { border-left-color: var(--accent-green); }
.toast.warn { border-left-color: var(--accent-orange); }
.toast i { color: var(--gold-primary); margin-top: 2px; font-size: .95rem; }
.toast.success i { color: var(--accent-green); }
.toast.warn i { color: var(--accent-orange); }
.toast-body { flex: 1; }
.toast-title { font-size: .88rem; font-weight: 700; margin-bottom: 2px; color: var(--text-primary); }
.toast-sub { font-size: .78rem; color: var(--text-secondary); font-family: var(--font-mono); }
.toast.leaving { animation: toastOut .3s ease forwards; }

/* ══════════════════════════════════════════════════════════════
   PYTHON PREVIEW / FEATURES / CTA
   ══════════════════════════════════════════════════════════════ */
.python-preview {
  padding: 2.5rem 1.5rem;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--gold-soft), rgba(124,58,237,.03));
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  position: relative;
  overflow: hidden;
}
.level-track-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .8rem;
  margin-bottom: 2rem;
}
.level-preview-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 1rem .9rem;
  cursor: pointer;
  transition: var(--t-mid);
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: fadeUp .6s cubic-bezier(.16,1,.3,1) forwards;
}
.level-preview-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-md), 0 0 25px var(--gold-soft);
}
.level-preview-card.solved {
  border-color: rgba(16,185,129,.4);
  background: rgba(16,185,129,.04);
}
.lpc-num {
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 700;
  color: var(--gold-primary);
  margin-bottom: 6px;
  letter-spacing: 1.5px;
}
.lpc-title {
  font-size: .84rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
  color: var(--text-primary);
}
.lpc-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .68rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.lpc-diff {
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  font-size: .62rem;
}
.lpc-diff.Easy { background: rgba(16,185,129,.15); color: #059669; }
.lpc-diff.Medium { background: rgba(245,158,11,.15); color: #d97706; }
.lpc-diff.Hard { background: rgba(239,68,68,.15); color: #dc2626; }
[data-theme="dark"] .lpc-diff.Easy { color: #6ee7b7; }
[data-theme="dark"] .lpc-diff.Medium { color: #fcd34d; }
[data-theme="dark"] .lpc-diff.Hard { color: #fca5a5; }
.lpc-check {
  position: absolute;
  top: 8px; right: 8px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent-green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  font-weight: 800;
  box-shadow: 0 0 15px rgba(16,185,129,.5);
}
.preview-cta { text-align: center; }

.features-cinematic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.feature-cine-card {
  padding: 1.6rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  transition: var(--t-mid);
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: fadeUp .8s cubic-bezier(.16,1,.3,1) forwards;
}
.feature-cine-card:nth-child(1) { animation-delay: .1s; }
.feature-cine-card:nth-child(2) { animation-delay: .2s; }
.feature-cine-card:nth-child(3) { animation-delay: .3s; }
.feature-cine-card:nth-child(4) { animation-delay: .4s; }
.feature-cine-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-md);
}
.fc-icon {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--fc-color) 15%, transparent);
  color: var(--fc-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 1rem;
  box-shadow: 0 0 25px color-mix(in srgb, var(--fc-color) 25%, transparent);
  transition: var(--t-mid);
}
.feature-cine-card:hover .fc-icon {
  transform: scale(1.1) rotate(-5deg);
}
.feature-cine-card h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: .4rem;
  letter-spacing: -.3px;
  color: var(--text-primary);
}
.feature-cine-card p {
  font-size: .88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.cta-banner {
  position: relative;
  padding: 3rem 2rem;
  margin-bottom: 1rem;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: linear-gradient(135deg, var(--gold-soft), rgba(124,58,237,.06));
  border: 1px solid var(--border-gold);
  text-align: center;
}
.cta-banner-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--gold-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--gold-soft) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  pointer-events: none;
}
.cta-banner-content { position: relative; z-index: 1; }
.cta-crown {
  font-size: 2.5rem;
  color: var(--gold-primary);
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 30px var(--gold-glow));
  animation: crownFloat 3s ease-in-out infinite;
}
.cta-banner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -.8px;
  margin-bottom: .6rem;
  color: var(--text-primary);
}
.cta-banner p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: .95rem;
}

/* ══════════════════════════════════════════════════════════════
   PYTHON PRACTICE PAGE
   ══════════════════════════════════════════════════════════════ */
.python-header-cinematic {
  position: relative;
  padding: 2rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--gold-soft), rgba(124,58,237,.05));
  border: 1px solid var(--border-gold);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.python-header-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--gold-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--gold-soft) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at top left, black, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at top left, black, transparent 70%);
  pointer-events: none;
}
.python-header-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}
.python-icon-big {
  width: 72px; height: 72px;
  border-radius: var(--r-lg);
  background: var(--gold-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  color: var(--gold-primary);
  border: 1.5px solid var(--border-gold);
  flex-shrink: 0;
  box-shadow: 0 0 30px var(--gold-soft);
}
.python-header-content h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: .2rem;
  color: var(--text-primary);
}
.python-header-content p {
  color: var(--text-secondary);
  font-size: .92rem;
}
.python-progress-bar-wrap { position: relative; z-index: 1; }
.ppb-labels {
  display: flex;
  justify-content: space-between;
  font-size: .82rem;
  color: var(--text-secondary);
  margin-bottom: .5rem;
}
.ppb-labels strong { color: var(--gold-primary); font-family: var(--font-mono); }
.ppb-track {
  height: 8px;
  background: var(--bg-surface-3);
  border-radius: var(--r-full);
  overflow: hidden;
}
.ppb-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-primary), var(--gold-light));
  background-size: 200% auto;
  animation: goldShimmer 3s linear infinite;
  border-radius: var(--r-full);
  transition: width .8s cubic-bezier(.16,1,.3,1);
  box-shadow: 0 0 15px var(--gold-glow);
}

.python-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.filter-chips-cine { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip-cine {
  padding: .5rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-full);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--t-mid);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.chip-cine i { font-size: .8rem; }
.chip-cine:hover {
  border-color: var(--border-mid);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.chip-cine.active {
  background: var(--gold-soft);
  border-color: var(--border-gold);
  color: var(--gold-primary);
  font-weight: 700;
  box-shadow: 0 0 20px var(--gold-soft);
}
.filter-search-cine {
  position: relative;
  min-width: 220px;
  flex: 1;
  max-width: 300px;
}
.filter-search-cine i {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: .85rem;
}
.filter-search-cine input {
  width: 100%;
  padding: .65rem 1rem .65rem 2.4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-full);
  color: var(--text-primary);
  font-family: inherit;
  font-size: .85rem;
  outline: none;
  transition: var(--t-mid);
}
.filter-search-cine input:focus {
  border-color: var(--border-gold);
  box-shadow: 0 0 0 3px var(--gold-soft), 0 0 20px var(--gold-soft);
}
.filter-search-cine input::placeholder { color: var(--text-dim); }

.levels-grid-cine {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1rem;
}
.level-card-cine {
  position: relative;
  padding: 1.3rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: var(--t-mid);
  overflow: hidden;
  opacity: 0;
  animation: fadeUp .5s cubic-bezier(.16,1,.3,1) forwards;
}
.level-card-cine::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-primary), var(--gold-light));
  opacity: 0;
  transition: var(--t-mid);
}
.level-card-cine:hover {
  transform: translateY(-5px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-md), 0 0 30px var(--gold-soft);
}
.level-card-cine:hover::before { opacity: 1; }
.level-card-cine.solved {
  border-color: rgba(16,185,129,.3);
  background: rgba(16,185,129,.03);
}
.level-card-cine.solved::before {
  opacity: 1;
  background: linear-gradient(90deg, var(--accent-green), #34d399);
}
.lc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: .8rem;
}
.lc-level {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: .25rem .65rem;
  background: var(--gold-soft);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-full);
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 700;
  color: var(--gold-primary);
  letter-spacing: .5px;
}
.lc-check-big {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent-green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 800;
  box-shadow: 0 0 15px rgba(16,185,129,.5);
}
.lc-title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: .5rem;
  line-height: 1.3;
  letter-spacing: -.3px;
  color: var(--text-primary);
}
.lc-desc {
  font-size: .82rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.lc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: .8rem;
  border-top: 1px solid var(--border-soft);
}
.lc-diff-badge {
  font-size: .68rem;
  font-weight: 700;
  padding: .28rem .7rem;
  border-radius: var(--r-full);
  letter-spacing: .4px;
  text-transform: uppercase;
}
.lc-diff-badge.Easy { background: rgba(16,185,129,.15); color: #059669; }
.lc-diff-badge.Medium { background: rgba(245,158,11,.15); color: #d97706; }
.lc-diff-badge.Hard { background: rgba(239,68,68,.15); color: #dc2626; }
[data-theme="dark"] .lc-diff-badge.Easy { color: #6ee7b7; }
[data-theme="dark"] .lc-diff-badge.Medium { color: #fcd34d; }
[data-theme="dark"] .lc-diff-badge.Hard { color: #fca5a5; }
.lc-arrow {
  color: var(--text-muted);
  transition: var(--t-mid);
}
.level-card-cine:hover .lc-arrow {
  color: var(--gold-primary);
  transform: translateX(5px);
}

/* ══════════════════════════════════════════════════════════════
   PROBLEM VIEW
   ══════════════════════════════════════════════════════════════ */
.problem-view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.back-btn-cine {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: .6rem 1.1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-full);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--t-mid);
}
.back-btn-cine:hover {
  color: var(--gold-primary);
  border-color: var(--border-gold);
  background: var(--gold-soft);
  transform: translateX(-3px);
}
.problem-view-meta {
  display: flex;
  gap: .6rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--text-muted);
  align-items: center;
}
.problem-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 1.2rem;
}
@media (max-width: 1024px) {
  .problem-layout { grid-template-columns: 1fr; }
}
.problem-card-cine {
  padding: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  position: sticky;
  top: 100px;
  animation: fadeUp .5s cubic-bezier(.16,1,.3,1);
}
@media (max-width: 1024px) {
  .problem-card-cine { position: static; }
}
.problem-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: .8rem;
  flex-wrap: wrap;
}
.problem-title-row h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.6px;
  line-height: 1.2;
  flex: 1;
  min-width: 200px;
  color: var(--text-primary);
}
.badge-diff {
  padding: .35rem .85rem;
  border-radius: var(--r-full);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-diff.Easy { background: rgba(16,185,129,.15); color: #059669; border: 1px solid rgba(16,185,129,.3); }
.badge-diff.Medium { background: rgba(245,158,11,.15); color: #d97706; border: 1px solid rgba(245,158,11,.3); }
.badge-diff.Hard { background: rgba(239,68,68,.15); color: #dc2626; border: 1px solid rgba(239,68,68,.3); }
[data-theme="dark"] .badge-diff.Easy { color: #6ee7b7; }
[data-theme="dark"] .badge-diff.Medium { color: #fcd34d; }
[data-theme="dark"] .badge-diff.Hard { color: #fca5a5; }
.problem-tags { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.problem-tag {
  padding: .25rem .7rem;
  background: var(--gold-soft);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-full);
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--gold-primary);
}
.problem-desc {
  font-size: .92rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  white-space: pre-wrap;
}
.problem-desc code {
  font-family: var(--font-mono);
  background: var(--gold-soft);
  color: var(--gold-primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .85em;
}
.examples-section h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .8rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-primary);
}
.example-block {
  background: var(--bg-base);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 1rem;
  margin-bottom: .7rem;
  font-family: var(--font-mono);
  font-size: .82rem;
  transition: var(--t-mid);
}
.example-block:hover {
  border-color: var(--border-gold);
}
.example-row { display: flex; gap: .8rem; padding: .35rem 0; }
.example-row .label { color: var(--text-muted); min-width: 70px; font-weight: 600; }
.example-row .value { color: var(--text-primary); flex: 1; }
.example-row .value.output { color: var(--accent-green); }
.example-explanation {
  padding-top: .5rem;
  margin-top: .5rem;
  border-top: 1px solid var(--border-soft);
  color: var(--text-secondary);
  font-size: .78rem;
  font-style: italic;
}

.problem-right { display: flex; flex-direction: column; gap: 1rem; }
.editor-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  animation: fadeUp .5s .1s cubic-bezier(.16,1,.3,1) backwards;
}
[data-theme="dark"] .editor-card { background: #0d0d12; }
.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .6rem .8rem;
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border-soft);
}
.editor-tabs { display: flex; gap: .2rem; }
.editor-tab {
  padding: .5rem .9rem;
  background: transparent;
  border: none;
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: var(--t-mid);
}
.editor-tab:hover {
  color: var(--text-primary);
  background: var(--bg-glass-hover);
}
.editor-tab.active {
  color: var(--gold-primary);
  background: var(--gold-soft);
}
.editor-actions { display: flex; gap: .2rem; }
.editor-btn {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--t-mid);
  font-size: .85rem;
}
.editor-btn:hover {
  background: var(--gold-soft);
  color: var(--gold-primary);
  transform: scale(1.1);
}
.editor-body {
  position: relative;
  display: flex;
  min-height: 380px;
  max-height: 520px;
  overflow: auto;
  background: var(--bg-base);
}
[data-theme="dark"] .editor-body { background: #0d0d12; }
.editor-line-numbers {
  padding: 1rem 0;
  font-family: var(--font-mono);
  font-size: .88rem;
  line-height: 1.65;
  color: var(--text-dim);
  text-align: right;
  min-width: 50px;
  user-select: none;
  background: var(--bg-glass);
  border-right: 1px solid var(--border-soft);
}
.editor-line-numbers span { display: block; padding: 0 12px; }
.code-textarea {
  flex: 1;
  padding: 1rem;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: .88rem;
  line-height: 1.65;
  resize: none;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
  min-height: 380px;
  tab-size: 4;
  caret-color: var(--gold-primary);
}
[data-theme="dark"] .code-textarea { color: #e5e5e5; }
.code-textarea::placeholder { color: var(--text-dim); }
.editor-footer {
  display: flex;
  gap: .6rem;
  padding: .8rem;
  background: var(--bg-glass);
  border-top: 1px solid var(--border-soft);
  flex-wrap: wrap;
}
.btn-run-cine {
  flex: 1;
  min-width: 140px;
  padding: .75rem 1.2rem;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  color: #0a0a0f;
  border: none;
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: .88rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--t-mid);
  box-shadow: 0 6px 20px var(--gold-glow);
}
.btn-run-cine:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px var(--gold-glow);
}
.btn-mark-solved {
  padding: .75rem 1.2rem;
  background: rgba(16,185,129,.1);
  border: 1px solid rgba(16,185,129,.3);
  border-radius: var(--r-md);
  color: #059669;
  font-family: inherit;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--t-mid);
}
[data-theme="dark"] .btn-mark-solved { color: #6ee7b7; }
.btn-mark-solved:hover {
  background: rgba(16,185,129,.2);
  border-color: var(--accent-green);
  transform: translateY(-2px);
}
.btn-mark-solved.solved {
  background: var(--accent-green);
  color: #fff;
  border-color: var(--accent-green);
  box-shadow: 0 0 25px rgba(16,185,129,.5);
}
.solution-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-lg);
  overflow: hidden;
  animation: fadeUp .5s cubic-bezier(.16,1,.3,1);
  box-shadow: 0 0 30px var(--gold-soft);
}
.solution-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .9rem 1.2rem;
  background: var(--gold-soft);
  border-bottom: 1px solid var(--border-gold);
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  color: var(--gold-primary);
}
.solution-header span { display: flex; align-items: center; gap: 8px; }
.solution-body { padding: 1.2rem; }
.solution-body pre {
  background: var(--bg-base);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-md);
  padding: 1.2rem;
  font-family: var(--font-mono);
  font-size: .88rem;
  color: var(--text-primary);
  overflow-x: auto;
  white-space: pre;
  line-height: 1.7;
  margin-bottom: 1rem;
  tab-size: 4;
}
[data-theme="dark"] .solution-body pre { background: #0a0a10; color: #e5e5e5; }
.solution-explanation {
  padding: 1rem 1.2rem;
  background: var(--gold-soft);
  border-left: 3px solid var(--gold-primary);
  border-radius: var(--r-sm);
  font-size: .9rem;
  line-height: 1.75;
  color: var(--text-secondary);
}
.solution-nav {
  display: flex;
  gap: .5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
  flex-wrap: wrap;
}
.solution-nav button {
  flex: 1;
  padding: .7rem 1rem;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-md);
  color: var(--gold-primary);
  font-family: inherit;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--t-mid);
  min-width: 120px;
}
.solution-nav button:hover:not(:disabled) {
  background: var(--gold-soft);
  transform: translateY(-2px);
}
.solution-nav button:disabled { opacity: .35; cursor: not-allowed; }

.problem-navigation {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: .8rem;
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  animation: fadeUp .6s cubic-bezier(.16,1,.3,1);
}
.problem-nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1rem 1.2rem;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-family: inherit;
  cursor: pointer;
  transition: var(--t-mid);
  text-align: left;
  min-height: 60px;
}
.problem-nav-btn:hover:not(:disabled) {
  border-color: var(--border-gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), 0 0 25px var(--gold-soft);
}
.problem-nav-btn:disabled { opacity: .35; cursor: not-allowed; }
.problem-nav-btn i { font-size: 1.1rem; color: var(--gold-primary); flex-shrink: 0; }
.problem-nav-btn.next { text-align: right; }
.problem-nav-btn.next .pnb-text { text-align: right; flex: 1; }
.pnb-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.pnb-label {
  font-size: .68rem;
  font-weight: 700;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.pnb-title {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.problem-nav-btn.all-levels {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 1rem 1.4rem;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  color: #0a0a0f;
  border-color: transparent;
  font-weight: 700;
  font-size: .8rem;
  min-width: 100px;
}
.problem-nav-btn.all-levels i { color: #0a0a0f; font-size: 1.2rem; }

/* ══════════════════════════════════════════════════════════════
   CHAT WITH CHAIRMAN (Doubts)
   ══════════════════════════════════════════════════════════════ */
.doubts-toolbar-cine {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.doubts-grid-cine {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
}
.doubt-card-cine {
  padding: 1.3rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: var(--t-mid);
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: fadeUp .5s cubic-bezier(.16,1,.3,1) forwards;
}
.doubt-card-cine::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--gold-primary), var(--gold-dark));
  opacity: 0;
  transition: var(--t-mid);
}
.doubt-card-cine:hover {
  transform: translateY(-4px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-md), 0 0 25px var(--gold-soft);
}
.doubt-card-cine:hover::before { opacity: 1; }
.dc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .8rem;
  gap: .5rem;
}
.dc-topic {
  padding: .25rem .7rem;
  background: var(--gold-soft);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-full);
  color: var(--gold-primary);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 700;
}
.dc-status {
  padding: .25rem .7rem;
  border-radius: var(--r-full);
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
}
.dc-status.open { background: rgba(245,158,11,.15); color: #d97706; }
.dc-status.answered { background: rgba(16,185,129,.15); color: #059669; }
[data-theme="dark"] .dc-status.open { color: #fcd34d; }
[data-theme="dark"] .dc-status.answered { color: #6ee7b7; }
.dc-question {
  font-size: .9rem;
  line-height: 1.6;
  margin-bottom: .8rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
}
.dc-meta {
  display: flex;
  gap: .8rem;
  font-size: .72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ══════════════════════════════════════════════════════════════
   POSTS BY CHAIRMAN
   ══════════════════════════════════════════════════════════════ */
.post-creator {
  padding: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-xl);
  margin-bottom: 2rem;
  box-shadow: 0 0 40px var(--gold-soft);
}
.post-creator-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}
.pc-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a0a0f;
  font-size: 1.2rem;
  box-shadow: 0 0 25px var(--gold-glow);
}
.pc-info { flex: 1; }
.pc-name { font-weight: 700; font-size: .95rem; color: var(--text-primary); }
.pc-role {
  font-size: .72rem;
  color: var(--gold-primary);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.post-creator textarea {
  width: 100%;
  padding: 1rem;
  background: var(--bg-base);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: .92rem;
  outline: none;
  resize: vertical;
  min-height: 100px;
  transition: var(--t-mid);
  margin-bottom: 1rem;
}
.post-creator textarea:focus {
  border-color: var(--border-gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.post-creator-actions {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}
.post-creator-actions input {
  flex: 1;
  min-width: 200px;
  padding: .7rem 1rem;
  background: var(--bg-base);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: .85rem;
  outline: none;
  transition: var(--t-mid);
}
.post-creator-actions input:focus {
  border-color: var(--border-gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

.posts-feed {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.post-card-cine {
  padding: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  transition: var(--t-mid);
  animation: fadeUp .5s cubic-bezier(.16,1,.3,1);
  position: relative;
  overflow: hidden;
}
.post-card-cine::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--gold-primary), var(--gold-dark));
}
.post-card-cine:hover {
  transform: translateY(-3px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-md), 0 0 25px var(--gold-soft);
}
.post-header-cine {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-soft);
}
.post-avatar-cine {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a0a0f;
  font-size: 1.3rem;
  flex-shrink: 0;
  box-shadow: 0 0 25px var(--gold-glow);
}
.post-author-info { flex: 1; }
.post-author-name {
  font-weight: 700;
  font-size: .95rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.post-author-name i {
  font-size: .7rem;
  color: var(--gold-primary);
}
.post-time {
  font-size: .74rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 2px;
}
.post-content-cine {
  font-size: .95rem;
  line-height: 1.7;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-wrap: break-word;
  margin-bottom: .8rem;
}
.post-link-cine {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: .6rem 1rem;
  background: var(--gold-soft);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-md);
  color: var(--gold-primary);
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--t-mid);
  word-break: break-all;
}
.post-link-cine:hover {
  background: var(--gold-primary);
  color: #0a0a0f;
  transform: translateY(-2px);
  box-shadow: 0 0 25px var(--gold-glow);
}
.post-footer-cine {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: .8rem;
  border-top: 1px solid var(--border-soft);
  margin-top: .8rem;
  font-size: .78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.post-admin-actions {
  margin-left: auto;
  display: flex;
  gap: .4rem;
}
.post-admin-actions button {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--t-fast);
  font-size: .8rem;
}
.post-admin-actions button:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
  transform: scale(1.1);
}

/* ══════════════════════════════════════════════════════════════
   LEADERBOARD
   ══════════════════════════════════════════════════════════════ */
.lb-podium-cine {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: end;
}
@media (max-width: 700px) {
  .lb-podium-cine { grid-template-columns: 1fr; }
}
.lb-podium-card {
  padding: 1.8rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  text-align: center;
  position: relative;
  transition: var(--t-mid);
  overflow: hidden;
}
.lb-podium-card:hover { transform: translateY(-5px); }
.lb-podium-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}
.lb-podium-card.gold {
  border-color: var(--border-gold);
  background: linear-gradient(180deg, var(--gold-soft), transparent);
  transform: scale(1.05);
}
.lb-podium-card.gold::before {
  background: linear-gradient(90deg, var(--gold-primary), var(--gold-light), var(--gold-primary));
  box-shadow: 0 0 20px var(--gold-glow);
}
.lb-podium-card.silver { border-color: rgba(148,163,184,.3); }
.lb-podium-card.silver::before {
  background: linear-gradient(90deg, #94a3b8, #cbd5e1, #94a3b8);
}
.lb-podium-card.bronze { border-color: rgba(217,119,6,.3); }
.lb-podium-card.bronze::before {
  background: linear-gradient(90deg, #d97706, #f59e0b, #d97706);
}
.lb-podium-rank {
  font-family: var(--font-royal);
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: .5rem;
  letter-spacing: -1px;
}
.lb-podium-card.gold .lb-podium-rank { color: var(--gold-primary); }
.lb-podium-card.silver .lb-podium-rank { color: #94a3b8; }
.lb-podium-card.bronze .lb-podium-rank { color: #d97706; }
.lb-podium-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  margin: 0 auto .7rem;
  border: 3px solid currentColor;
  object-fit: cover;
  display: block;
}
.lb-podium-card.gold .lb-podium-avatar { border-color: var(--gold-primary); box-shadow: 0 0 25px var(--gold-glow); }
.lb-podium-card.silver .lb-podium-avatar { border-color: #94a3b8; }
.lb-podium-card.bronze .lb-podium-avatar { border-color: #d97706; }
.lb-podium-name {
  font-weight: 700;
  font-size: .92rem;
  margin-bottom: .3rem;
  color: var(--text-primary);
}
.lb-podium-xp {
  font-family: var(--font-mono);
  color: var(--gold-primary);
  font-size: .88rem;
  font-weight: 700;
}
.lb-list-cine {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.lb-row-cine {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border-soft);
  transition: var(--t-mid);
}
.lb-row-cine:last-child { border-bottom: none; }
.lb-row-cine:hover { background: var(--gold-soft); }
.lb-row-cine.me {
  background: var(--gold-soft);
  border-left: 3px solid var(--gold-primary);
}
.lb-rank-cine {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--text-muted);
  width: 40px;
  font-size: .92rem;
}
.lb-avatar-cine {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border-mid);
}
.lb-info-cine { flex: 1; min-width: 0; }
.lb-name-cine {
  font-weight: 700;
  font-size: .9rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-sub-cine {
  font-size: .72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.lb-xp-cine {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--gold-primary);
}

/* ══════════════════════════════════════════════════════════════
   COMMUNITY CHAT
   ══════════════════════════════════════════════════════════════ */
.chat-shell-cine {
  position: relative;
  display: grid;
  grid-template-columns: 280px 1fr;
  height: min(82vh, 800px);
  min-height: 550px;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 40px var(--gold-soft);
}
.chat-sidebar-cine {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface-2);
  border-right: 1px solid var(--border-soft);
  min-width: 0;
  overflow: hidden;
}
.cs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
}
.cs-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .94rem;
  color: var(--text-primary);
}
.cs-brand i { color: var(--gold-primary); }
.cs-close-btn {
  display: none;
  width: 30px; height: 30px;
  border-radius: var(--r-sm);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: .95rem;
  cursor: pointer;
}
.cs-me {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--gold-soft);
}
.cs-me img {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid var(--gold-primary);
  object-fit: cover;
  flex-shrink: 0;
}
.cs-me-info { flex: 1; min-width: 0; }
.cs-me-name {
  font-weight: 600;
  font-size: .88rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-me-status {
  display: flex; align-items: center; gap: 5px;
  font-size: .72rem;
  color: var(--accent-green);
  margin-top: 1px;
}
.online-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
  display: inline-block;
  flex-shrink: 0;
}
.cs-search {
  position: relative;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
}
.cs-search i {
  position: absolute;
  left: 24px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: .8rem;
  pointer-events: none;
}
.cs-search input {
  width: 100%;
  padding: 8px 12px 8px 32px;
  background: var(--bg-base);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-full);
  color: var(--text-primary);
  font-family: inherit;
  font-size: .82rem;
  outline: none;
}
.cs-search input:focus {
  border-color: var(--border-gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.cs-scroll { flex: 1; overflow-y: auto; padding-bottom: 12px; }
.cs-label {
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 14px 18px 6px;
}
.cs-rooms {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px;
}
.cs-room {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: .86rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--t-fast);
  text-align: left;
  width: 100%;
}
.cs-room:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
}
.cs-room.active {
  background: var(--gold-soft);
  border-color: var(--border-gold);
  color: var(--gold-primary);
}
.cs-room-ico {
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-3);
  font-size: .78rem;
  flex-shrink: 0;
}
.cs-room.active .cs-room-ico {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  color: #0a0a0f;
}
.cs-room-meta { flex: 1; min-width: 0; }
.cs-room-name {
  font-weight: 600;
  font-size: .85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-room-count {
  font-size: .64rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--r-full);
  background: var(--bg-surface-3);
  color: var(--text-muted);
}
.cs-users {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px;
}
.cs-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  font-size: .82rem;
  color: var(--text-secondary);
}
.cs-user-av {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .66rem;
  font-weight: 800;
  color: #fff;
  position: relative;
  flex-shrink: 0;
}
.cs-user-av::after {
  content: '';
  position: absolute;
  right: -1px; bottom: -1px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  border: 2px solid var(--bg-surface-2);
}
.cs-user-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-user-you {
  font-size: .64rem;
  color: var(--text-muted);
  margin-left: auto;
  font-family: var(--font-mono);
}
.cs-loading {
  padding: 8px 16px;
  font-size: .78rem;
  color: var(--text-muted);
}

.chat-main-cine {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-base);
  position: relative;
}
.cm-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-surface-2);
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}
.cm-menu-btn {
  display: none;
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
}
.cm-room-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a0a0f;
  font-size: 1rem;
  flex-shrink: 0;
}
.cm-room-info { flex: 1; min-width: 0; }
.cm-room-info h3 {
  font-family: var(--font-display);
  font-size: .98rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cm-room-sub {
  display: flex; align-items: center; gap: 6px;
  font-size: .72rem;
  color: var(--text-secondary);
  margin-top: 1px;
}
.cm-icon-btn {
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--t-fast);
}
.cm-icon-btn:hover, .cm-icon-btn.active {
  background: var(--gold-soft);
  color: var(--gold-primary);
}
.cm-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  scroll-behavior: smooth;
}
.cm-empty {
  margin: auto;
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
}
.cm-empty i {
  font-size: 2.6rem;
  opacity: .4;
  margin-bottom: 12px;
  display: block;
  color: var(--gold-primary);
}
.cm-empty h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 5px;
}
.cm-empty p { font-size: .85rem; }
.cm-date-sep {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px 0 12px;
}
.cm-date-sep span {
  padding: 4px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-full);
  font-size: .68rem;
  font-weight: 600;
  color: var(--text-muted);
}
.cm-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  position: relative;
  padding: 1px 0;
  max-width: 100%;
  animation: msgIn .2s ease;
}
.cm-msg.mine { flex-direction: row-reverse; }
.cm-msg-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.cm-msg-avatar.hidden { visibility: hidden; }
.cm-msg-col {
  display: flex;
  flex-direction: column;
  max-width: min(560px, 76%);
  min-width: 0;
}
.cm-msg.mine .cm-msg-col { align-items: flex-end; }
.cm-msg-author {
  font-size: .7rem;
  font-weight: 700;
  margin: 0 0 3px 12px;
}
.cm-bubble {
  position: relative;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 15px 15px 15px 5px;
  padding: 8px 12px;
  font-size: .9rem;
  line-height: 1.5;
  word-wrap: break-word;
  color: var(--text-primary);
}
.cm-msg.mine .cm-bubble {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold-primary));
  color: #0a0a0f;
  border-radius: 15px 15px 5px 15px;
  border-color: transparent;
  font-weight: 500;
}
.cm-msg.grouped .cm-bubble { border-radius: 13px; }
.cm-bubble a { color: var(--gold-primary); text-decoration: underline; }
.cm-msg.mine .cm-bubble a { color: #003344; }
.cm-bubble code {
  font-family: var(--font-mono);
  font-size: .85em;
  background: rgba(0,0,0,.15);
  padding: 2px 6px;
  border-radius: 4px;
}
[data-theme="dark"] .cm-bubble code { background: rgba(0,0,0,.4); }
.cm-bubble img.cm-chat-img {
  max-width: 100%;
  border-radius: 10px;
  margin: 4px 0;
  cursor: pointer;
  display: block;
}
.cm-quote {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
  background: rgba(0,0,0,.15);
  border-radius: 8px;
  padding: 6px 9px;
  cursor: pointer;
  border-left: 3px solid var(--gold-primary);
}
.cm-quote-body { min-width: 0; }
.cm-quote-name {
  font-size: .68rem;
  font-weight: 700;
  color: var(--gold-primary);
}
.cm-quote-text {
  font-size: .74rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}
.cm-text { white-space: pre-wrap; }
.cm-bubble-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  float: right;
  margin: 4px 0 -2px 10px;
  font-size: .63rem;
  color: var(--text-muted);
}
.cm-msg.mine .cm-bubble-meta { color: rgba(0,0,0,.6); }
.cm-edited-tag { font-style: italic; opacity: .75; }
.cm-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.cm-reaction-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  background: var(--bg-glass);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-full);
  font-size: .74rem;
  cursor: pointer;
  color: var(--text-secondary);
  font-family: inherit;
}
.cm-reaction-chip.mine {
  background: var(--gold-soft);
  border-color: var(--border-gold);
  color: var(--gold-primary);
}
.cm-msg-actions {
  position: absolute;
  top: -14px;
  display: flex;
  gap: 2px;
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-full);
  padding: 3px 5px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px) scale(.94);
  z-index: 20;
  transition: var(--t-fast);
}
.cm-msg:not(.mine) .cm-msg-actions { right: 6px; }
.cm-msg.mine .cm-msg-actions { left: 6px; }
.cm-msg:hover .cm-msg-actions {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.cm-msg-actions button {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: .85rem;
  padding: 3px 5px;
  border-radius: 50%;
  color: var(--text-secondary);
  font-family: inherit;
}
.cm-msg-actions button:hover {
  background: var(--bg-glass-hover);
  transform: scale(1.15);
}
.cm-act-sep {
  width: 1px;
  background: var(--border-soft);
  margin: 3px 2px;
}
.cm-typing {
  height: 22px;
  padding: 0 22px;
  font-size: .74rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .2s;
}
.cm-typing.show { opacity: 1; }
.cm-typing-dots { display: inline-flex; gap: 3px; }
.cm-typing-dots i {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--gold-primary);
  display: block;
  animation: tBounce 1.2s infinite;
}
.cm-typing-dots i:nth-child(2) { animation-delay: .15s; }
.cm-typing-dots i:nth-child(3) { animation-delay: .3s; }
.cm-composer-wrap {
  position: relative;
  padding: 10px 14px 12px;
  background: var(--bg-surface-2);
  border-top: 1px solid var(--border-soft);
  flex-shrink: 0;
}
.cm-reply-preview {
  display: none;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  margin-bottom: 8px;
}
.cm-reply-preview.show { display: flex; }
.cm-rp-bar {
  width: 3px;
  align-self: stretch;
  background: var(--gold-primary);
  border-radius: 2px;
}
.cm-rp-body { flex: 1; min-width: 0; }
.cm-rp-name {
  font-size: .7rem;
  font-weight: 700;
  color: var(--gold-primary);
}
.cm-rp-text {
  font-size: .78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cm-img-preview {
  position: relative;
  display: inline-block;
  margin-bottom: 8px;
}
.cm-img-preview img {
  max-height: 100px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-mid);
}
.cm-img-remove {
  position: absolute;
  top: -8px; right: -8px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent-red);
  color: #fff;
  border: 2px solid var(--bg-surface);
  cursor: pointer;
  font-size: .7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cm-composer {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  background: var(--bg-base);
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  padding: 5px 8px;
  transition: var(--t-fast);
}
.cm-composer:focus-within {
  border-color: var(--border-gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.cm-composer textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: .92rem;
  resize: none;
  max-height: 130px;
  line-height: 1.5;
  padding: 8px 4px;
}
.cm-composer textarea::placeholder { color: var(--text-dim); }
.cm-send-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  color: #0a0a0f;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: .9rem;
  transition: var(--t-fast);
}
.cm-send-btn:hover:not(:disabled) {
  transform: scale(1.08);
  box-shadow: 0 0 20px var(--gold-glow);
}
.cm-send-btn:disabled { opacity: .3; cursor: not-allowed; }
.cm-emoji-panel {
  position: absolute;
  bottom: calc(100% - 6px);
  left: 14px;
  width: min(340px, calc(100% - 28px));
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-md);
  padding: 10px;
  display: none;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  z-index: 50;
}
.cm-emoji-panel.show { display: grid; }
.cm-emoji-panel button {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 6px 2px;
  border-radius: 6px;
  transition: var(--t-fast);
  line-height: 1;
}
.cm-emoji-panel button:hover {
  background: var(--gold-soft);
  transform: scale(1.2);
}
.cm-jump-btn {
  position: absolute;
  right: 22px; bottom: 110px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  color: var(--gold-primary);
  cursor: pointer;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  font-size: .95rem;
}
.cm-jump-btn.show { display: flex; }
.cm-jump-badge {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  background: var(--accent-red);
  color: #fff;
  border-radius: var(--r-full);
  font-size: .64rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-base);
}
.cm-join-overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
  background: rgba(5,5,10,.9);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cm-join-overlay.hide { display: none; }
.cm-join-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-xl);
  padding: 30px 26px;
  text-align: center;
  box-shadow: var(--shadow-lg), 0 0 40px var(--gold-soft);
}
.cm-join-icon {
  width: 62px; height: 62px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a0a0f;
  font-size: 1.6rem;
  box-shadow: 0 0 30px var(--gold-glow);
}
.cm-join-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 5px;
}
.cm-join-card p {
  color: var(--text-secondary);
  font-size: .85rem;
  margin-bottom: 18px;
}
.cm-join-card input {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg-base);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: .95rem;
  outline: none;
  text-align: center;
}
.cm-join-card input:focus {
  border-color: var(--border-gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.cm-join-colors {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 18px 0 20px;
  flex-wrap: wrap;
}
.cm-color-swatch {
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--t-fast);
}
.cm-color-swatch:hover { transform: scale(1.12); }
.cm-color-swatch.sel {
  border-color: var(--text-primary);
  transform: scale(1.18);
  box-shadow: 0 0 15px var(--gold-soft);
}
.cm-join-submit {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  border: none;
  border-radius: var(--r-md);
  color: #0a0a0f;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--t-fast);
}
.cm-join-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px var(--gold-glow);
}
.cm-join-error {
  display: none;
  color: #fca5a5;
  font-size: .82rem;
  margin-top: 12px;
}

/* ══════════════════════════════════════════════════════════════
   YOUTUBE — FREE COURSES
   ══════════════════════════════════════════════════════════════ */
.yt-channel-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--gold-soft), rgba(239,68,68,.06));
  border: 1px solid var(--border-gold);
  border-radius: var(--r-xl);
  flex-wrap: wrap;
}
.yt-channel-info {
  display: flex;
  align-items: center;
  gap: 16px;
}
.yt-channel-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.8rem;
  box-shadow: 0 0 30px rgba(239,68,68,.5);
  flex-shrink: 0;
}
.yt-channel-meta h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.4px;
  margin-bottom: .2rem;
  color: var(--text-primary);
}
.yt-channel-meta p {
  font-size: .82rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}
.yt-subscribe-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: .8rem 1.6rem;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  border-radius: var(--r-full);
  font-family: inherit;
  font-size: .9rem;
  font-weight: 800;
  text-decoration: none;
  transition: var(--t-mid);
  box-shadow: 0 8px 24px rgba(239,68,68,.4);
}
.yt-subscribe-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(239,68,68,.6);
}
.yt-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.yt-videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2rem;
}
.yt-video-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--t-mid);
  opacity: 0;
  animation: fadeUp .5s cubic-bezier(.16,1,.3,1) forwards;
}
.yt-video-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-lg), 0 0 30px var(--gold-soft);
}
.yt-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-base);
  overflow: hidden;
}
.yt-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.16,1,.3,1);
  display: block;
}
.yt-video-card:hover .yt-thumb img { transform: scale(1.06); }
.yt-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.7));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--t-mid);
}
.yt-video-card:hover .yt-thumb-overlay { opacity: 1; }
.yt-play-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: rgba(239,68,68,.95);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  transform: scale(.85);
  transition: var(--t-mid);
  padding-left: 4px;
}
.yt-video-card:hover .yt-play-icon { transform: scale(1); }
.yt-duration {
  position: absolute;
  bottom: 8px; right: 8px;
  padding: 2px 8px;
  background: rgba(0,0,0,.9);
  color: #fff;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 700;
  border-radius: 4px;
}
.yt-card-body { padding: .9rem 1rem 1rem; }
.yt-card-title {
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: .5rem;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: var(--t-fast);
}
.yt-video-card:hover .yt-card-title { color: var(--gold-primary); }
.yt-card-meta {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .74rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.yt-load-more-wrap { text-align: center; padding: 1rem; }

/* ══════════════════════════════════════════════════════════════
   SUPPORT / DONATE / PROFILE
   ══════════════════════════════════════════════════════════════ */
.support-wrapper { max-width: 720px; margin: 0 auto; }
.support-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.support-card iframe {
  display: block;
  width: 100%;
  min-height: 900px;
  border: none;
  background: #fff;
}
@media (max-width: 640px) {
  .support-card iframe { min-height: 1100px; }
}

.donate-wrapper-cine {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.donate-message-cine {
  padding: 2rem;
  background: linear-gradient(135deg, rgba(236,72,153,.08), var(--gold-soft));
  border: 1px solid rgba(236,72,153,.2);
  border-radius: var(--r-xl);
  text-align: center;
}
.dm-icon {
  width: 64px; height: 64px;
  margin: 0 auto 1.2rem;
  background: linear-gradient(135deg, var(--accent-pink), var(--gold-primary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.6rem;
  box-shadow: 0 0 40px rgba(236,72,153,.4);
  animation: heartBeat 2s infinite;
}
.donate-message-cine h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -.5px;
  color: var(--text-primary);
}
.donate-message-cine p {
  font-size: .92rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: .8rem;
}
.donate-message-cine strong { color: var(--accent-pink); font-weight: 700; }
.donate-payment-cine {
  padding: 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-xl);
  text-align: center;
  box-shadow: 0 0 40px var(--gold-soft);
}
.upi-block-cine {
  padding: 1.5rem;
  background: var(--gold-soft);
  border: 2px dashed var(--border-gold);
  border-radius: var(--r-lg);
  margin-bottom: 1.2rem;
  transition: var(--t-mid);
}
.upi-block-cine:hover {
  box-shadow: 0 0 30px var(--gold-soft);
}
.upi-label-cine {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .8px;
  font-weight: 700;
  margin-bottom: .6rem;
}
.upi-id-cine {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold-primary);
  margin-bottom: 1rem;
  word-break: break-all;
}
.btn-copy-upi {
  padding: .6rem 1.2rem;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-full);
  color: var(--gold-primary);
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--t-mid);
}
.btn-copy-upi:hover {
  background: var(--gold-primary);
  color: #0a0a0f;
  box-shadow: 0 0 25px var(--gold-glow);
  transform: translateY(-2px);
}
.thanks-cine {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: .85rem;
  color: var(--text-muted);
}
.thanks-cine i { color: var(--gold-primary); }

.profile-card-cine {
  max-width: 560px;
  margin: 0 auto;
  padding: 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-xl);
  text-align: center;
  box-shadow: 0 0 40px var(--gold-soft);
}
.profile-avatar-cine {
  width: 100px; height: 100px;
  border-radius: 50%;
  border: 3px solid var(--gold-primary);
  box-shadow: 0 0 30px var(--gold-glow);
  margin-bottom: 1rem;
  object-fit: cover;
}
.profile-card-cine h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: .3rem;
  color: var(--text-primary);
}
.profile-card-cine > p {
  color: var(--text-muted);
  font-size: .85rem;
  font-family: var(--font-mono);
  margin-bottom: 1.5rem;
}
.profile-form-cine { text-align: left; }
.form-group-cine { margin-bottom: 1rem; }
.form-group-cine label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: .4rem;
  letter-spacing: .3px;
}
.form-group-cine input,
.form-group-cine select,
.form-group-cine textarea {
  width: 100%;
  padding: .75rem 1rem;
  background: var(--bg-base);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: .9rem;
  outline: none;
  transition: var(--t-mid);
}
.form-group-cine input:focus,
.form-group-cine select:focus,
.form-group-cine textarea:focus {
  border-color: var(--border-gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.form-group-cine textarea { resize: vertical; min-height: 80px; }

/* ══════════════════════════════════════════════════════════════
   MODALS
   ══════════════════════════════════════════════════════════════ */
.modal-overlay-cine {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(5,5,10,.85);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity .3s;
}
.modal-overlay-cine.show { display: flex; opacity: 1; }
.modal-content-cine {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(.94) translateY(20px);
  transition: transform .35s cubic-bezier(.16,1,.3,1);
  box-shadow: var(--shadow-lg), 0 0 40px var(--gold-soft);
}
.modal-overlay-cine.show .modal-content-cine {
  transform: scale(1) translateY(0);
}
.modal-header-cine {
  padding: 1.1rem 1.4rem;
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header-cine h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}
.modal-header-cine h3 i { color: var(--gold-primary); }
.close-modal-cine {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--t-mid);
}
.close-modal-cine:hover {
  background: rgba(239,68,68,.1);
  color: #ef4444;
  transform: rotate(90deg);
}
.modal-body-cine { padding: 1.4rem; overflow-y: auto; }
.image-viewer-cine {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}
.image-viewer-cine img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-gold);
}
.image-viewer-cine .close-modal-cine {
  position: absolute;
  top: -45px; right: 0;
  background: rgba(255,255,255,.15);
  color: #fff;
}

/* AI Answer display */
.ai-answer-card {
  padding: 1.2rem;
  background: linear-gradient(135deg, var(--gold-soft), rgba(124,58,237,.03));
  border: 1px solid var(--border-gold);
  border-radius: var(--r-md);
  margin-bottom: 1rem;
}
.ai-answer-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-soft);
}
.ai-answer-header img {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid var(--border-gold);
}
.ai-answer-header .name {
  font-weight: 700;
  font-size: .94rem;
  color: var(--gold-primary);
}
.ai-answer-header .title {
  font-size: .75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.ai-badge {
  padding: .25rem .7rem;
  background: rgba(16,185,129,.15);
  color: var(--accent-green);
  border-radius: var(--r-full);
  font-size: .68rem;
  font-weight: 700;
}
.ai-answer-text {
  font-size: .92rem;
  line-height: 1.8;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: var(--font-mono);
}
.ai-answer-footer {
  display: flex;
  gap: .5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
  flex-wrap: wrap;
}
.ai-answer-footer button {
  padding: .5rem 1rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-full);
  color: var(--text-primary);
  font-family: inherit;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--t-fast);
}
.ai-answer-footer button:hover {
  background: var(--gold-soft);
  border-color: var(--border-gold);
  color: var(--gold-primary);
}
.ai-thinking {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: .9rem;
}
.ai-thinking-dots {
  display: inline-flex;
  gap: 4px;
}
.ai-thinking-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold-primary);
  display: block;
  animation: dotBounce 1.4s infinite;
}
.ai-thinking-dots span:nth-child(2) { animation-delay: .2s; }
.ai-thinking-dots span:nth-child(3) { animation-delay: .4s; }

/* ══════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════ */
.footer-cine {
  margin-top: auto;
  padding: 2rem 1.6rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-soft);
  text-align: center;
  position: relative;
  z-index: 2;
}
.footer-content { max-width: 600px; margin: 0 auto; }
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}
.footer-brand .logo-brand-main { font-size: 1rem; }
.footer-tagline {
  font-size: .85rem;
  color: var(--text-secondary);
  margin-bottom: .5rem;
}
.footer-copy {
  font-size: .78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .hero-cinematic { padding: 3rem 1.2rem 2rem; }
  .hero-title { font-size: 2.2rem; letter-spacing: -1px; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .level-track-preview { grid-template-columns: repeat(2, 1fr); }
  .features-cinematic { grid-template-columns: 1fr; }
  .lb-podium-card.gold { transform: none; }
  .chat-shell-cine { grid-template-columns: 1fr; height: min(85vh, 720px); }
  .chat-sidebar-cine {
    position: absolute;
    inset: 0 auto 0 0;
    width: 280px;
    z-index: 60;
    transform: translateX(-102%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    box-shadow: 12px 0 40px rgba(0,0,0,.7);
  }
  .chat-sidebar-cine.open { transform: translateX(0); }
  .cs-close-btn { display: flex; }
  .cm-menu-btn { display: flex; }
  .cm-msg-col { max-width: 88%; }
  .cm-jump-btn { right: 14px; bottom: 108px; }
}

@media (max-width: 640px) {
  main { margin-top: 160px; padding: 0 1rem; }
  .nav-container {
    flex-direction: column;
    align-items: stretch;
    gap: .6rem;
    padding: .7rem 1rem;
  }
  .logo { justify-content: center; }
  .nav-links { justify-content: center; }
  .nav-item { padding: .45rem .7rem; font-size: .78rem; }
  .nav-item span.nav-text { display: none; }
  .nav-actions { justify-content: center; }
  .hero-cinematic { padding: 2.5rem 1rem 1.5rem; }
  .hero-title { font-size: 1.9rem; }
  .hero-sub { font-size: .92rem; }
  .btn-hero-primary, .btn-hero-ghost {
    padding: .8rem 1.2rem;
    font-size: .85rem;
    width: 100%;
    justify-content: center;
  }
  .hero-ctas { flex-direction: column; }
  .stats-strip { grid-template-columns: 1fr; }
  .level-track-preview { grid-template-columns: repeat(2, 1fr); }
  .levels-grid-cine { grid-template-columns: 1fr; }
  .doubts-grid-cine { grid-template-columns: 1fr; }
  .python-header-content { flex-direction: column; text-align: center; }
  .python-icon-big { margin: 0 auto; }
  .python-filter-bar { flex-direction: column; align-items: stretch; }
  .filter-search-cine { max-width: none; }
  .problem-navigation { grid-template-columns: 1fr; gap: .6rem; }
  .problem-nav-btn.all-levels { order: 3; }
  .modal-content-cine { max-width: 100%; }
  .profile-card-cine { padding: 1.5rem; }
  .login-card { padding: 32px 22px; }
  .login-features { grid-template-columns: 1fr; }
  .footer-cine { padding: 1.5rem 1rem; }
  .yt-channel-banner { flex-direction: column; text-align: center; padding: 1.2rem; }
  .yt-channel-info { flex-direction: column; text-align: center; }
  .yt-subscribe-btn { width: 100%; justify-content: center; }
  .yt-videos-grid { grid-template-columns: 1fr; gap: 1rem; }
  .yt-filter-bar { flex-direction: column; align-items: stretch; }
  .universal-back-btn { top: 155px; left: 12px; padding: .5rem .9rem; font-size: .78rem; }
}
/* ══════════════════════════════════════════════════════════════
   CHAT WITH CHAIRMAN — WhatsApp-style 1-on-1
   ══════════════════════════════════════════════════════════════ */

.chairman-chat-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  height: min(85vh, 750px);
  min-height: 550px;
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 40px var(--gold-soft);
}

/* ═══ HEADER ═══ */
.cc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-surface-2);
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
  z-index: 5;
  position: relative;
}
.cc-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.cc-avatar-wrap { position: relative; }
.cc-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a0a0f;
  font-size: 1.3rem;
  box-shadow: 0 0 25px var(--gold-glow);
}
.cc-online-dot {
  position: absolute;
  bottom: 0; right: 0;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent-green);
  border: 3px solid var(--bg-surface-2);
  animation: pulseGreen 2s ease-in-out infinite;
}
@keyframes pulseGreen {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,.7); }
  50% { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
}
.cc-header-info { min-width: 0; }
.cc-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.cc-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .74rem;
  color: var(--accent-green);
  font-family: var(--font-mono);
}
.cc-status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
}
.cc-status.typing { color: var(--gold-primary); }
.cc-status.typing .cc-status-dot { background: var(--gold-primary); }

.cc-header-actions { display: flex; gap: .2rem; }
.cc-icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--t-fast);
  flex-shrink: 0;
}
.cc-icon-btn:hover {
  background: var(--gold-soft);
  color: var(--gold-primary);
}
.cc-icon-btn.active {
  background: var(--gold-soft);
  color: var(--gold-primary);
}

/* ═══ HISTORY PANEL ═══ */
.cc-history-panel {
  position: absolute;
  top: 0; right: 0;
  width: 320px;
  height: 100%;
  background: var(--bg-surface-2);
  border-left: 1px solid var(--border-gold);
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.16,1,.3,1);
  z-index: 10;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px rgba(0,0,0,.4);
}
.cc-history-panel.open { transform: translateX(0); }
.cc-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
}
.cc-history-head h3 {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-primary);
}
.cc-history-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}
.cc-history-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.cc-history-empty i {
  font-size: 2rem;
  opacity: .3;
  margin-bottom: 8px;
  display: block;
}
.cc-history-item {
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: var(--t-fast);
  margin-bottom: 6px;
}
.cc-history-item:hover {
  background: var(--gold-soft);
  border-color: var(--border-gold);
  transform: translateX(-3px);
}
.cc-history-item-title {
  font-weight: 700;
  font-size: .85rem;
  color: var(--text-primary);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cc-history-item-preview {
  font-size: .75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cc-history-item-time {
  font-size: .68rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  margin-top: 4px;
}

/* ═══ CHAT BODY ═══ */
.cc-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scroll-behavior: smooth;
  background:
    radial-gradient(circle at 15% 20%, var(--gold-soft) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(124,58,237,.04) 0%, transparent 40%),
    var(--bg-base);
}

/* Message row */
.cc-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 100%;
  animation: msgIn .3s cubic-bezier(.16,1,.3,1);
  margin-bottom: 2px;
}
.cc-msg.cc-mine { flex-direction: row-reverse; }

.cc-msg-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: .75rem;
  font-weight: 800;
}
.cc-msg-avatar.cc-chairman {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  color: #0a0a0f;
  box-shadow: 0 0 15px var(--gold-glow);
}
.cc-msg-avatar.cc-user {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  color: #fff;
}
.cc-msg-avatar.hidden { visibility: hidden; }

.cc-msg-bubble {
  max-width: min(560px, 78%);
  padding: 10px 14px;
  border-radius: 16px 16px 16px 4px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-soft);
  color: var(--text-primary);
  font-size: .92rem;
  line-height: 1.55;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: anywhere;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.cc-msg.cc-mine .cc-msg-bubble {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  color: #0a0a0f;
  border-radius: 16px 16px 4px 16px;
  border-color: transparent;
  font-weight: 500;
}
.cc-msg.cc-chairman .cc-msg-bubble {
  background: var(--bg-surface-2);
  border-color: var(--border-gold);
  border-left: 3px solid var(--gold-primary);
  border-radius: 4px 16px 16px 4px;
}
.cc-msg.cc-mine .cc-msg-bubble a { color: #003344; }
.cc-msg-bubble a {
  color: var(--gold-primary);
  text-decoration: underline;
  word-break: break-all;
}
.cc-msg-bubble code {
  font-family: var(--font-mono);
  font-size: .85em;
  background: rgba(0,0,0,.15);
  padding: 2px 6px;
  border-radius: 4px;
}
[data-theme="dark"] .cc-msg-bubble code { background: rgba(0,0,0,.4); }
.cc-msg-bubble pre {
  background: rgba(0,0,0,.25);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 8px 0;
  font-family: var(--font-mono);
  font-size: .82rem;
  overflow-x: auto;
  white-space: pre;
  line-height: 1.6;
}
[data-theme="dark"] .cc-msg-bubble pre { background: rgba(0,0,0,.5); }
.cc-msg.cc-mine .cc-msg-bubble pre {
  background: rgba(0,0,0,.2);
  color: #0a0a0f;
}
.cc-msg-text { white-space: pre-wrap; }

/* Meta line — time + ticks */
.cc-msg-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .68rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-family: var(--font-mono);
  justify-content: flex-end;
}
.cc-msg.cc-mine .cc-msg-meta { color: rgba(0,0,0,.55); }
.cc-msg-meta i {
  font-size: .65rem;
  color: var(--accent-cyan);
}
.cc-msg.cc-mine .cc-msg-meta i { color: #003344; }

/* Typing cursor in AI message */
.cc-typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--gold-primary);
  margin-left: 2px;
  vertical-align: middle;
  animation: blinkCursor .8s infinite;
}
@keyframes blinkCursor {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Date separator */
.cc-date-sep {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px 0 12px;
}
.cc-date-sep span {
  padding: 4px 14px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-full);
  font-size: .68rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ═══ QUICK SUGGESTIONS ═══ */
.cc-suggestions {
  display: flex;
  gap: .5rem;
  padding: 8px 18px;
  overflow-x: auto;
  background: var(--bg-surface-2);
  border-top: 1px solid var(--border-soft);
  flex-shrink: 0;
  scrollbar-width: none;
}
.cc-suggestions::-webkit-scrollbar { display: none; }
.cc-suggestion {
  padding: .5rem .9rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-full);
  color: var(--gold-primary);
  font-family: inherit;
  font-size: .82rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--t-fast);
  flex-shrink: 0;
}
.cc-suggestion:hover {
  background: var(--gold-primary);
  color: #0a0a0f;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--gold-glow);
}
.cc-suggestion:disabled {
  opacity: .4;
  cursor: not-allowed;
}

/* ═══ TYPING BAR ═══ */
.cc-typing-bar {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  background: var(--bg-surface-2);
  border-top: 1px solid var(--border-soft);
  flex-shrink: 0;
}
.cc-typing-bar.show { display: flex; }
.cc-typing-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a0a0f;
  font-size: .75rem;
  flex-shrink: 0;
}
.cc-typing-bubble {
  display: flex;
  gap: 4px;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
}
.cc-typing-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold-primary);
  animation: ccTypingBounce 1.4s infinite;
}
.cc-typing-dot:nth-child(2) { animation-delay: .2s; }
.cc-typing-dot:nth-child(3) { animation-delay: .4s; }
@keyframes ccTypingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30% { transform: translateY(-5px); opacity: 1; }
}
.cc-typing-text {
  font-size: .76rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ═══ COMPOSER ═══ */
.cc-composer-wrap {
  position: relative;
  padding: 10px 14px 14px;
  background: var(--bg-surface-2);
  border-top: 1px solid var(--border-soft);
  flex-shrink: 0;
}
.cc-composer {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  background: var(--bg-base);
  border: 1px solid var(--border-soft);
  border-radius: 24px;
  padding: 5px 8px;
  transition: var(--t-fast);
}
.cc-composer:focus-within {
  border-color: var(--border-gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.cc-composer textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: .92rem;
  resize: none;
  max-height: 120px;
  line-height: 1.5;
  padding: 10px 4px;
  overflow-y: auto;
}
.cc-composer textarea::placeholder { color: var(--text-dim); }
.cc-send-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  color: #0a0a0f;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: .92rem;
  transition: var(--t-fast);
}
.cc-send-btn:hover:not(:disabled) {
  transform: scale(1.08);
  box-shadow: 0 0 22px var(--gold-glow);
}
.cc-send-btn:disabled {
  opacity: .3;
  cursor: not-allowed;
  background: var(--bg-surface-3);
  color: var(--text-muted);
}

/* Emoji panel */
.cc-emoji-panel {
  position: absolute;
  bottom: calc(100% - 4px);
  left: 14px;
  width: min(340px, calc(100% - 28px));
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-md);
  padding: 10px;
  display: none;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  z-index: 50;
}
.cc-emoji-panel.show { display: grid; }
.cc-emoji-panel button {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 6px 2px;
  border-radius: 6px;
  transition: var(--t-fast);
  line-height: 1;
}
.cc-emoji-panel button:hover {
  background: var(--gold-soft);
  transform: scale(1.2);
}

/* Attached image preview */
.cc-attach-preview {
  display: none;
  position: relative;
  margin-bottom: 8px;
  padding: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-md);
  max-width: 160px;
}
.cc-attach-preview.show { display: block; }
.cc-attach-preview img {
  width: 100%;
  border-radius: 8px;
  display: block;
}
.cc-attach-remove {
  position: absolute;
  top: -8px; right: -8px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent-red);
  color: #fff;
  border: 2px solid var(--bg-surface);
  cursor: pointer;
  font-size: .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 640px) {
  .chairman-chat-shell {
    height: calc(100vh - 200px);
    min-height: 500px;
    border-radius: var(--r-lg);
  }
  .cc-body { padding: 14px 10px; }
  .cc-msg-bubble { max-width: 82%; }
  .cc-history-panel { width: 100%; }
  .cc-header { padding: 10px 12px; }
  .cc-avatar { width: 40px; height: 40px; font-size: 1.1rem; }
  .cc-name { font-size: .94rem; }
  .cc-status { font-size: .7rem; }
  .cc-suggestion { font-size: .78rem; padding: .45rem .8rem; }
  .cc-composer-wrap { padding: 8px 10px 12px; }
  .cc-icon-btn { width: 34px; height: 34px; }
}

/* ═══ DARK MODE SPECIFIC ═══ */
[data-theme="dark"] .cc-msg.cc-chairman .cc-msg-bubble {
  background: rgba(212,175,55,.05);
}
[data-theme="dark"] .cc-typing-bubble {
  background: rgba(212,175,55,.05);
}
