/*******************************************************
* Saphelia MVP — Base Styles (Sand)
* © Eivind André Evensen, 2025 — All rights reserved.
* Redistribution or substantial reuse requires permission
* and attribution to the author.
*******************************************************/

/* ---------- Design tokens ---------- */
:root{
/* Sand palette */
--bg-1: #EFE2CC;
--bg-2: #E6D5B6;
--bg-3: #D9C39A;

--text: #1f2937; /* slate-800 */
--muted: #475569; /* slate-600 */
--accent: #d4b48a; /* sand gold */

--card: #FFF9EF; /* light sand card */
--card-soft: #FFF4E3; /* softer card */
--border: rgba(120,90,50,.28);

/* Pills */
--pill-bg: #11161b; /* dark base for contrast */
--pill-off-blue: #1e3a8a;
--pill-off-blue-border: #60a5fa;
--pill-on-green: #166534;
--pill-on-green-border: #22c55e;

/* Troubleshooting pill (yellow OFF / pink ON) */
--pill-tr-off: #b45309;
--pill-tr-off-border: #f59e0b;
--pill-tr-on: #9d174d;
--pill-tr-on-border: #f472b6;

/* Icons in nav lists */
--icon: 36px;
--icon-active: 44px;
}

/* ---------- Base ---------- */
*{ box-sizing:border-box }
html,body{ height:100% }

body{
margin:0;
color:var(--text);
font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
background: linear-gradient(160deg, var(--bg-1) 0%, var(--bg-2) 50%, var(--bg-3) 100%);
}

a{ color:#b88f5c; text-decoration:none }
a:hover{ text-decoration:underline }

.app{
display:grid;
grid-template-rows:auto auto 1fr; /* header, (opt) trouble, main */
min-height:100vh;
}

/* ---------- Header ---------- */
.header{
display:flex; gap:16px; align-items:center; justify-content:space-between;
padding:12px 16px;
background:var(--card);
border-bottom:1px solid var(--border);
}

.brand{ display:flex; gap:12px; align-items:center }
.brand img{
width:80px; height:80px; border-radius:16px;
object-fit:contain; image-rendering:auto;
}
.brand h1{ margin:0; font-size:20px; letter-spacing:.2px; color:var(--text) }
.tagline{ color:var(--muted); font-size:12px; margin-top:2px }

/* center cluster */
.mast{ display:flex; gap:10px; flex-wrap:wrap; align-items:center }
.mast .group{
display:flex; gap:6px; align-items:center;
background:var(--card);
border:1px solid var(--border);
border-radius:999px; padding:6px 8px;
}
.mast .group input{
background:transparent; border:0; outline:none; color:var(--text)
}
.flag{ cursor:pointer; font-size:16px; filter:saturate(.95); transition:transform .15s ease }
.flag:hover{ transform:scale(1.12) }

/* Right banner with subtle pulse */
.bannerRight{ display:flex; align-items:center; justify-content:flex-end; margin-left:auto }
.bannerRight img{
height:72px; width:auto; border-radius:12px; object-fit:contain;
animation:pulse 4s ease-in-out infinite;
}
@keyframes pulse{ 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.05);opacity:.92} }

/* ---------- Pills ---------- */
.pill{
font-size:12px; padding:4px 10px; border-radius:999px;
border:1px solid var(--border);
background:var(--pill-bg); color:#e6eefc;
user-select:none; cursor:pointer;
transition:transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.pill:hover{ transform:translateY(-1px) }

/* Blue = OFF */
.pill.off{
background: linear-gradient(180deg, rgba(30,58,138,.35), rgba(17,24,39,.6));
border-color: var(--pill-off-blue-border);
color:#cfe2ff;
}
/* Green = ON */
.pill.on{
background: linear-gradient(180deg, rgba(22,101,52,.35), rgba(17,24,39,.6));
border-color: var(--pill-on-green-border);
color:#d1fae5;
}

/* Troubleshooting pill (Yellow OFF / Pink ON) */
.pill.tr-off{
background: linear-gradient(180deg, rgba(180,83,9,.35), rgba(17,24,39,.6));
border-color: var(--pill-tr-off-border);
color:#fde68a;
}
.pill.tr-on{
background: linear-gradient(180deg, rgba(157,23,77,.35), rgba(17,24,39,.6));
border-color: var(--pill-tr-on-border);
color:#fbcfe8;
}

/* ---------- Troubleshooting bar (hidden until pink pill) ---------- */
.troubleBar{
display:none; /* JS toggles to flex */
gap:8px; align-items:center; justify-content:flex-start;
padding:10px 16px;
background:var(--card);
border-bottom:1px solid var(--border);
}
.troubleBar .modes{ display:flex; gap:6px }
.troubleBar .modes button{
border:1px solid var(--border); background:var(--card); color:var(--text);
border-radius:8px; padding:6px 8px; cursor:pointer;
}
.troubleBar .modes button.active{ border-color:var(--accent) }
.troubleBar input{
flex:1; border-radius:10px; border:1px solid var(--border);
background:var(--card); color:var(--text); padding:10px;
}

/* ---------- Main ---------- */
.main{ display:grid; grid-template-columns:300px 1fr; gap:14px; padding:14px }

.sidebar{
background:var(--card);
border:1px solid var(--border);
border-radius:16px;
padding:12px; height:calc(100vh - 150px); overflow:auto;
}

.content{ display:flex; flex-direction:column; gap:12px; height:calc(100vh - 150px) }

.section h3{ margin:6px 0; font-size:14px; color:#6b5a3e; letter-spacing:.2px }

/* details / lists */
.details{
border:1px solid var(--border);
border-radius:12px;
margin:8px 0;
background:var(--card);
}
.details summary{
cursor:pointer; padding:8px 10px; color:var(--text); list-style:none;
}
.details summary::-webkit-details-marker{ display:none }
.details[open] summary{ color:var(--text); text-shadow:0 0 12px rgba(212,180,138,.25) }

.navlist{ display:flex; flex-direction:column; gap:8px; padding:8px }
.navlist button{
display:flex; gap:12px; align-items:center; justify-content:flex-start;
background:var(--card); border:1px solid var(--border); border-radius:12px;
padding:10px; cursor:pointer;
transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.navlist img{
width:var(--icon); height:var(--icon); border-radius:10px;
object-fit:cover; image-rendering:auto;
box-shadow:0 0 0 1px rgba(120,90,50,.12) inset;
transition:width .18s ease, height .18s ease;
}
.navlist button:hover{ transform:translateY(-1px) scale(1.015) }
.navlist button:hover img{ width:var(--icon-active); height:var(--icon-active) }
.navlist button.active{
border-color:var(--accent);
background: radial-gradient(400px 120px at 10% 0%, rgba(212,180,138,.15), rgba(0,0,0,0) 65%);
box-shadow:0 8px 22px rgba(0,0,0,.08);
}
.navlist button.active img{ width:var(--icon-active); height:var(--icon-active) }
.navlist button span{ font-weight:600; letter-spacing:.15px; color:var(--text) }

/* ---------- Special Modes ---------- */
#specialWrap{
background: radial-gradient(1200px 400px at 0% 0%, rgba(99,102,241,.08), rgba(0,0,0,0) 60%);
border-radius:12px; border:1px solid var(--border);
padding:6px 6px 10px; margin-top:8px;
}
#navSpecial{
display:grid; gap:10px; padding:8px;
grid-template-columns: repeat( auto-fill, minmax(180px, 1fr) );
}
#navSpecial button{
position:relative; overflow:hidden;
background:var(--card);
border-image: linear-gradient(135deg, rgba(212,180,138,.35), rgba(99,102,241,.35)) 1;
border:1px solid rgba(212,180,138,.35);
}
#navSpecial button::after{
content:''; position:absolute; inset:0; pointer-events:none;
background:linear-gradient(180deg, rgba(99,102,241,.06), rgba(0,0,0,0));
}
#navSpecial button.active{
background:linear-gradient(180deg, rgba(99,102,241,.10), rgba(0,0,0,0));
border-color:#a78bfa;
box-shadow:0 0 0 1px rgba(167,139,250,.40) inset, 0 10px 28px rgba(99,102,241,.12);
}
#navSpecial button span{ font-weight:700; color:var(--text) }

/* ---------- Chat header (tall avatar) ---------- */
.chatHeader{
display:flex; align-items:center; gap:16px;
background:var(--card); border:1px solid var(--border);
border-radius:16px; padding:10px 12px;
}
.chatHeader .avatarWrap{
display:flex; align-items:flex-end; justify-content:center;
width:120px; height:180px; border-radius:12px; overflow:hidden;
background:var(--card-soft); border:1px solid var(--border);
}
.chatHeader img{ width:100%; height:100%; object-fit:contain; image-rendering:auto }
.chatMeta .title{ font-weight:700; font-size:16px; color:var(--text) }
.chatMeta .sub{ font-size:12px; color:var(--muted) }

/* ---------- Chat ---------- */
.chat{
display:flex; flex-direction:column; gap:10px;
background:var(--card); border:1px solid var(--border);
border-radius:16px; padding:12px; flex:1; min-height:300px; overflow:auto;
}
.msg{ display:flex; gap:10px; align-items:flex-start }
.msg img{ width:36px; height:36px; border-radius:10px; object-fit:cover }
.msg .bubble{
background:var(--card);
border:1px solid var(--border);
border-radius:12px; padding:10px; max-width:80%;
color:var(--text);
}
.msg.user .bubble{ background:var(--card-soft) }

/* typing dots */
.typing{ display:inline-block; min-width:20px }
.dot{ display:inline-block; width:6px; height:6px; margin:0 2px; border-radius:50%; background:#b4895a; animation:blink 1.2s infinite }
.dot:nth-child(2){ animation-delay:.2s } .dot:nth-child(3){ animation-delay:.4s }
@keyframes blink{ 0%,80%,100%{opacity:.2} 40%{opacity:1} }

/* composer */
.btn{
border:1px solid var(--border); background:var(--card); color:var(--text);
border-radius:10px; padding:10px 12px; cursor:pointer;
}
.btn.primary{ border-color:var(--accent) }

/* banners */
.banner{ border-radius:12px; padding:10px; margin-top:6px }
.banner.ok{ background:#F0FFF6; border:1px solid rgba(34,197,94,.35); color:#064e3b }
.banner.err{ background:#FFF5F5; border:1px solid rgba(244,63,94,.35); color:#7f1d1d }
.small{ font-size:12px; color:var(--muted) }

/* --- Bigger left logo, stacked with tagline --- */
.brand {
display: flex;
flex-direction: column; /* tagline under image */
align-items: flex-start;
gap: 6px;
}
.brand img{
width: 140px !important; /* dominate the left */
height: 140px !important;
border-radius: 18px !important;
object-fit: contain !important;
}
.brand h1{ display: none !important; } /* title removed */

/* Keep tagline readable on sand */
.brand .tagline{
font-size: 13px;
color: var(--muted);
}

/* --- Much bigger right banner --- */
.bannerRight img{
height: 150px !important; /* was ~70–96 */
width: auto !important;
border-radius: 14px;
object-fit: contain !important;
animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse{
0%,100%{ transform:scale(1); opacity:1 }
50% { transform:scale(1.05); opacity:.92 }
}

/* --- Troubleshooting mode buttons as pills (yellow=OFF / pink=ON) --- */
.troubleBar .modes .pill{
font-size: 12px;
padding: 4px 12px;
border-radius: 999px;
border: 1px solid var(--pill-tr-off-border);
background: linear-gradient(180deg, rgba(180,83,9,.35), rgba(17,24,39,.6));
color: #fde68a;
cursor: pointer;
user-select: none;
transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.troubleBar .modes .pill:hover{ transform: translateY(-1px); }

/* active = pink */
.troubleBar .modes .pill.tr-on{
background: linear-gradient(180deg, rgba(157,23,77,.35), rgba(17,24,39,.6));
border-color: var(--pill-tr-on-border);
color: #fbcfe8;
}

/* --- Sidebar footer row --- */
.sidebarFooter{
display: flex;
gap: 10px;
align-items: center;
justify-content: space-between;
margin-top: 10px;
padding-top: 8px;
border-top: 1px solid var(--border);
font-size: 12px;
}
.sidebarFooter a{ color: #b88f5c; }

/* === Force persistent left sidebar on all devices === */
:root{
--sidebar-w: 280px; /* desktop/default */
}

.main{
/* Use flex so we don’t collapse to single column */
display: flex !important;
gap: 14px;
padding: 14px;
}

.sidebar{
flex: 0 0 var(--sidebar-w);
width: var(--sidebar-w);
/* keep it visible while content scrolls */
position: sticky;
top: 12px; /* below header */
height: calc(100dvh - 24px - 12px); /* viewport minus padding */
overflow: auto;
-webkit-overflow-scrolling: touch;
}

.content{
flex: 1 1 auto;
min-width: 0; /* prevents overflow on small screens */
height: auto; /* chat can manage its own height */
}

/* Tighter sidebar on narrow phones, but still left */
@media (max-width: 768px){
:root{ --sidebar-w: 240px; }
}

/* If any old grid rules remain, nullify them hard */
.main{ grid-template-columns: unset !important; }

/* ============================================
   SAND THEME OVERRIDES (migrated from HTML)
   ============================================ */

:root{
--bg-1:#EFE2CC; --bg-2:#E6D5B6; --bg-3:#D9C39A;
--text:#1f2937; --muted:#475569; --accent:#d4b48a;
--card:#FFF9EF; --card-soft:#FFF4E3; --border:rgba(120,90,50,.28);
--pill-bg:#11161b;
--pill-off-blue:#1e3a8a; --pill-off-blue-border:#60a5fa;
--pill-on-green:#166534; --pill-on-green-border:#22c55e;
--pill-tr-off:#b45309; --pill-tr-off-border:#f59e0b;
--pill-tr-on:#9d174d; --pill-tr-on-border:#f472b6;
--hero-h:128px;
--bubble-time:#64748b;
}

/* Dashboard Card Hover Effects */
.dashboard .dash-card {
  transition: all 0.3s ease !important;
}

/* Curriculum Banner Hover Glow */
.dashboard .curriculum-banner:hover {
  transform: translateY(-2px);
  border-color: #d4a574 !important;
  box-shadow: 0 0 25px #d4a574, 0 0 40px rgba(212, 165, 116, 0.6) !important;
}

.dashboard .dash-card:hover {
  transform: translateY(-3px) !important;
  border-width: 3px !important;
}

.dashboard .dash-card:nth-child(1):hover {
  border-color: #8b5cf6 !important;
  box-shadow: 0 0 25px rgba(139,92,246,0.5), 0 0 40px rgba(139,92,246,0.3) !important;
}

.dashboard .dash-card:nth-child(2):hover {
  border-color: #22c55e !important;
  box-shadow: 0 0 25px rgba(34,197,94,0.5), 0 0 40px rgba(34,197,94,0.3) !important;
}

.dashboard .dash-card:nth-child(3):hover {
  border-color: #fb923c !important;
  box-shadow: 0 0 25px rgba(251,146,60,0.5), 0 0 40px rgba(251,146,60,0.3) !important;
}

.dashboard .dash-card:nth-child(4):hover {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 25px rgba(59,130,246,0.5), 0 0 40px rgba(59,130,246,0.3) !important;
}

/* Subject Button Hover Effects */
.dashboard .subject-btn {
  transition: all 0.3s ease !important;
}

.dashboard .subject-btn:hover {
  transform: scale(1.08) !important;
  border-width: 3px !important;
}

.dashboard .subject-btn:nth-child(1):hover {
  box-shadow: 0 0 20px #8b5cf6, 0 0 35px rgba(139,92,246,0.6) !important;
}

.dashboard .subject-btn:nth-child(2):hover {
  box-shadow: 0 0 20px #22c55e, 0 0 35px rgba(34,197,94,0.6) !important;
}

.dashboard .subject-btn:nth-child(3):hover {
  box-shadow: 0 0 20px #fb923c, 0 0 35px rgba(251,146,60,0.6) !important;
}

.dashboard .subject-btn:nth-child(4):hover {
  box-shadow: 0 0 20px #3b82f6, 0 0 35px rgba(59,130,246,0.6) !important;
}

/* Quick Action Button Hovers */
.dashboard button[onclick*="wellbeing"]:hover {
  box-shadow: 0 0 20px #a855f7, 0 0 35px rgba(168,85,247,0.5) !important;
  transform: translateY(-2px) !important;
}

.dashboard button[onclick*="career"]:hover {
  box-shadow: 0 0 20px #f59e0b, 0 0 35px rgba(245,158,11,0.5) !important;
  transform: translateY(-2px) !important;
}

.dashboard button[onclick*="pe_sport"]:hover {
  box-shadow: 0 0 20px #0ea5e9, 0 0 35px rgba(14,165,233,0.5) !important;
  transform: translateY(-2px) !important;
}

/* High-contrast style (kept but no UI pill) */
body[data-contrast="high"]{
--text:#000; --card:#fff; --border:#000;
--pill-bg:#000;
}

html,body{height:100%}
body{
margin:0;
background:linear-gradient(160deg,var(--bg-1) 0%,var(--bg-2) 50%,var(--bg-3) 100%) !important;
color:var(--text) !important;
font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif !important;
}
.hidden{ display:none !important }

/* Aura badge styles - Gen Z aesthetic */
.aura-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(168,85,247,0.1), rgba(59,130,246,0.1));
  border: 2px solid rgba(168,85,247,0.3);
  box-shadow: 0 4px 12px rgba(168,85,247,0.15);
  font-weight: 700;
  font-size: 14px;
  transition: all 0.3s ease;
  animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { box-shadow: 0 4px 12px rgba(168,85,247,0.15); }
  50% { box-shadow: 0 6px 20px rgba(168,85,247,0.3); }
}

.aura-badge .emoji {
  font-size: 18px;
  animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.aura-badge .total {
  min-width: 3ch;
  text-align: center;
  font-size: 16px;
  background: linear-gradient(135deg, #a855f7, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.aura-badge .delta {
  margin-left: 4px;
  font-weight: 800;
  font-size: 13px;
  opacity: 0;
  transition: all 0.3s ease;
  position: relative;
}

.aura-badge .delta.show {
  opacity: 1;
  animation: deltaFloat 2s ease-out;
}

@keyframes deltaFloat {
  0% { transform: translateY(0); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(-20px); opacity: 0; }
}

.aura-badge .delta.pos { color: #16a34a; }
.aura-badge .delta.neg { color: #ef4444; }

/* Bro Mode active animations */
.bro-mode-active .aura-badge {
  animation: glow 1s ease-in-out infinite, pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Emoji reaction animations */
@keyframes emojiFloat {
  0% {
    transform: translateY(0) scale(0);
    opacity: 0;
  }
  20% {
    transform: translateY(-20px) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) scale(0.5);
    opacity: 0;
  }
}

.emoji-reaction {
  position: fixed;
  right: 20px;
  top: 100px;
  font-size: 30px;
  animation: emojiFloat 2s ease-out;
  pointer-events: none;
  z-index: 9999;
}

/* RIKSMÅL MODE - Proper Size */
body.riksmaal-active .currentTeacherPulse {
  width: auto !important;  /* Don't force size */
  height: auto !important;
  background: transparent !important;
  border: 2px solid #ffd700 !important;
  box-shadow: 0 0 25px #ffd700, 0 0 40px #ffb300 !important;
}

body.riksmaal-active .currentTeacherPulse img {
  width: auto !important;
  height: var(--hero-h) !important;  /* Use your existing hero height */
  object-fit: contain !important;
  border-radius: 16px !important;
  background: transparent !important;
}

body.riksmaal-active .aura-game-display {
  border: 2px solid #ffd700 !important;
  box-shadow: 0 0 25px #ffd700 !important;
}

/* ===== Header ===== */
.header{ position:relative; display:flex; align-items:center; justify-content:space-between; gap:12px }
.mast{ position:relative; z-index:2 }
.headerRight img{ pointer-events:none }
.brand{ display:flex; align-items:center; gap:12px }
.brand img{
height:var(--hero-h) !important; width:auto !important;
border-radius:16px !important; object-fit:contain !important;
}
/* Dashboard button - scale with neon glow on hover */
.brand img:hover {
  cursor: pointer;
  transform: scale(1.1);
  filter: drop-shadow(0 0 12px #3b82f6) 
          drop-shadow(0 0 25px #3b82f6);
  box-shadow: 0 0 30px #3b82f6, 0 0 50px rgba(59,130,246,0.6);
  transition: all 0.3s ease;
}
.headerRight{ display:flex; align-items:center; gap:12px; }
.headerRight .headerBanner,
.headerRight .headerMark{
height:var(--hero-h) !important; width:auto !important;
object-fit:contain !important; border-radius:12px; animation:none !important;
}

/* Current teacher pulse container */
.headerRight .currentTeacherPulse {
  background: transparent !important;
  border: none !important;
  display: inline-block;
}

/* Current teacher pulse image */
.headerRight .currentTeacherPulse img{
height:var(--hero-h) !important; width:auto !important;
border-radius:8px;
border:4px solid #8B5CF6;
box-shadow:0 0 2px #8B5CF6, 0 0 16px rgba(139,92,246,.7);
animation:pulse 8s ease-in-out infinite;
background: transparent !important;
}
@keyframes pulse{ 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.05);opacity:.92} }
@media (prefers-reduced-motion: reduce){
.headerRight .currentTeacherPulse img{ animation:none !important; box-shadow:none }
}
@media (max-width:1024px){ :root{ --hero-h:100px } }

/* ===== Pills ===== */
.pill{
border:1px solid var(--border) !important; background:var(--pill-bg) !important; color:#e6eefc !important;
border-radius:999px; padding:4px 10px; font-size:12px; cursor:pointer; user-select:none;
transition:transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease
}
.pill:hover{ transform:translateY(-1px) }

.pill.off{ 
  background:linear-gradient(180deg,rgba(30,58,138,.35),rgba(17,24,39,.6)) !important; 
  border-color:var(--pill-off-blue-border) !important; 
  color:#cfe2ff !important;
}
.pill.on{ 
  background:linear-gradient(180deg,rgba(22,101,52,.35), rgba(17,24,39,.6)) !important; 
  border-color:var(--pill-on-green-border) !important; 
  color:#d1fae5 !important;
  box-shadow: 0 0 12px #22c55e, 0 0 24px rgba(34,197,94,.5) !important; /* GREEN NEON GLOW */
}

/* Pink glow for troubleshooting when on */
.pill.trouble.on{
  background:linear-gradient(180deg, rgba(244,114,182,.38), rgba(17,24,39,.6)) !important;
  border-color:#f472b6 !important; 
  color:#ffe4f1 !important;
  box-shadow: 0 0 12px #f472b6, 0 0 24px rgba(244,114,182,.5) !important; /* PINK NEON GLOW */
}

/* Troubleshooting pill has its own yellow→pink palette */
.pill.trouble.off{
background:linear-gradient(180deg, rgba(245,158,11,.35), rgba(17,24,39,.6)) !important;
border-color:#f59e0b !important; color:#fff8e1 !important;
}
.pill.trouble.on{
background:linear-gradient(180deg, rgba(244,114,182,.38), rgba(17,24,39,.6)) !important;
border-color:#f472b6 !important; color:#ffe4f1 !important;
}
/* Pink glow for Shallow/Medium/Deep mode buttons */
.troubleBar .modes .pill.on {
  background: linear-gradient(180deg, rgba(244,114,182,.38), rgba(17,24,39,.6)) !important;
  border-color: #f472b6 !important;
  color: #ffe4f1 !important;
  box-shadow: 0 0 12px #f472b6, 0 0 24px rgba(244,114,182,.5) !important;
}

.troubleBar .modes .pill.off {
  background: linear-gradient(180deg, rgba(245,158,11,.35), rgba(17,24,39,.6)) !important;
  border-color: #f59e0b !important;
  color: #fff8e1 !important;
}

/* Language flags - Enhanced for new role */
.group.langs .flag{
  display:inline-flex; 
  align-items:center; 
  justify-content:center;
  min-width:38px; 
  height:34px; 
  padding:4px 10px;
  border-radius:999px;
  border:2px solid rgba(139,92,246,.4); 
  background:linear-gradient(135deg, rgba(139,92,246,0.1), rgba(59,130,246,0.05));
  color:#6b21a8;
  font-weight:700;
  font-size:12px;
  letter-spacing:0.5px;
  cursor:pointer; 
  user-select:none; 
  font-family:inherit;
  outline:2px solid transparent;
  outline-offset:2px;
  transition:all 0.3s ease;
  box-shadow:0 2px 10px rgba(139,92,246,0.2);
}

.group.langs .flag:hover{ 
  transform:translateY(-2px) scale(1.05); 
  border-color:#8b5cf6;
  background:linear-gradient(135deg, rgba(139,92,246,0.2), rgba(59,130,246,0.1));
  box-shadow:0 0 20px rgba(139,92,246,0.5), 0 4px 12px rgba(0,0,0,0.1);
}

.group.langs .flag.active{
  background:linear-gradient(135deg, rgba(139,92,246,0.3), rgba(59,130,246,0.2));
  border-color:#8b5cf6; 
  box-shadow:0 0 25px #8b5cf6, 0 0 40px rgba(139,92,246,0.6);
  transform:scale(1.08);
  color:#5b21d6;
  font-weight:800;
}

.group.langs .flag:focus {
  outline-color:#22d3ee;
}

/* Sidebar */
.sidebar{ overflow-x:hidden; } /* prevent sideways scroll */

/* Sidebar sections - WITH SAND NEON FRAMES */
details.details{ 
  border-radius:14px; 
  border: 2px solid #d4a574;
  box-shadow: 
    0 0 10px #d4a574,
    0 0 20px rgba(212, 165, 116, 0.5),
    inset 0 0 10px rgba(212, 165, 116, 0.1);
  animation: sandGlow 3s ease-in-out infinite;
}

@keyframes sandGlow {
  0%, 100% { 
    box-shadow: 0 0 10px #d4a574, 0 0 20px rgba(212, 165, 116, 0.5), inset 0 0 10px rgba(212, 165, 116, 0.1); 
  }
  50% { 
    box-shadow: 0 0 15px #d4a574, 0 0 30px rgba(212, 165, 116, 0.7), inset 0 0 15px rgba(212, 165, 116, 0.2); 
  }
}

details.details > summary{
list-style:none; cursor:pointer; margin:8px; padding:6px 12px; display:inline-flex; align-items:center; gap:8px;
border-radius:999px;
background:linear-gradient(180deg, rgba(180,83,9,.20), rgba(17,24,39,.04));
border:2px solid #8b6914;
color:#1f2937; font-weight:700;
transition:transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
box-shadow: 0 0 15px #8b6914, 0 0 30px rgba(139,105,20,0.5);
}
details.details > summary::-webkit-details-marker{ display:none }
details.details > summary:hover{
transform:translateY(-1px);
box-shadow:0 0 0 1px rgba(245,158,11,.65) inset, 0 6px 18px rgba(245,158,11,.18);
}
details.details[open] > summary{
background:linear-gradient(180deg, rgba(245,158,11,.28), rgba(17,24,39,.06));
border-color:#fbbf24; color:#6a1b35; box-shadow:0 0 0 1px rgba(167,139,250,.25) inset;
}

/* Nav buttons base style */
.navlist button {
  border-radius: 999px !important;
  background: linear-gradient(180deg, rgba(180,83,9,.20), rgba(17,24,39,.04)) !important;
  border: 1px solid rgba(245,158,11,.55) !important; 
  color: #7c5211 !important;
  transition: all 0.3s ease !important;
}

/* Teachers - Purple glow on hover */
.details #navTeachers button:hover {
  background: linear-gradient(180deg, rgba(147,51,234,.4), rgba(17,24,39,.7)) !important;
  border: 2px solid #9333ea !important;
  box-shadow: 0 0 20px #9333ea, 0 0 40px rgba(147,51,234,.6) !important;
  transform: translateX(3px);
}

/* Employees - Orange glow on hover */
.details #navEmployees button:hover {
  background: linear-gradient(180deg, rgba(251,146,60,.4), rgba(17,24,39,.7)) !important;
  border: 2px solid #fb923c !important;
  box-shadow: 0 0 20px #fb923c, 0 0 40px rgba(251,146,60,.6) !important;
  transform: translateX(3px);
}

/* Special - Cyan glow on hover */
.details #navSpecial button:hover {
  background: linear-gradient(180deg, rgba(6,182,212,.4), rgba(17,24,39,.7)) !important;
  border: 2px solid #06b6d4 !important;
  box-shadow: 0 0 20px #06b6d4, 0 0 40px rgba(6,182,212,.6) !important;
  transform: translateX(3px);
}

/* Footer column layout */
.sidebarFooter .footerActions{
display:flex; flex-direction:column; gap:8px; align-items:stretch; min-width:180px;
}
.pill.install {
background: linear-gradient(180deg, rgba(22,163,74,.9), rgba(21,128,61,.85));
border: 2px solid #22c55e; color: #ecfdf5;
font-size: 15px; font-weight: 700; padding: 10px 24px;
border-radius: 999px; cursor: pointer;
transition: transform .15s ease, box-shadow .25s ease, background .25s ease;
text-shadow: 0 1px 2px rgba(0,0,0,.25);
width:100%; text-align:center;
}
.pill.install:hover {
transform: translateY(-2px) scale(1.03);
background: linear-gradient(180deg, rgba(34,197,94,1), rgba(21,128,61,.95));
box-shadow: 0 0 12px 3px rgba(34,197,94,.6), 0 6px 18px rgba(22,163,74,.35);
}

/* Chat + composer */
.chat { 
  padding: 10px; 
  overflow: auto;
  border: 2px solid rgba(139,92,246,.3) !important;
  border-radius: 12px;
  animation: chatPulse 3s ease-in-out infinite;
}

@keyframes chatPulse {
  0%, 100% {
    box-shadow: inset 0 0 10px rgba(139,92,246,.05),
                0 0 15px rgba(139,92,246,.1),
                0 0 25px rgba(139,92,246,.08);
  }
  50% {
    box-shadow: inset 0 0 25px rgba(139,92,246,.15),
                0 0 35px rgba(139,92,246,.3),
                0 0 50px rgba(139,92,246,.2);
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .chat {
    animation: none;
    box-shadow: inset 0 0 20px rgba(139,92,246,.1),
                0 0 25px rgba(139,92,246,.2),
                0 0 40px rgba(139,92,246,.15);
  }
}

/* ========== PREMIUM COMPOSER ========== */
.composer {
  position: sticky;
  bottom: 0;
  padding: 20px 24px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, #8b5cf6, #3b82f6, #06b6d4) 1;
  background: hotpink !important;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 
    0 -12px 40px rgba(59,130,246,.28),
    0 -4px 20px rgba(139,92,246,.18),
    inset 0 1px 0 rgba(255,255,255,.5) !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover state - subtle lift */
.composer:hover {
  box-shadow: 
    0 -12px 40px rgba(59,130,246,.35),
    0 -4px 20px rgba(139,92,246,.2),
    inset 0 1px 0 rgba(255,255,255,.6) !important;
}

.composer textarea {
  flex: 1;
  min-height: 64px;
  max-height: 160px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 4px solid;
  border-image: linear-gradient(135deg, #8b5cf6, #3b82f6, #06b6d4) 1;
  background: #FFF9EF;
  box-shadow: 
    0 2px 12px rgba(59,130,246,.3),
    0 0 20px rgba(139,92,246,.15),
    inset 0 1px 3px rgba(0,0,0,.05) !important;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  resize: vertical;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus state - intense glow */
.composer textarea:focus {
  outline: none;
  background: 
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, #8b5cf6, #3b82f6) border-box;
  
  box-shadow: 
    0 0 0 4px rgba(139,92,246,.15),
    0 4px 24px rgba(59,130,246,.3),
    inset 0 1px 3px rgba(139,92,246,.1) !important;
  
  transform: translateY(-1px);
}

/* Placeholder styling */
.composer textarea::placeholder {
  color: rgba(71,85,105,.5);
  font-weight: 400;
}

/* Button group spacing */
.composer button {
  flex-shrink: 0;
  min-width: 48px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Send button - hero treatment */
.composer #sendBtn {
  padding: 12px 28px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;
  border-radius: 14px;
  
  background: linear-gradient(135deg, #10b981, #059669) !important;
  border: 2px solid #22c55e !important;
  color: #ffffff !important;
  
  box-shadow: 
    0 0 20px #22c55e,
    0 4px 16px rgba(34,197,94,.4),
    inset 0 1px 0 rgba(255,255,255,.2) !important;
}

.composer #sendBtn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 0 28px #22c55e,
    0 6px 24px rgba(34,197,94,.5),
    inset 0 1px 0 rgba(255,255,255,.3) !important;
}

.composer #sendBtn:active {
  transform: translateY(0) scale(0.98);
}

/* Other buttons - subtle */
.composer button:not(#sendBtn) {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.7) !important;
  border: 1.5px solid rgba(139,92,246,.25) !important;
  color: #475569 !important;
  
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.composer button:not(#sendBtn):hover {
  background: rgba(255,255,255,.95) !important;
  border-color: rgba(139,92,246,.4) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139,92,246,.15);
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .composer {
    padding: 12px 14px;
    gap: 8px;
  }
  
  .composer textarea {
    min-height: 56px;
    padding: 12px 14px;
    font-size: 14px;
  }
  
  .composer #sendBtn {
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .composer {
    background: rgba(31, 41, 55, 0.95) !important;
  }
  
  .composer textarea {
    background: 
      linear-gradient(rgba(17,24,39,.9), rgba(17,24,39,.9)) padding-box,
      linear-gradient(135deg, rgba(139,92,246,.4), rgba(59,130,246,.4)) border-box;
    color: #f3f4f6;
  }
}
@supports (height: 100dvh){
.composer{ position:sticky }
}

/* Aura Game Display - HARDCORE VERTICAL PILL */
.aura-game-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 6px;
  background: linear-gradient(180deg, #000, #1a0033, #000);
  border: 2px solid #ff00ff;
  border-radius: 18px;
  box-shadow: 0 0 30px #ff00ff, 0 0 60px #00ffff, inset 0 0 20px rgba(255,0,255,0.3);
  margin-right: 12px;
  min-width: 60px;
  max-height: 80px;
  font-family: 'Orbitron', 'Courier New', monospace;
  animation: hardcorePulse 2s ease-in-out infinite;
}

@keyframes hardcorePulse {
  0%, 100% { 
    box-shadow: 0 0 30px #ff00ff, 0 0 60px #00ffff, inset 0 0 20px rgba(255,0,255,0.3);
  }
  50% { 
    box-shadow: 0 0 40px #ff00ff, 0 0 80px #00ffff, inset 0 0 30px rgba(255,0,255,0.5);
  }
}

.aura-level-badge { display: none; }

.aura-score-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.aura-label {
  font-size: 18px;
  filter: drop-shadow(0 0 5px #fff);
}

.aura-number {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 10px #ff00ff, 0 0 20px #00ffff;
  line-height: 1;
}

.aura-delta {
  position: absolute;
  top: 10px;
  right: -5px;
  font-size: 12px;
  font-weight: 900;
}

.aura-delta.positive { 
  color: #00ff00;
  text-shadow: 0 0 10px #00ff00;
}

.aura-delta.negative { 
  color: #ff0000;
  text-shadow: 0 0 10px #ff0000;
}

.aura-progress {
  width: 40px;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,0,255,0.3);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #ff00ff, #00ffff, #00ff00);
  box-shadow: 0 0 10px currentColor;
}

.progress-text { display: none; }

.aura-streak {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-top: 4px;
  border-top: 1px solid rgba(255,0,255,0.3);
}

.streak-fire { 
  font-size: 14px;
  filter: drop-shadow(0 0 3px #ff6600);
}

.streak-number { 
  font-size: 12px;
  color: #ff6600;
  font-weight: 900;
  text-shadow: 0 0 5px #ff6600;
}

/* Analog Clock */
.analog-clock {
  width: 60px;
  height: 80px;
  margin-right: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.clock-face {
  width: 50px;
  height: 50px;
  border: 2px solid #ff6600;
  border-radius: 50%;
  position: relative;
  background: #1a1a1a;
  box-shadow: 0 0 20px #ff6600, inset 0 0 10px rgba(255,102,0,0.1);
}

.clock-face::before,
.clock-face::after {
  content: '';
  position: absolute;
  background: #ff6600;
  left: 50%;
  transform: translateX(-50%);
}

.clock-face::before {
  width: 2px;
  height: 6px;
  top: 2px;
}

.clock-face::after {
  width: 2px;
  height: 6px;
  bottom: 2px;
}

.hand {
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform-origin: bottom center;
  z-index: 5;
}

.hour-hand {
  width: 4px;
  height: 12px;
  margin-left: -2px;
  background: #ffffff;
  box-shadow: 0 0 5px #fff;
}

.minute-hand {
  width: 3px;
  height: 18px;
  margin-left: -1.5px;
  background: #ff6600;
  box-shadow: 0 0 5px #ff6600;
}

.second-hand {
  width: 1px;
  height: 20px;
  margin-left: -0.5px;
  background: #ff00ff;
  box-shadow: 0 0 5px #ff00ff;
}

.center-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #ff6600;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}

.clock-date {
  font-size: 10px;
  color: #ff6600;
  text-align: center;
  font-weight: 700;
  white-space: nowrap;
  text-shadow: 0 0 5px #ff6600;
}

/* RIKSMÅL - Works with beige avatar backgrounds */
body.riksmaal-active .currentTeacherPulse {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

body.riksmaal-active .currentTeacherPulse img {
  filter: sepia(20%) brightness(1.05);
  border-radius: 12px !important;
  border: 2px solid #d4a574 !important;
  box-shadow: 
    0 0 20px #d4a574,
    0 0 35px rgba(212, 165, 116, 0.6) !important;
}

body.riksmaal-active .currentTeacherPulse img {
  /* Don't fight the beige - blend with it */
  filter: sepia(20%) brightness(1.05);
  border-radius: 12px !important;  /* Slight rounding looks intentional */
}

body.riksmaal-active .aura-game-display {
  border-color: #d4a574 !important;
  box-shadow: 0 0 25px #d4a574 !important;
}

/* Willoch Badge Pill */
.willoch-badge-pill {
  display: flex;
  flex-direction: column;     
  align-items: center;
  gap: 4px;                   
  padding: 10px 8px;          
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 2px solid #ffd700;
  border-radius: 18px;        
  box-shadow: 0 0 20px #ffd700, 0 0 40px rgba(255,215,0,.5);
  margin-right: 12px;
  font-family: 'Georgia', serif;
  cursor: pointer;
  position: relative;
  min-height: 60px;
  min-width: 90px;
  max-width: 110px;
  z-index: 1;
}

/* Fix currentTeacherPulse when badge is active */
.currentTeacherPulse {
  position: relative;
  z-index: 2;
  background: transparent !important;
}

.badge-title {
  font-size: 10px;
  color: #ffd700;
  font-weight: 600;
  text-align: center;        
  word-wrap: break-word;     /* Allow text wrapping */
  max-width: 90px;           /* Constrain text width */
}

.badge-emoji {
  font-size: 20px;
}

.badge-title {
  font-size: 13px;
  color: #ffd700;
  font-weight: 600;
}
/* Badge Tooltip */
.badge-tooltip {
  position: absolute;
  top: 140px;
  right: 20px;
  width: 300px;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 2px solid #ffd700;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
  z-index: 1000;
}

.tooltip-header {
  color: #ffd700;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 10px;
  text-align: center;
}

.badge-list {
  max-height: 300px;
  overflow-y: auto;
}

.badge-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  margin: 5px 0;
  background: rgba(255, 215, 0, 0.1);
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
}

/* History mode quiz button - purple heartbeat */
body.history-active #finishBtn {
  background: linear-gradient(135deg, #9333ea, #7c3aed) !important;
  border: 2px solid #9333ea !important;
  animation: historyHeartbeat 2s ease-in-out infinite;
}

@keyframes historyHeartbeat {
  0%, 100% { 
    box-shadow: 0 0 20px #9333ea, 0 0 40px rgba(147,51,234,0.6);
    transform: scale(1);
  }
  50% { 
    box-shadow: 0 0 35px #9333ea, 0 0 60px rgba(147,51,234,0.8);
    transform: scale(1.05);
  }
}

/* Send button with solid green neon glow */
#sendBtn {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  border: 2px solid #22c55e !important;
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: 0 0 20px #22c55e,
              0 0 35px rgba(34,197,94,.7),
              inset 0 0 15px rgba(34,197,94,.2) !important;
  transition: all 0.3s ease;
}

#sendBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px #22c55e,
              0 0 45px rgba(34,197,94,.8),
              inset 0 0 20px rgba(34,197,94,.3) !important;
}

#sendBtn:active {
  transform: translateY(0);
  box-shadow: 0 0 15px #22c55e,
              0 0 30px rgba(34,197,94,.6),
              inset 0 0 25px rgba(34,197,94,.4) !important;
}
/* Logout button - black neon glow */
#logoutBtn {
  background: linear-gradient(180deg, rgba(0,0,0,0.9), rgba(30,30,30,0.8)) !important;
  border: 2px solid #333 !important;
  color: #fff !important;
  box-shadow: 0 0 15px rgba(0,0,0,0.8), 
              0 0 25px rgba(0,0,0,0.5),
              inset 0 0 10px rgba(255,255,255,0.1) !important;
  transition: all 0.3s ease !important;
}

#logoutBtn:hover {
  border-color: #666 !important;
  box-shadow: 0 0 20px rgba(0,0,0,0.9), 
              0 0 35px rgba(0,0,0,0.7),
              inset 0 0 15px rgba(255,255,255,0.2) !important;
  transform: translateY(-1px);
}
/* Saphelia logo - light glow default, intense on hover */
.brand img {
  border-radius: 16px;
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 10px rgba(217,119,6,.3)) 
          drop-shadow(0 0 15px rgba(217,119,6,.2));
}

.brand img:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 35px #d97706) 
          drop-shadow(0 0 60px rgba(217,119,6,.8));
  cursor: pointer;
}

@keyframes amberPulse {
  0%, 100% {
    filter: drop-shadow(0 0 15px #d97706) 
            drop-shadow(0 0 25px rgba(217,119,6,.4));
  }
  50% {
    filter: drop-shadow(0 0 30px #d97706) 
            drop-shadow(0 0 50px rgba(217,119,6,.7));
  }
}

.brand img:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 35px #d97706) 
          drop-shadow(0 0 60px rgba(217,119,6,.8));
}

/* Willoch image - golden glow, no background */
.currentTeacherPulse img {
  filter: drop-shadow(0 0 20px #8B5CF6) 
          drop-shadow(0 0 35px rgba(139,92,246,.6));
}
/* Navigation emoji styling */
.nav-emoji {
  font-size: 24px;
  margin-right: 8px;
  display: inline-block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.navlist button {
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.navlist button:hover .nav-emoji {
  transform: scale(1.2) rotate(10deg);
  filter: drop-shadow(0 0 10px currentColor);
}
/* Keep text and footer inline */
.bubble-text {
  display: inline;
}

.bubble-footer {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  vertical-align: middle;
  border-top: none !important;
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Timestamp styling - smaller and italic */
.bubble-footer .meta {
  font-size: 10px !important;
  font-style: italic;
  color: #94a3b8;
  opacity: 0.6;
  font-weight: 400;
  letter-spacing: 0.2px;
  margin: 0;
  line-height: 1;
}

/* Make timestamp even smaller on hover */
.bubble:hover .meta {
  font-size: 9px;
  opacity: 0.5;
}

/* Neon Speaker Button - compact inline version */
.bubble-footer .speakBtn {
  display: inline-block !important;
  font-size: 12px !important;
  padding: 1px 5px !important;
  margin: 0 !important;
  vertical-align: middle;
  background: linear-gradient(135deg, rgba(250,204,21,0.2), rgba(250,204,21,0.1));
  border: 1.5px solid #facc15;
  border-radius: 4px;
  color: #facc15;
  text-shadow: 0 0 6px #facc15;
  box-shadow: 
    0 0 6px rgba(250,204,21,0.4),
    0 0 12px rgba(250,204,21,0.2),
    inset 0 0 6px rgba(250,204,21,0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.8;
}

.bubble-footer .speakBtn:hover {
  opacity: 1;
  transform: scale(1.1);
  background: linear-gradient(135deg, rgba(250,204,21,0.3), rgba(250,204,21,0.2));
  box-shadow: 
    0 0 10px #facc15,
    0 0 20px rgba(250,204,21,0.5),
    inset 0 0 10px rgba(250,204,21,0.2);
}

/* Active/playing state */
.bubble-footer .speakBtn.playing {
  animation: speakerGlow 1s ease-in-out infinite;
  background: linear-gradient(135deg, rgba(34,197,94,0.4), rgba(34,197,94,0.3));
  box-shadow: 
    0 0 15px #22c55e,
    0 0 30px rgba(34,197,94,0.7),
    inset 0 0 12px rgba(34,197,94,0.3);
}

@keyframes speakerGlow {
  0%, 100% { 
    box-shadow: 
      0 0 12px #22c55e,
      0 0 24px rgba(34,197,94,0.6);
  }
  50% { 
    box-shadow: 
      0 0 20px #22c55e,
      0 0 40px rgba(34,197,94,0.8);
  }
}
.group.langs .flag {
  position: relative;
  min-width: 36px;
  height: 28px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 2px solid rgba(139,92,246,.3);
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(248,250,252,0.9));
  overflow: hidden;
  font-size: 0; /* Hide text */
}

.group.langs .flag::before {
  content: attr(data-flag);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
}

/* Fallback with country codes if emoji fails */
.group.langs .flag::after {
  content: attr(data-lang);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  color: #8b5cf6;
  z-index: -1; /* Behind emoji if it works */
}
.flag-text {
  font-weight: 700;
  font-size: 12px;
  color: #8b5cf6;
  letter-spacing: 1px;
}
/* Message bubbles - Gen Z aesthetic */
.msg {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from { 
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.msg.user {
  flex-direction: row-reverse;
}

.msg img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(139,92,246,0.5);
  box-shadow: 0 0 15px rgba(139,92,246,0.3);
}

/* Bubble glassmorphism effect */
.bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 18px;
  position: relative;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

/* User messages - gradient with glow */
.msg.user .bubble {
  background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(59,130,246,0.15));
  border: 1.5px solid rgba(139,92,246,0.4);
  color: var(--text);
  box-shadow: 0 4px 15px rgba(139,92,246,0.2),
              inset 0 0 20px rgba(139,92,246,0.1);
  margin-left: auto;
}

/* Bot messages - different gradient */
.msg.bot .bubble {
  background: linear-gradient(135deg, rgba(34,197,94,0.1), rgba(6,182,212,0.08));
  border: 1.5px solid rgba(34,197,94,0.3);
  color: var(--text);
  box-shadow: 0 4px 15px rgba(34,197,94,0.15),
              inset 0 0 20px rgba(34,197,94,0.05);
}

/* Hover effects for engagement */
.bubble:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 25px rgba(139,92,246,0.3),
              inset 0 0 30px rgba(139,92,246,0.15);
}

/* Typing indicator animation */
.typing {
  display: inline-flex;
  gap: 4px;
  padding: 8px 12px;
}

.typing .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  animation: typingDot 1.4s ease-in-out infinite;
}

.typing .dot:nth-child(2) { animation-delay: 0.2s; }
.typing .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
  0%, 80%, 100% {
    transform: scale(1);
    opacity: 0.5;
  }
  40% {
    transform: scale(1.3);
    opacity: 1;
  }
}

/* Message text styling */
.bubble-text {
  line-height: 1.5;
  word-wrap: break-word;
}

/* Code blocks in messages */
.bubble code {
  background: rgba(139,92,246,0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Fira Code', monospace;
  font-size: 0.9em;
  border: 1px solid rgba(139,92,246,0.2);
}

/* Links in messages */
.bubble a {
  color: #8b5cf6;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s;
}

.bubble a:hover {
  border-bottom-color: #8b5cf6;
  text-shadow: 0 0 10px rgba(139,92,246,0.5);
}

/* Dark mode for evening studying */
@media (prefers-color-scheme: dark) {
  .msg.user .bubble {
    background: linear-gradient(135deg, rgba(139,92,246,0.3), rgba(59,130,246,0.25));
    box-shadow: 0 0 20px rgba(139,92,246,0.4),
                inset 0 0 15px rgba(139,92,246,0.2);
  }
  
  .msg.bot .bubble {
    background: linear-gradient(135deg, rgba(34,197,94,0.25), rgba(6,182,212,0.2));
    box-shadow: 0 0 20px rgba(34,197,94,0.3),
                inset 0 0 15px rgba(34,197,94,0.1);
  }
}

/* Mobile-optimized bubbles */
@media (max-width: 768px) {
  .bubble {
    max-width: 85%;
  }
  
  .msg img {
    width: 32px;
    height: 32px;
  }
}
/* Games grid responsive layout */
.games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 1024px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .games-grid {
    grid-template-columns: 1fr;
  }
}
/* Modal styling */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.modal.open {
  display: flex;
}

.modal-content {
  background: #FFF9EF;
  border: 3px solid #d4b48a;
  border-radius: 16px;
  padding: 30px;
  max-width: 90%;
  max-height: 90%;
  overflow-y: auto;
  box-shadow: 0 0 40px rgba(212,180,138,0.6);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}
/* ========== COMPOSER GRADIENT - HIGHEST PRIORITY ========== */
#userText {
  flex: 1 !important;
  min-height: 64px !important;
  max-height: 160px !important;
  padding: 14px 18px !important;
  border-radius: 16px !important;
  border: 4px solid transparent !important;
  background: 
    linear-gradient(white, white) padding-box,
    linear-gradient(135deg, #8b5cf6, #3b82f6, #06b6d4) border-box !important;
  background-origin: padding-box, border-box !important;
  background-clip: padding-box, border-box !important;
  -webkit-background-clip: padding-box, border-box !important;
  box-shadow: 
    0 2px 12px rgba(59,130,246,.3),
    0 0 20px rgba(139,92,246,.2) !important;
  color: var(--text) !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
  resize: vertical !important;
  transition: all 0.3s ease !important;
}
#userText:focus {
  outline: none !important;
  border: 4px solid transparent !important;
  background: 
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, #a855f7, #3b82f6, #06b6d4) border-box !important;
  background-origin: padding-box, border-box !important;
  background-clip: padding-box, border-box !important;
  -webkit-background-clip: padding-box, border-box !important;
  box-shadow: 
    0 0 0 4px rgba(139,92,246,.2),
    0 4px 24px rgba(59,130,246,.5),
    0 0 40px rgba(139,92,246,.3) !important;
  transform: translateY(-2px) !important;
}
/* ========== NUCLEAR COMPOSER BAR OVERRIDE ========== */
div.composer {
  position: sticky !important;
  bottom: 0 !important;
  padding: 20px 24px !important;
  display: flex;
  align-items: flex-end !important;
  gap: 12px !important;
  border-top: 3px solid transparent !important;
  border-image: linear-gradient(90deg, #8b5cf6, #3b82f6, #06b6d4) 1 !important;
  background: linear-gradient(180deg, rgba(255,249,239,0.92), rgba(255,244,227,0.95)) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  box-shadow: 
    0 -12px 40px rgba(59,130,246,.28),
    0 -4px 20px rgba(139,92,246,.18),
    inset 0 1px 0 rgba(255,255,255,.5) !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  z-index: 100 !important;
}
/* ========== PREMIUM SEND BUTTON ========== */
div.composer #sendBtn {
  padding: 12px 28px !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  letter-spacing: 0.3px !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #16a34a, #15803d) !important;
  border: 2px solid #22c55e !important;
  color: #ffffff !important;
  box-shadow: 
    0 0 18px rgba(34,197,94,.4),
    0 4px 16px rgba(34,197,94,.3),
    inset 0 1px 0 rgba(255,255,255,.25) !important;
  transition: all 0.3s ease !important;
}

div.composer #sendBtn:hover {
  transform: translateY(-2px) !important;
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
  box-shadow: 
    0 0 24px rgba(34,197,94,.5),
    0 6px 20px rgba(34,197,94,.4) !important;
}

div.composer #sendBtn:active {
  transform: translateY(0) !important;
}
/* ========== SECONDARY BUTTONS ========== */
div.composer button:not(#sendBtn) {
  padding: 10px 18px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  border-radius: 12px !important;
  background: rgba(255,255,255,.85) !important;
  border: 2px solid rgba(139,92,246,.3) !important;
  color: #475569 !important;
  box-shadow: 
    0 2px 8px rgba(0,0,0,.08),
    inset 0 1px 0 rgba(255,255,255,.5) !important;
  transition: all 0.3s ease !important;
}

div.composer button:not(#sendBtn):hover {
  background: rgba(255,255,255,1) !important;
  border-color: rgba(139,92,246,.5) !important;
  transform: translateY(-1px) !important;
  box-shadow: 
    0 4px 12px rgba(139,92,246,.2),
    inset 0 1px 0 rgba(255,255,255,.6) !important;
}

div.composer button:not(#sendBtn):active {
  transform: translateY(0) !important;
}
/* ==========================================================
   AGORA MODE - GEN Z CRITICAL THINKING ARENA
   ========================================================== */

/* Agora Container */
.agora-container {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  display: grid !important;
  grid-template-columns: 1fr 290px !important;
  gap: 20px;
  padding: 20px;
  min-height: calc(100vh - 200px);
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Main Column */
.agora-main {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Hero Header - GLASSMORPHISM + NEON GLOW */
.agora-hero {
  background: linear-gradient(135deg, rgba(139,92,246,0.95), rgba(124,58,237,0.95));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 25px;
  color: white;
  border: 3px solid rgba(167,139,250,0.5);
  box-shadow: 
    0 0 40px rgba(139,92,246,0.6),
    0 8px 24px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.2);
  animation: agoraHeroGlow 3s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.agora-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 20px;
}

.agora-title-section h1 {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 8px 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  position: relative;
  z-index: 1;
}

.agora-tagline {
  font-size: 16px;
  opacity: 0.95;
  font-weight: 500;
  margin: 0;
  position: relative;
  z-index: 1;
}

/* Game Mode Controls in Agora Header */
.agora-header-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.agora-mode-toggle {
  display: flex;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  padding: 4px;
}

.mode-toggle-btn {
  padding: 6px 14px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  background: transparent;
  color: rgba(255,255,255,0.7);
}

.mode-toggle-btn.active {
  background: white;
  color: #8b5cf6;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.mode-toggle-btn:hover:not(.active) {
  background: rgba(255,255,255,0.2);
  color: white;
}

/* Progression Tracker in Agora Header */
.agora-progression-header {
  display: flex;
  gap: 12px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 6px 12px;
  opacity: 0.5;
  transition: all 0.5s ease;
}

body.game-mode-active .agora-progression-header {
  opacity: 1;
  background: rgba(255,215,0,0.25);
  border-color: #ffd700;
  box-shadow: 
    0 0 20px rgba(255,215,0,0.6),
    0 0 35px rgba(255,215,0,0.4);
  animation: goldenPulse 2s ease-in-out infinite;
}

@keyframes goldenPulse {
  0%, 100% { 
    box-shadow: 0 0 20px rgba(255,215,0,0.6), 0 0 35px rgba(255,215,0,0.4);
  }
  50% { 
    box-shadow: 0 0 30px rgba(255,215,0,0.8), 0 0 50px rgba(255,215,0,0.6);
  }
}

.progression-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-icon {
  font-size: 14px;
}

.stat-value {
  font-size: 13px;
  font-weight: 700;
  color: white;
  min-width: 20px;
  text-align: center;
}

body.game-mode-active .stat-value {
  color: #ffd700;
  text-shadow: 0 0 8px rgba(255,215,0,0.6);
}

/* Responsive */
@media (max-width: 768px) {
  .agora-hero-top {
    flex-direction: column;
    align-items: stretch;
  }
  
  .agora-header-controls {
    align-items: stretch;
  }
}

.agora-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
  animation: agoraShine 3s ease-in-out infinite;
}

@keyframes agoraHeroGlow {
  0%, 100% { 
    box-shadow: 
      0 0 40px rgba(139,92,246,0.6),
      0 8px 24px rgba(0,0,0,0.2),
      inset 0 1px 0 rgba(255,255,255,0.2);
  }
  50% { 
    box-shadow: 
      0 0 60px rgba(139,92,246,0.8),
      0 12px 32px rgba(0,0,0,0.3),
      inset 0 1px 0 rgba(255,255,255,0.3);
  }
}

@keyframes agoraShine {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.agora-hero h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  position: relative;
  z-index: 1;
}

.agora-tagline {
  font-size: 16px;
  opacity: 0.95;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

/* Mode Selector - NEON BUTTONS */
.agora-modes {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  margin-bottom: 25px;
  flex-wrap: nowrap;
  justify-content: space-between;
}

.agora-mode-btn {
  padding: 10px 16px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  color: white;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  flex: 1;
  min-width: 0;
}

.agora-mode-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.agora-mode-btn:hover {
  background: rgba(255,255,255,0.3);
  border-color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.agora-mode-btn:hover::before {
  opacity: 1;
}

.agora-mode-btn.active {
  background: white;
  color: #8b5cf6;
  border-color: white;
  box-shadow: 
    0 0 20px rgba(255,255,255,0.8),
    0 4px 12px rgba(0,0,0,0.2);
  transform: scale(1.02);
}

/* Composer - GLASSMORPHISM + CYAN GLOW */
.agora-composer {
  background: rgba(255,249,239,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 3px solid #06b6d4;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 
    0 0 30px rgba(6,182,212,0.5),
    0 8px 20px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.5);
  animation: agoraComposerPulse 3s ease-in-out infinite;
}

@keyframes agoraComposerPulse {
  0%, 100% { 
    box-shadow: 
      0 0 30px rgba(6,182,212,0.5),
      0 8px 20px rgba(0,0,0,0.15),
      inset 0 1px 0 rgba(255,255,255,0.5);
  }
  50% { 
    box-shadow: 
      0 0 50px rgba(6,182,212,0.7),
      0 8px 20px rgba(0,0,0,0.15),
      inset 0 1px 0 rgba(255,255,255,0.6);
  }
}

.agora-composer h2 {
  color: #06b6d4;
  font-size: 18px;
  margin-bottom: 12px;
  text-shadow: 0 0 10px rgba(6,182,212,0.3);
}

.agora-input {
  width: 100%;
  min-height: 100px;
  padding: 15px;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.agora-input:focus {
  outline: none;
  border-color: #06b6d4;
  box-shadow: 
    0 0 20px rgba(6,182,212,0.4),
    inset 0 2px 4px rgba(0,0,0,0.05);
  transform: translateY(-1px);
}

.agora-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.agora-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.agora-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.3), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.agora-btn:hover::before {
  opacity: 1;
}

.agora-btn-primary {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  color: white;
  box-shadow: 
    0 0 20px rgba(6,182,212,0.4),
    0 4px 12px rgba(6,182,212,0.3);
}

.agora-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 0 30px rgba(6,182,212,0.6),
    0 6px 20px rgba(6,182,212,0.4);
}

/* Chat Area - GLASSMORPHISM + PURPLE GLOW */
.agora-chat {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--card);
  border: 2px solid rgba(139,92,246,.3) !important;
  border-radius: 12px;
  min-height: 300px;
  animation: chatPulse 3s ease-in-out infinite;
}

@keyframes chatPulse {
  0%, 100% {
    box-shadow: inset 0 0 10px rgba(139,92,246,.05),
                0 0 15px rgba(139,92,246,.1),
                0 0 25px rgba(139,92,246,.08);
  }
  50% {
    box-shadow: inset 0 0 25px rgba(139,92,246,.15),
                0 0 35px rgba(139,92,246,.3),
                0 0 50px rgba(139,92,246,.2);
  }
}

/* Agora Message Bubbles - Match Saphelia Main Chat Style */
.agora-message {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
  animation: slideIn 0.3s ease-out;
}

.agora-message.user {
  flex-direction: row-reverse;
}

.agora-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--card-soft);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.agora-bubble {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  max-width: 80%;
  color: var(--text);
  line-height: 1.5;
}

.agora-message.user .agora-bubble {
  background: var(--card-soft);
}

/* Typing indicator for Agora */
.agora-message .typing {
  display: inline-block;
  min-width: 20px;
}

.agora-message .typing .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 2px;
  border-radius: 50%;
  background: #b4895a;
  animation: blink 1.2s infinite;
}

.agora-message .typing .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.agora-message .typing .dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  0%, 80%, 100% {
    opacity: 0.2;
  }
  40% {
    opacity: 1;
  }
}

.agora-game-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.agora-game-content {
  background: var(--card);
  border: 2px solid var(--agora-gold, #ffd700);
  border-radius: 20px;
  padding: 32px;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.4);
  animation: slideIn 0.4s ease;
}

.agora-game-timer {
  font-size: 64px;
  font-weight: bold;
  text-align: center;
  color: var(--agora-purple, #8b5cf6);
  margin-bottom: 20px;
  text-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
}

.agora-game-statement {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 24px;
  padding: 16px;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 12px;
  border-left: 4px solid var(--agora-purple, #8b5cf6);
}

.agora-game-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.agora-game-choice {
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.agora-game-choice:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: var(--agora-purple, #8b5cf6);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.agora-game-choice:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.agora-game-choice.correct {
  background: rgba(34, 197, 94, 0.2);
  border-color: #22c55e;
  animation: correctPulse 0.5s ease;
}

.agora-game-choice.wrong {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  animation: shake 0.5s ease;
}

.agora-game-feedback {
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  padding: 12px;
  border-radius: 8px;
  min-height: 48px;
}

.agora-game-feedback.correct {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
}

.agora-game-feedback.wrong {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.agora-game-feedback.timeout {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes correctPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Sidebar Widgets */
.agora-sidebar {
  display: flex;
  flex-direction: column;
  gap: 15px;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
  max-width: 350px;
}

/* Daily Challenge - ORANGE GLOW */
.agora-challenge {
  width: 100%;
  box-sizing: border-box;
  background: linear-gradient(135deg, rgba(245,158,11,0.95), rgba(217,119,6,0.95));
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 8px;
  color: white;
  border: 3px solid rgba(251,191,36,0.5);
}

@keyframes agoraChallengeGlow {
  0%, 100% { 
    box-shadow: 
      0 0 35px rgba(245,158,11,0.6),
      0 8px 20px rgba(0,0,0,0.2),
      inset 0 1px 0 rgba(255,255,255,0.2);
  }
  50% { 
    box-shadow: 
      0 0 55px rgba(245,158,11,0.8),
      0 8px 20px rgba(0,0,0,0.2),
      inset 0 1px 0 rgba(255,255,255,0.3);
  }
}

.agora-challenge::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: agoraShine 4s ease-in-out infinite;
}

.agora-challenge h3 {
  margin: 0 0 4px 0;
  font-size: 16px;
}

.agora-challenge-text {
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(10px);
  padding: 8px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 0;
  border: 1px solid rgba(255,255,255,0.3);
  position: relative;
  z-index: 1;
}

/* Fallacy Widget - RED GLOW */
.agora-fallacy {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,249,239,0.95);
  backdrop-filter: blur(20px);
  border: 3px solid #ef4444;
  border-radius: 16px;
  padding: 15px;
  box-shadow: 
    0 0 30px rgba(239,68,68,0.4),
    0 8px 20px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.5);
  animation: agoraFallacyGlow 3s ease-in-out infinite;
}

@keyframes agoraFallacyGlow {
  0%, 100% { 
    box-shadow: 
      0 0 30px rgba(239,68,68,0.4),
      0 8px 20px rgba(0,0,0,0.15),
      inset 0 1px 0 rgba(255,255,255,0.5);
  }
  50% { 
    box-shadow: 
      0 0 45px rgba(239,68,68,0.6),
      0 8px 20px rgba(0,0,0,0.15),
      inset 0 1px 0 rgba(255,255,255,0.6);
  }
}

.agora-fallacy h3 {
  color: #ef4444;
  font-size: 16px;
  margin-bottom: 10px;
  text-shadow: 0 0 10px rgba(239,68,68,0.3);
}

.agora-fallacy-card {
  background: linear-gradient(135deg, rgba(239,68,68,0.12), rgba(239,68,68,0.06));
  backdrop-filter: blur(10px);
  border: 2px solid #fca5a5;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.agora-fallacy-card:hover {
  transform: translateX(5px) scale(1.02);
  border-color: #ef4444;
  box-shadow: 
    0 4px 12px rgba(239,68,68,0.4),
    0 0 20px rgba(239,68,68,0.2);
  background: linear-gradient(135deg, rgba(239,68,68,0.18), rgba(239,68,68,0.1));
}

/* Source Widget - GREEN GLOW */
.agora-source {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,249,239,0.95);
  backdrop-filter: blur(20px);
  border: 3px solid #22c55e;
  border-radius: 16px;
  padding: 15px;
  box-shadow: 
    0 0 30px rgba(34,197,94,0.4),
    0 8px 20px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.5);
  animation: agoraSourceGlow 3s ease-in-out infinite;
}

@keyframes agoraSourceGlow {
  0%, 100% { 
    box-shadow: 
      0 0 30px rgba(34,197,94,0.4),
      0 8px 20px rgba(0,0,0,0.15),
      inset 0 1px 0 rgba(255,255,255,0.5);
  }
  50% { 
    box-shadow: 
      0 0 45px rgba(34,197,94,0.6),
      0 8px 20px rgba(0,0,0,0.15),
      inset 0 1px 0 rgba(255,255,255,0.6);
  }
}

.agora-source h3 {
  color: #22c55e;
  font-size: 16px;
  margin-bottom: 10px;
  text-shadow: 0 0 10px rgba(34,197,94,0.3);
}

.agora-credibility {
  background: #e2e8f0;
  height: 25px;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: 
    inset 0 2px 4px rgba(0,0,0,0.1),
    0 2px 8px rgba(0,0,0,0.05);
  border: 2px solid rgba(34,197,94,0.3);
}

.agora-credibility-fill {
  height: 100%;
  background: linear-gradient(90deg, #ef4444, #f59e0b, #22c55e);
  width: 0%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  color: white;
  font-weight: 700;
  font-size: 12px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px currentColor;
}

/* Stats Widget - GOLD GLOW */
.agora-stats {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,249,239,0.95);
  backdrop-filter: blur(20px);
  border: 3px solid #d4a574;
  border-radius: 16px;
  padding: 15px;
  box-shadow: 
    0 0 30px rgba(212,165,116,0.4),
    0 8px 20px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.5);
  animation: agoraStatsGlow 3s ease-in-out infinite;
}

@keyframes agoraStatsGlow {
  0%, 100% { 
    box-shadow: 
      0 0 30px rgba(212,165,116,0.4),
      0 8px 20px rgba(0,0,0,0.15),
      inset 0 1px 0 rgba(255,255,255,0.5);
  }
  50% { 
    box-shadow: 
      0 0 45px rgba(212,165,116,0.6),
      0 8px 20px rgba(0,0,0,0.15),
      inset 0 1px 0 rgba(255,255,255,0.6);
  }
}

.agora-stats h3 {
  color: #d4a574;
  font-size: 16px;
  margin-bottom: 10px;
  text-shadow: 0 0 10px rgba(212,165,116,0.3);
}

.agora-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.agora-stat-item {
  text-align: center;
  padding: 10px;
  background: rgba(212,165,116,0.12);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  border: 1px solid rgba(212,165,116,0.3);
  transition: all 0.3s;
}

.agora-stat-item:hover {
  transform: scale(1.05);
  border-color: #d4a574;
  box-shadow: 0 4px 12px rgba(212,165,116,0.3);
}

.agora-stat-value {
  font-size: 24px;
  font-weight: 800;
  color: #d4a574;
  text-shadow: 0 0 10px rgba(212,165,116,0.3);
}

.agora-stat-label {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  margin-top: 4px;
}

/* Responsive */
@media (max-width: 600px) {
  .agora-container {
    grid-template-columns: 1fr;
  }
  
  .agora-sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

@media (max-width: 768px) {
  .agora-modes {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .agora-sidebar {
    grid-template-columns: 1fr;
  }
  
  .agora-bubble {
    max-width: 85%;
  }
}
/* ========== AGORA GAME MODE CONTROLS IN HEADER ========== */
.header-game-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  margin-right: 12px;
}

.agora-mode-toggle {
  display: flex;
  gap: 6px;
  background: rgba(255,249,239,0.9);
  border: 2px solid rgba(139,92,246,0.3);
  border-radius: 12px;
  padding: 4px;
}

.mode-toggle-btn {
  padding: 6px 14px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  background: transparent;
  color: #64748b;
}

.mode-toggle-btn.active {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
  box-shadow: 0 2px 8px rgba(139,92,246,0.4);
}

.mode-toggle-btn:hover:not(.active) {
  background: rgba(139,92,246,0.1);
  color: #8b5cf6;
}

/* Progression Tracker - Horizontal in Header */
.agora-progression-header {
  display: flex;
  gap: 12px;
  background: rgba(255,249,239,0.6);
  border: 2px solid rgba(212,180,138,0.3);
  border-radius: 12px;
  padding: 6px 12px;
  opacity: 0.5;
  transition: all 0.5s ease;
}

body.game-mode-active .agora-progression-header {
  opacity: 1;
  background: rgba(255,249,239,0.95);
  border-color: #d4a574;
  box-shadow: 
    0 0 20px rgba(212,165,116,0.6),
    0 0 35px rgba(212,165,116,0.4);
  animation: goldenPulse 2s ease-in-out infinite;
}

@keyframes goldenPulse {
  0%, 100% { 
    box-shadow: 0 0 20px rgba(212,165,116,0.6), 0 0 35px rgba(212,165,116,0.4);
  }
  50% { 
    box-shadow: 0 0 30px rgba(212,165,116,0.8), 0 0 50px rgba(212,165,116,0.6);
  }
}

.progression-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-icon {
  font-size: 14px;
}

.stat-value {
  font-size: 13px;
  font-weight: 700;
  color: #1f2937;
  min-width: 20px;
  text-align: center;
}

body.game-mode-active .stat-value {
  color: #d4a574;
  text-shadow: 0 0 8px rgba(212,165,116,0.4);
}

/* Responsive - stack on smaller screens */
@media (max-width: 1024px) {
  .header-game-controls {
    align-items: center;
  }
  
  .agora-progression-header {
    font-size: 11px;
  }
  
  .stat-icon {
    font-size: 12px;
  }
}
/* ========== AGORA CONTROLS & PROGRESSION - TOP RIGHT CORNER ========== */
.agora-hero {
  position: relative;
  padding-right: 100px;
}

.agora-controls {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.agora-toggle-group {
  display: flex;
  gap: 4px;
  background: rgba(255,249,239,0.9);
  border: 2px solid rgba(139,92,246,0.3);
  border-radius: 8px;
  padding: 3px;
}

.agora-toggle-btn {
  padding: 4px 10px;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  background: transparent;
  color: #64748b;
  white-space: nowrap;
}

.agora-toggle-btn.active {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
  box-shadow: 0 2px 6px rgba(139,92,246,0.3);
}

.agora-toggle-btn:hover:not(.active) {
  background: rgba(139,92,246,0.1);
  color: #8b5cf6;
}

/* Progression Tracker - Below Toggle Buttons */
.agora-progression {
  display: flex;
  gap: 8px;
  background: rgba(255,249,239,0.6);
  border: 2px solid rgba(212,180,138,0.3);
  border-radius: 8px;
  padding: 4px 8px;
  opacity: 0.5;
  transition: all 0.5s ease;
}

.agora-stat {
  display: flex;
  align-items: center;
  gap: 3px;
}

.stat-emoji {
  font-size: 12px;
}

.stat-value {
  font-size: 11px;
  font-weight: 700;
  color: #1f2937;
  min-width: 16px;
  text-align: center;
}

/* Game Mode Active State */
body.game-mode-active .agora-progression {
  opacity: 1;
  background: rgba(255,249,239,0.95);
  border-color: #d4a574;
  box-shadow: 
    0 0 15px rgba(212,165,116,0.5),
    0 0 25px rgba(212,165,116,0.3);
  animation: goldenPulse 2s ease-in-out infinite;
}

@keyframes goldenPulse {
  0%, 100% { 
    box-shadow: 0 0 15px rgba(212,165,116,0.5), 0 0 25px rgba(212,165,116,0.3);
  }
  50% { 
    box-shadow: 0 0 20px rgba(212,165,116,0.7), 0 0 35px rgba(212,165,116,0.5);
  }
}

body.game-mode-active .stat-value {
  color: #d4a574;
  text-shadow: 0 0 6px rgba(212,165,116,0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .agora-hero {
    padding-right: 0;
  }
  
  .agora-controls {
    position: static;
    align-items: center;
    margin: 12px 0;
  }
}

/* Game Mode Active State */
body.game-mode-active .agora-progression {
  opacity: 1;
  background: rgba(255,249,239,0.95);
  border-color: #d4a574;
  box-shadow: 
    0 0 15px rgba(212,165,116,0.5),
    0 0 25px rgba(212,165,116,0.3);
  animation: goldenPulse 2s ease-in-out infinite;
}

@keyframes goldenPulse {
  0%, 100% { 
    box-shadow: 0 0 15px rgba(212,165,116,0.5), 0 0 25px rgba(212,165,116,0.3);
  }
  50% { 
    box-shadow: 0 0 20px rgba(212,165,116,0.7), 0 0 35px rgba(212,165,116,0.5);
  }
}

body.game-mode-active .stat-value {
  color: #d4a574;
  text-shadow: 0 0 6px rgba(212,165,116,0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .agora-hero {
    padding-right: 0;
  }
  
  .agora-controls {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}
}

/* Game Mode Active State */
body.game-mode-active .agora-progression {
  opacity: 1;
  background: rgba(255,249,239,0.95);
  border-color: #d4a574;
  box-shadow: 
    0 0 20px rgba(212,165,116,0.6),
    0 0 35px rgba(212,165,116,0.4);
  animation: goldenPulse 2s ease-in-out infinite;
}

@keyframes goldenPulse {
  0%, 100% { 
    box-shadow: 0 0 20px rgba(212,165,116,0.6), 0 0 35px rgba(212,165,116,0.4);
  }
  50% { 
    box-shadow: 0 0 30px rgba(212,165,116,0.8), 0 0 50px rgba(212,165,116,0.6);
  }
}

body.game-mode-active .stat-value {
  color: #d4a574;
  text-shadow: 0 0 8px rgba(212,165,116,0.4);
}

/* Responsive */
@media (max-width: 768px) {
  .agora-controls {
    gap: 10px;
  }
  
  .agora-progression {
    gap: 12px;
    padding: 6px 12px;
    font-size: 13px;
  }
  
  .stat-emoji {
    font-size: 14px;
  }
  
  .stat-value {
    font-size: 13px;
  }
}
/* Battle Meter (Beef Meter) - Slim Horizontal Widget - ORANGE GLOW */
.agora-beef-meter {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,249,239,0.95);
  backdrop-filter: blur(20px);
  border: 3px solid #fb923c;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 
    0 0 30px rgba(251,146,60,0.4),
    0 8px 20px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.5);
  animation: agoraBeefGlow 3s ease-in-out infinite;
}

@keyframes agoraBeefGlow {
  0%, 100% { 
    box-shadow: 
      0 0 30px rgba(251,146,60,0.4),
      0 8px 20px rgba(0,0,0,0.15),
      inset 0 1px 0 rgba(255,255,255,0.5);
  }
  50% { 
    box-shadow: 
      0 0 45px rgba(251,146,60,0.6),
      0 8px 20px rgba(0,0,0,0.15),
      inset 0 1px 0 rgba(255,255,255,0.6);
  }
}

.agora-beef-meter h3 {
  color: #fb923c;
  font-size: 14px;
  margin: 0 0 8px 0;
  text-shadow: 0 0 10px rgba(251,146,60,0.3);
}

.beef-meter-bar {
  background: #e2e8f0;
  height: 20px;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 
    inset 0 2px 4px rgba(0,0,0,0.1),
    0 2px 8px rgba(0,0,0,0.05);
  border: 2px solid rgba(251,146,60,0.3);
}

.beef-meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #ef4444, #f59e0b, #22c55e);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  color: white;
  font-weight: 700;
  font-size: 11px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px currentColor;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
/* Mode Info Modal - Appears in Game Mode */
.agora-mode-info-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.agora-mode-info-content {
  background: var(--card);
  border: 3px solid #8b5cf6;
  border-radius: 20px;
  padding: 32px;
  max-width: 900px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 
    0 0 40px rgba(139, 92, 246, 0.6),
    0 8px 32px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.4s ease;
  position: relative;
}

.agora-mode-info-inner {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  height: 100%;
  max-height: calc(80vh - 64px);
}

.agora-mode-info-poster {
  flex: 0 0 280px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
}

.agora-mode-info-poster img {
  width: 100%;
  height: auto;
  max-height: calc(80vh - 64px);
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 
    0 4px 20px rgba(139, 92, 246, 0.4),
    0 0 60px rgba(139, 92, 246, 0.2);
  transition: all 0.3s ease;
}

.agora-mode-info-poster img:hover {
  transform: scale(1.02);
  box-shadow: 
    0 6px 30px rgba(139, 92, 246, 0.6),
    0 0 80px rgba(139, 92, 246, 0.3);
}

.agora-mode-info-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding-right: 8px;
  min-width: 0;
}

.agora-mode-info-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  z-index: 1;
}

.agora-mode-info-close:hover {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
  transform: scale(1.1);
}

.agora-mode-info-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(139, 92, 246, 0.3);
}

.agora-mode-info-emoji {
  font-size: 48px;
  line-height: 1;
}

.agora-mode-info-header h2 {
  margin: 0;
  font-size: 24px;
  color: var(--text);
}

.agora-mode-info-body {
  margin-bottom: 24px;
  flex: 1;
}

.agora-mode-info-section {
  margin-bottom: 20px;
}

.agora-mode-info-section:last-child {
  margin-bottom: 0;
}

.agora-mode-info-section h3 {
  font-size: 14px;
  color: #8b5cf6;
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.agora-mode-info-section p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

/* Responsive: Stack vertically on mobile */
@media (max-width: 768px) {
  .agora-mode-info-inner {
    flex-direction: column;
    gap: 24px;
  }
  
  .agora-mode-info-poster {
    flex: 0 0 auto;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }
  
  .agora-mode-info-content {
    max-width: 95%;
  }
}

.agora-mode-start-btn {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.agora-mode-start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

.agora-mode-start-btn:active {
  transform: translateY(0);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
/* ========== GAME MODE VISUAL TRANSFORMATIONS ========== */

/* Active Mode Avatar - Hidden by default, shown in game mode */
.agora-active-avatar {
  width: auto;
  max-width: 330px;
  height: 125px;
  margin: 4px auto 0 auto;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.5s ease;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.agora-active-avatar img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 
    0 4px 20px rgba(139, 92, 246, 0.4),
    0 0 40px rgba(139, 92, 246, 0.3);
  border: 2px solid rgba(139, 92, 246, 0.5);
}

body.game-mode-active .agora-active-avatar {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Mode buttons container aligns left in game mode */
body.game-mode-active .agora-modes {
  justify-content: flex-start !important;
  gap: 8px !important;
}

/* Mode buttons shrink in game mode */
body.game-mode-active .agora-modes .agora-mode-btn {
  padding: 9px 15px !important;
  font-size: 13px !important;
  min-width: 100px !important;
  flex: 0 0 auto !important;
}

/* Prevent overflow from glow effects */
.agora-main {
  overflow: visible;
  position: relative;
}

.agora-sidebar {
  overflow: visible;
  position: relative;
}

/* Main chat area gets subtle glow in game mode */
body.game-mode-active .agora-chat {
  box-shadow: 
    inset 0 0 15px rgba(139,92,246,.08),
    0 0 20px rgba(139,92,246,.15),
    0 0 35px rgba(139,92,246,.1);
  animation: chatGamePulse 3s ease-in-out infinite;
}

@keyframes chatGamePulse {
  0%, 100% {
    box-shadow: 
      inset 0 0 15px rgba(139,92,246,.08),
      0 0 20px rgba(139,92,246,.15),
      0 0 35px rgba(139,92,246,.1);
  }
  50% {
    box-shadow: 
      inset 0 0 30px rgba(139,92,246,.15),
      0 0 40px rgba(139,92,246,.35),
      0 0 60px rgba(139,92,246,.25);
  }
}

/* Fade inactive widgets MUCH more in game mode */
body.game-mode-active .agora-sidebar > div {
  opacity: 0.25;
  filter: grayscale(0.5) blur(1px);
  transition: all 0.6s ease;
  transform: scale(0.98);
}

/* Active widget - full intensity with scale and multiple effects */
body.game-mode-active .agora-sidebar > div.mode-active {
  opacity: 1;
  filter: grayscale(0) blur(0) brightness(1.1);
  transform: scale(1.02);
  position: relative;
  z-index: 10;
  order: -1;
}

/* Set default order for all widgets - Manipulation, Fallacy, Devil, Socrates, Source */
.agora-fallacy:last-of-type {
  order: 1;
}

.agora-fallacy:first-of-type {
  order: 2;
}

.agora-beef-meter {
  order: 3;
}

.agora-challenge {
  order: 4;
}

.agora-source {
  order: 5;
}

/* Source Mode - INTENSE GREEN GLOW */
body.game-mode-active .agora-source.mode-active {
  border-color: #22c55e;
  border-width: 4px;
  box-shadow: 
    0 0 30px rgba(34,197,94,0.9),
    0 0 50px rgba(34,197,94,0.6),
    0 0 80px rgba(34,197,94,0.3),
    inset 0 0 20px rgba(34,197,94,0.15),
    0 8px 24px rgba(0,0,0,0.25);
  animation: sourceGlowPulse 1.5s ease-in-out infinite, floatAnimation 3s ease-in-out infinite;
}

@keyframes sourceGlowPulse {
  0%, 100% { 
    box-shadow: 
      0 0 30px rgba(34,197,94,0.9),
      0 0 50px rgba(34,197,94,0.6),
      0 0 80px rgba(34,197,94,0.3),
      inset 0 0 20px rgba(34,197,94,0.15),
      0 8px 24px rgba(0,0,0,0.25);
  }
  50% { 
    box-shadow: 
      0 0 45px rgba(34,197,94,1),
      0 0 70px rgba(34,197,94,0.8),
      0 0 110px rgba(34,197,94,0.5),
      inset 0 0 30px rgba(34,197,94,0.25),
      0 12px 32px rgba(0,0,0,0.25);
  }
}

/* Socrates Mode - INTENSE PURPLE GLOW (Daily Challenge) */
body.game-mode-active .agora-challenge.mode-active {
  border-color: #8b5cf6;
  border-width: 4px;
  box-shadow: 
    0 0 30px rgba(139,92,246,0.9),
    0 0 50px rgba(139,92,246,0.6),
    0 0 80px rgba(139,92,246,0.3),
    inset 0 0 20px rgba(139,92,246,0.15),
    0 8px 24px rgba(0,0,0,0.25);
  animation: socratesGlowPulse 1.5s ease-in-out infinite, floatAnimation 3s ease-in-out infinite;
}

@keyframes socratesGlowPulse {
  0%, 100% { 
    box-shadow: 
      0 0 30px rgba(139,92,246,0.9),
      0 0 50px rgba(139,92,246,0.6),
      0 0 80px rgba(139,92,246,0.3),
      inset 0 0 20px rgba(139,92,246,0.15),
      0 8px 24px rgba(0,0,0,0.25);
  }
  50% { 
    box-shadow: 
      0 0 45px rgba(139,92,246,1),
      0 0 70px rgba(139,92,246,0.8),
      0 0 110px rgba(139,92,246,0.5),
      inset 0 0 30px rgba(139,92,246,0.25),
      0 12px 32px rgba(0,0,0,0.25);
  }
}

/* Devil Mode - INTENSE ORANGE GLOW (Beef Meter) */
body.game-mode-active .agora-beef-meter.mode-active {
  border-color: #fb923c;
  border-width: 4px;
  box-shadow: 
    0 0 30px rgba(251,146,60,0.9),
    0 0 50px rgba(251,146,60,0.6),
    0 0 80px rgba(251,146,60,0.3),
    inset 0 0 20px rgba(251,146,60,0.15),
    0 8px 24px rgba(0,0,0,0.25);
  animation: devilGlowPulse 1.5s ease-in-out infinite, floatAnimation 3s ease-in-out infinite;
}

@keyframes devilGlowPulse {
  0%, 100% { 
    box-shadow: 
      0 0 30px rgba(251,146,60,0.9),
      0 0 50px rgba(251,146,60,0.6),
      0 0 80px rgba(251,146,60,0.3),
      inset 0 0 20px rgba(251,146,60,0.15),
      0 8px 24px rgba(0,0,0,0.25);
  }
  50% { 
    box-shadow: 
      0 0 45px rgba(251,146,60,1),
      0 0 70px rgba(251,146,60,0.8),
      0 0 110px rgba(251,146,60,0.5),
      inset 0 0 30px rgba(251,146,60,0.25),
      0 12px 32px rgba(0,0,0,0.25);
  }
}

/* Dictator/Fallacy Mode - INTENSE RED GLOW (Fallacy Cards) */
body.game-mode-active .agora-fallacy.mode-active:first-of-type {
  border-color: #ef4444;
  border-width: 4px;
  box-shadow: 
    0 0 30px rgba(239,68,68,0.9),
    0 0 50px rgba(239,68,68,0.6),
    0 0 80px rgba(239,68,68,0.3),
    inset 0 0 20px rgba(239,68,68,0.15),
    0 8px 24px rgba(0,0,0,0.25);
  animation: fallacyGlowPulse 1.5s ease-in-out infinite, floatAnimation 3s ease-in-out infinite;
}

@keyframes fallacyGlowPulse {
  0%, 100% { 
    box-shadow: 
      0 0 30px rgba(239,68,68,0.9),
      0 0 50px rgba(239,68,68,0.6),
      0 0 80px rgba(239,68,68,0.3),
      inset 0 0 20px rgba(239,68,68,0.15),
      0 8px 24px rgba(0,0,0,0.25);
  }
  50% { 
    box-shadow: 
      0 0 45px rgba(239,68,68,1),
      0 0 70px rgba(239,68,68,0.8),
      0 0 110px rgba(239,68,68,0.5),
      inset 0 0 30px rgba(239,68,68,0.25),
      0 12px 32px rgba(0,0,0,0.25);
  }
}

/* Showman Mode - INTENSE CYAN GLOW (Manipulation Cards) */
body.game-mode-active .agora-fallacy.mode-active:last-of-type {
  border-color: #06b6d4;
  border-width: 4px;
  box-shadow: 
    0 0 30px rgba(6,182,212,0.9),
    0 0 50px rgba(6,182,212,0.6),
    0 0 80px rgba(6,182,212,0.3),
    inset 0 0 20px rgba(6,182,212,0.15),
    0 8px 24px rgba(0,0,0,0.25);
  animation: showmanGlowPulse 1.5s ease-in-out infinite, floatAnimation 3s ease-in-out infinite;
}

@keyframes showmanGlowPulse {
  0%, 100% { 
    box-shadow: 
      0 0 30px rgba(6,182,212,0.9),
      0 0 50px rgba(6,182,212,0.6),
      0 0 80px rgba(6,182,212,0.3),
      inset 0 0 20px rgba(6,182,212,0.15),
      0 8px 24px rgba(0,0,0,0.25);
  }
  50% { 
    box-shadow: 
      0 0 45px rgba(6,182,212,1),
      0 0 70px rgba(6,182,212,0.8),
      0 0 110px rgba(6,182,212,0.5),
      inset 0 0 30px rgba(6,182,212,0.25),
      0 12px 32px rgba(0,0,0,0.25);
  }
}

/* Floating animation for active widgets */
@keyframes floatAnimation {
  0%, 100% {
    transform: scale(1.02) translateY(0px);
  }
  50% {
    transform: scale(1.02) translateY(-4px);
  }
}

/* Mode button gets stronger glow in game mode */
body.game-mode-active .agora-mode-btn.active {
  box-shadow: 
    0 0 15px rgba(139,92,246,0.7),
    0 0 30px rgba(139,92,246,0.4),
    0 4px 12px rgba(139,92,246,0.3);
  animation: buttonPulse 2s ease-in-out infinite;
}

@keyframes buttonPulse {
  0%, 100% {
    box-shadow: 
      0 0 15px rgba(139,92,246,0.7),
      0 0 30px rgba(139,92,246,0.4),
      0 4px 12px rgba(139,92,246,0.3);
  }
  50% {
    box-shadow: 
      0 0 25px rgba(139,92,246,0.9),
      0 0 45px rgba(139,92,246,0.6),
      0 6px 18px rgba(139,92,246,0.5);
  }
}
/* Card Auto-Highlighting - When detected in conversation */
.card-highlighted {
  border-color: #06b6d4 !important;
  border-width: 3px !important;
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.9),
              0 0 60px rgba(6, 182, 212, 0.7),
              0 0 90px rgba(6, 182, 212, 0.5),
              inset 0 0 30px rgba(6, 182, 212, 0.3) !important;
  animation: fanfare-entrance 0.6s ease-out, pulse-glow 2s ease-in-out 0.6s infinite;
  transform: scale(1.05);
  z-index: 100;
  position: relative;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(8, 145, 178, 0.1)) !important;
}

@keyframes fanfare-entrance {
  0% {
    transform: scale(0.8) rotate(-5deg);
    opacity: 0;
    box-shadow: 0 0 0 rgba(6, 182, 212, 0);
  }
  50% {
    transform: scale(1.15) rotate(2deg);
    box-shadow: 0 0 50px rgba(6, 182, 212, 1),
                0 0 100px rgba(6, 182, 212, 0.8),
                0 0 150px rgba(6, 182, 212, 0.6);
  }
  100% {
    transform: scale(1.05) rotate(0deg);
    opacity: 1;
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.9),
                0 0 60px rgba(6, 182, 212, 0.7),
                0 0 90px rgba(6, 182, 212, 0.5),
                inset 0 0 30px rgba(6, 182, 212, 0.3);
    transform: scale(1.05);
  }
  50% {
    box-shadow: 0 0 40px rgba(6, 182, 212, 1),
                0 0 80px rgba(6, 182, 212, 0.9),
                0 0 120px rgba(6, 182, 212, 0.7),
                inset 0 0 40px rgba(6, 182, 212, 0.4);
    transform: scale(1.08);
  }
}

.fading {
  animation: fade-out 1s ease-out forwards;
}

@keyframes fade-out {
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

@media (max-width: 768px) {
  .agora-header {
    flex-direction: column !important;
    gap: 12px !important;
    padding: 12px !important;
  }
  
  .agora-mode-buttons {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  
  .agora-mode-btn {
    padding: 8px 12px !important;
    font-size: 13px !important;
    min-width: auto !important;
  }
  
  .agora-game-toggle {
    width: 100% !important;
    justify-content: center !important;
  }
  
  .agora-progression {
    width: 100% !important;
    justify-content: space-around !important;
    padding: 8px !important;
  }
  
  .agora-stat {
    font-size: 11px !important;
  }
  
  .agora-sidebar {
    padding: 12px !important;
    gap: 12px !important;
  }
  
  .agora-fallacy {
    padding: 12px !important;
  }
  
  .agora-fallacy h3 {
    font-size: 14px !important;
  }
  
  .agora-fallacy-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    max-height: 300px !important;
  }
  
  .agora-fallacy-card {
    padding: 10px !important;
    font-size: 12px !important;
  }
  
  .agora-fallacy-card h4 {
    font-size: 13px !important;
    margin-bottom: 4px !important;
  }
  
  .agora-fallacy-card p {
    font-size: 11px !important;
  }
  
  .agora-source {
    padding: 12px !important;
  }
  
  .agora-source h3 {
    font-size: 14px !important;
  }
  
  .agora-credibility-bar {
    height: 20px !important;
  }
  
  .agora-credibility-label {
    font-size: 11px !important;
  }
  
  .agora-beef-meter {
    padding: 10px 12px !important;
  }
  
  .agora-beef-meter h3 {
    font-size: 13px !important;
  }
  
  .agora-beef-fill {
    height: 20px !important;
  }
  
  .agora-beef-text {
    font-size: 11px !important;
  }
  
  .agora-challenge {
    padding: 12px !important;
  }
  
  .agora-challenge h3 {
    font-size: 14px !important;
  }
  
  .agora-challenge-content p {
    font-size: 12px !important;
  }
  
  .agora-challenge-timer {
    font-size: 20px !important;
    padding: 8px 16px !important;
  }
  
  .agora-chat-area {
    padding: 12px !important;
    font-size: 14px !important;
  }
  
  .agora-input-area {
    padding: 12px !important;
    gap: 8px !important;
  }
  
  #agoraInput {
    font-size: 14px !important;
    padding: 10px !important;
  }
  
  .agora-send-btn {
    padding: 10px 16px !important;
    font-size: 14px !important;
  }
}

@media (max-width: 480px) {
  .agora-mode-btn {
    padding: 6px 10px !important;
    font-size: 12px !important;
  }
  
  .agora-progression {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  
  .agora-stat {
    font-size: 10px !important;
    padding: 4px 8px !important;
  }
  
  .agora-fallacy-grid {
    max-height: 250px !important;
  }
  
  .agora-fallacy-card {
    padding: 8px !important;
  }
  
  .agora-fallacy-card h4 {
    font-size: 12px !important;
  }
  
  .agora-fallacy-card p {
    font-size: 10px !important;
    line-height: 1.3 !important;
  }
  
  .agora-chat-area {
    font-size: 13px !important;
  }
  
  #agoraInput {
    font-size: 13px !important;
  }
  
  body.game-mode-active .agora-fallacy.mode-active,
  body.game-mode-active .agora-source.mode-active,
  body.game-mode-active .agora-beef-meter.mode-active,
  body.game-mode-active .agora-challenge.mode-active {
    transform: scale(1) !important;
  }
  
  body.game-mode-active .mode-inactive {
    opacity: 0.4 !important;
  }
}

@media (max-width: 360px) {
  .agora-header {
    padding: 8px !important;
  }
  
  .agora-mode-btn {
    padding: 5px 8px !important;
    font-size: 11px !important;
  }
  
  .agora-stat {
    font-size: 9px !important;
    padding: 3px 6px !important;
  }
  
  .agora-fallacy-card h4 {
    font-size: 11px !important;
  }
  
  .agora-fallacy-card p {
    font-size: 9px !important;
  }
}

/* ========== AGORA MOBILE RESPONSIVENESS ========== */

@media (max-width: 600px) {
  .agora-container {
    grid-template-columns: 1fr !important;
  }
  
  .agora-sidebar {
    width: 100% !important;
    max-height: 400px !important;
    order: 2;
  }
  
  .agora-main {
    order: 1;
  }
}

@media (max-width: 768px) {
  .agora-header {
    flex-direction: column !important;
    gap: 12px !important;
    padding: 12px !important;
  }
  
  .agora-mode-buttons {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  
  .agora-mode-btn {
    padding: 8px 12px !important;
    font-size: 13px !important;
    min-width: auto !important;
  }
  
  .agora-game-toggle {
    width: 100% !important;
    justify-content: center !important;
  }
  
  .agora-progression {
    width: 100% !important;
    justify-content: space-around !important;
    padding: 8px !important;
  }
  
  .agora-stat {
    font-size: 11px !important;
  }
  
  .agora-sidebar {
    padding: 12px !important;
    gap: 12px !important;
  }
  
  .agora-fallacy {
    padding: 12px !important;
  }
  
  .agora-fallacy h3 {
    font-size: 14px !important;
  }
  
  .agora-fallacy-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    max-height: 300px !important;
  }
  
  .agora-fallacy-card {
    padding: 10px !important;
    font-size: 12px !important;
  }
  
  .agora-fallacy-card h4 {
    font-size: 13px !important;
    margin-bottom: 4px !important;
  }
  
  .agora-fallacy-card p {
    font-size: 11px !important;
  }
  
  .agora-source {
    padding: 12px !important;
  }
  
  .agora-source h3 {
    font-size: 14px !important;
  }
  
  .agora-credibility-bar {
    height: 20px !important;
  }
  
  .agora-credibility-label {
    font-size: 11px !important;
  }
  
  .agora-beef-meter {
    padding: 10px 12px !important;
  }
  
  .agora-beef-meter h3 {
    font-size: 13px !important;
  }
  
  .agora-beef-fill {
    height: 20px !important;
  }
  
  .agora-beef-text {
    font-size: 11px !important;
  }
  
  .agora-challenge {
    padding: 12px !important;
  }
  
  .agora-challenge h3 {
    font-size: 14px !important;
  }
  
  .agora-challenge-content p {
    font-size: 12px !important;
  }
  
  .agora-challenge-timer {
    font-size: 20px !important;
    padding: 8px 16px !important;
  }
  
  .agora-chat-area {
    padding: 12px !important;
    font-size: 14px !important;
  }
  
  .agora-input-area {
    padding: 12px !important;
    gap: 8px !important;
  }
  
  #agoraInput {
    font-size: 14px !important;
    padding: 10px !important;
  }
  
  .agora-send-btn {
    padding: 10px 16px !important;
    font-size: 14px !important;
  }
}

@media (max-width: 480px) {
  .agora-mode-btn {
    padding: 6px 10px !important;
    font-size: 12px !important;
  }
  
  .agora-progression {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  
  .agora-stat {
    font-size: 10px !important;
    padding: 4px 8px !important;
  }
  
  .agora-fallacy-grid {
    max-height: 250px !important;
  }
  
  .agora-fallacy-card {
    padding: 8px !important;
  }
  
  .agora-fallacy-card h4 {
    font-size: 12px !important;
  }
  
  .agora-fallacy-card p {
    font-size: 10px !important;
    line-height: 1.3 !important;
  }
  
  .agora-chat-area {
    font-size: 13px !important;
  }
  
  #agoraInput {
    font-size: 13px !important;
  }
  
  body.game-mode-active .agora-fallacy.mode-active,
  body.game-mode-active .agora-source.mode-active,
  body.game-mode-active .agora-beef-meter.mode-active,
  body.game-mode-active .agora-challenge.mode-active {
    transform: scale(1) !important;
  }
  
  body.game-mode-active .mode-inactive {
    opacity: 0.4 !important;
  }
}

@media (max-width: 360px) {
  .agora-header {
    padding: 8px !important;
  }
  
  .agora-mode-btn {
    padding: 5px 8px !important;
    font-size: 11px !important;
  }
  
  .agora-stat {
    font-size: 9px !important;
    padding: 3px 6px !important;
  }
  
  .agora-fallacy-card h4 {
    font-size: 11px !important;
  }
  
  .agora-fallacy-card p {
    font-size: 9px !important;
  }
}
/* ========================================
   COLAB WRITING MODE - Neon Glow Aesthetic
   ======================================== */

.colab-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
}

/* ===== HEADER ===== */
.colab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  position: relative;
  gap: 20px;
}

.colab-header h1 {
  font-size: 42px;
  font-weight: 800;
  background: linear-gradient(135deg, #8b5cf6, #3b82f6, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  text-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
  animation: titleGlow 3s ease-in-out infinite;
  flex: 1;
}

@keyframes titleGlow {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.4)); }
  50% { filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.8)); }
}

.colab-close-btn {
  background: rgba(239, 68, 68, 0.1);
  border: 2px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.colab-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

/* ===== PHASE HEADER ===== */
.colab-phase-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(59, 130, 246, 0.05));
  border-radius: 16px;
  border: 2px solid rgba(139, 92, 246, 0.2);
}

.colab-phase-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px 0;
}

.colab-phase-header p {
  font-size: 16px;
  color: var(--muted);
  margin: 0;
}

/* ===== PROJECT CARDS ===== */
.colab-project-card {
  background: var(--card-soft);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.colab-project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #8b5cf6, #3b82f6, #06b6d4);
  opacity: 0;
  transition: opacity 0.3s;
}

.colab-project-card:hover {
  border-color: #8b5cf6;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2);
}

.colab-project-card:hover::before {
  opacity: 1;
}

.colab-status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.2));
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

/* ===== EMPTY STATE ===== */
.colab-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.03), rgba(59, 130, 246, 0.03));
  border-radius: 16px;
  border: 2px dashed var(--border);
}

.colab-empty-state .emoji {
  font-size: 60px;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* ===== FORM ELEMENTS ===== */
.colab-form {
  background: var(--card-soft);
  border-radius: 16px;
  padding: 24px;
  border: 2px solid var(--border);
}

.colab-form label {
  display: block;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 8px;
  margin-top: 20px;
}

.colab-form label:first-of-type {
  margin-top: 0;
}

.colab-input,
.colab-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--background);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: all 0.3s;
  box-sizing: border-box;
}

.colab-input:focus,
.colab-textarea:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
  background: var(--card);
}

.colab-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}

/* ===== BUTTONS ===== */
.colab-btn-primary,
.colab-btn-secondary {
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.colab-btn-primary {
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  color: white;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.colab-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

.colab-btn-primary:active {
  transform: translateY(0);
}

.colab-btn-secondary {
  background: var(--card-soft);
  color: var(--text);
  border: 2px solid var(--border);
}

.colab-btn-secondary:hover {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.05);
  color: #8b5cf6;
}

/* ===== SESSION CARDS ===== */
.colab-session-card {
  background: var(--card-soft);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  border: 2px solid var(--border);
  transition: all 0.3s ease;
}

.colab-session-card:hover {
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1);
}

.colab-session-card h4 {
  margin: 0 0 12px 0;
  font-size: 18px;
  color: var(--text);
}

.colab-session-card strong {
  color: var(--text);
  font-size: 14px;
  display: block;
  margin-top: 8px;
}

.colab-session-card p {
  color: var(--muted);
  margin: 4px 0 0 0;
  font-size: 14px;
  line-height: 1.5;
}

/* ===== RADIO BUTTONS ===== */
.colab-radio-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  background: var(--card-soft);
}

.colab-radio-label:hover {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.05);
}

.colab-radio-label input[type="radio"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #8b5cf6;
}

.colab-radio-label input[type="radio"]:checked + span,
.colab-radio-label:has(input[type="radio"]:checked) {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.1);
}

/* ===== LOADING STATE ===== */
.colab-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 60px;
}

.colab-loading-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  animation: dotBounce 1.4s ease-in-out infinite;
}

.colab-loading-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.colab-loading-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotBounce {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* ===== FEEDBACK RESULTS ===== */
.colab-achievement-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 18px;
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.colab-feedback-section {
  background: var(--card-soft);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  border: 2px solid;
  transition: all 0.3s;
}

.colab-feedback-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.colab-feedback-section h3 {
  margin: 0 0 16px 0;
  color: var(--text);
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.colab-feedback-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.colab-feedback-list li {
  padding: 12px 16px;
  margin: 8px 0;
  background: white;
  border-radius: 10px;
  border-left: 4px solid;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  transition: all 0.3s;
}

.colab-feedback-list li:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .colab-container {
    padding: 16px;
  }

  .colab-header h1 {
    font-size: 32px;
  }

  .colab-phase-header h2 {
    font-size: 24px;
  }

  .colab-form {
    padding: 20px;
  }

  .colab-btn-primary,
  .colab-btn-secondary {
    padding: 12px 20px;
    font-size: 14px;
  }

  .colab-project-card,
  .colab-session-card {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .colab-header h1 {
    font-size: 28px;
  }

  .colab-close-btn {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .colab-container {
    padding: 12px;
  }
}

/* ===== DARK MODE ADJUSTMENTS ===== */
@media (prefers-color-scheme: dark) {
  .colab-feedback-list li {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
  }

  .colab-input,
  .colab-textarea {
    background: var(--card);
  }

  .colab-input:focus,
  .colab-textarea:focus {
    background: var(--background);
  }
}