/* ═══════════════════════════════════════
   ALCOCERMED JUEGOS — DESIGN SYSTEM
   Palette: Red #DC2626, Blue #2563EB, Yellow #F59E0B
   ═══════════════════════════════════════ */
:root {
  --red: #DC2626; --red-light: #FEE2E2; --red-dark: #991B1B;
  --blue: #2563EB; --blue-light: #DBEAFE; --blue-dark: #1E3A8A;
  --yellow: #F59E0B; --yellow-light: #FEF3C7; --yellow-dark: #92400E;
  --bg: #F8FAFC; --bg-card: #FFFFFF; --text: #1E293B; --text-mid: #64748B; --text-light: #94A3B8;
  --border: #E2E8F0; --shadow: 0 4px 24px rgba(0,0,0,.06); --radius: 16px;
  --badge-published-bg: #DCFCE7; --badge-published-color: #166534;
  --badge-draft-bg: #FEF3C7; --badge-draft-color: #92400E;
  --danger-bg: #FEF2F2; --danger-border: #FECACA;
  --fb-correct-bg: #F0FDF4; --fb-correct-border: #86EFAC; --fb-correct-text: #166534;
  --fb-incorrect-bg: #FEF2F2; --fb-incorrect-border: #FECACA;
  --score-correct-bg: #F0FDF4; --score-correct-border: #DCFCE7; --score-correct-text: #166534;
  --score-precision-bg: #EFF6FF; --score-precision-border: #DBEAFE; --score-precision-text: #1E40AF;
  --tag-livecard-bg: #EEF2F6; --tag-livecard-text: #475569;
  --sidebar-w: 260px; --topbar-h: 60px;
}
/* Modo oscuro: tonos azulados suaves (menos “pantalla negra” dura) */
[data-theme="dark"] {
  --bg: #131c2b;
  --bg-card: #1e2a3d;
  --text: #e8edf5;
  --text-mid: #9aa8bd;
  --text-light: #7c8aa1;
  --border: rgba(148, 163, 184, 0.16);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.38);
  --badge-published-bg: rgba(34,197,94,0.15); --badge-published-color: #4ADE80;
  --badge-draft-bg: rgba(245,158,11,0.15); --badge-draft-color: #FBBF24;
  --danger-bg: rgba(220,38,38,0.15); --danger-border: rgba(220,38,38,0.3);
  --fb-correct-bg: rgba(34,197,94,0.12); --fb-correct-border: rgba(34,197,94,0.25); --fb-correct-text: #4ADE80;
  --fb-incorrect-bg: rgba(220,38,38,0.12); --fb-incorrect-border: rgba(220,38,38,0.25);
  --score-correct-bg: rgba(34,197,94,0.12); --score-correct-border: rgba(34,197,94,0.2); --score-correct-text: #4ADE80;
  --score-precision-bg: rgba(37,99,235,0.12); --score-precision-border: rgba(37,99,235,0.2); --score-precision-text: #60A5FA;
  --tag-livecard-bg: rgba(148,163,184,0.15); --tag-livecard-text: var(--text-mid);
}
*{ margin:0; padding:0; box-sizing:border-box; font-family:'Inter',system-ui,sans-serif; }
html,body{ height:100%; background:var(--bg); color:var(--text); }
.hidden{ display:none!important; }

/* ═══ LOGIN — fondo oscuro + logo prepa / app + tarjeta clara ═══ */
.login-screen{
  position:fixed;inset:0;z-index:9999;
  background:linear-gradient(165deg,#060a14 0%,#0f1629 38%,#151032 72%,#0c1220 100%);
  display:flex;align-items:center;justify-content:center;
  padding:24px 16px;overflow:auto;
}

.login-screen-ambient{position:absolute;inset:0;pointer-events:none;overflow:hidden;}
.login-glow{position:absolute;border-radius:50%;filter:blur(88px);pointer-events:none;}
.login-glow-1{width:min(120vw,520px);height:min(120vw,520px);background:#3730a3;top:-25%;right:-30%;opacity:.35;}
.login-glow-2{width:min(100vw,440px);height:min(100vw,440px);background:#9f1239;bottom:-30%;left:-25%;opacity:.22;}

.login-screen-pattern{
  position:absolute;inset:0;pointer-events:none;
  background-image:radial-gradient(rgba(255,255,255,.06) 1px,transparent 1px);
  background-size:20px 20px;
}

.login-card{
  position:relative;z-index:2;width:100%;max-width:400px;
  padding:24px 26px 26px;
  background:linear-gradient(180deg,#ffffff 0%,#f1f5f9 100%);
  border-radius:24px;
  text-align:center;
  border:1px solid rgba(255,255,255,.12);
  box-shadow:
    0 0 0 1px rgba(15,23,42,.06),
    0 28px 64px rgba(0,0,0,.5),
    0 0 80px rgba(99,102,241,.12);
  animation:loginCardPop .5s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes loginCardPop{from{opacity:0;transform:translateY(18px) scale(.96);}to{opacity:1;transform:none;}}

.login-header{
  display:flex;flex-direction:row;align-items:center;justify-content:flex-start;
  gap:14px;margin-bottom:18px;padding:12px 14px;
  background:#f1f5f9;border:1px solid #e2e8f0;border-radius:16px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8);
}
.login-logo-ring{
  flex-shrink:0;width:64px;height:64px;border-radius:14px;padding:3px;box-sizing:border-box;
  display:flex;align-items:stretch;justify-content:stretch;
  background:linear-gradient(145deg,#818cf8,#c084fc);
  border:1px solid rgba(255,255,255,.5);
  box-shadow:0 4px 14px rgba(99,102,241,.25),inset 0 1px 0 rgba(255,255,255,.35);
}
.login-header-logo{
  flex:1;min-width:0;min-height:0;width:100%;height:100%;
  object-fit:cover;border-radius:11px;
  box-shadow:inset 0 0 0 1px rgba(15,23,42,.06);
}
.login-header-logo-fallback{
  display:flex;align-items:center;justify-content:center;
  flex:1;min-width:0;min-height:0;
  border-radius:11px;font-size:1.35rem;color:#fff;
  background:linear-gradient(135deg,var(--red),var(--blue));
}

.login-header-names{
  display:flex;flex-direction:column;gap:2px;align-items:flex-start;justify-content:center;
  flex:1;min-width:0;text-align:left;
}
.login-header-school{
  font-size:.92rem;font-weight:900;color:#0f172a;letter-spacing:-.02em;
  line-height:1.2;
}
.login-header-app{
  font-size:.62rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#64748b;
}

.login-form{display:flex;flex-direction:column;gap:17px;text-align:left;}
.login-field{text-align:left;}
.login-label{
  font-size:.78rem;font-weight:800;color:#3730a3;
  margin-bottom:7px;display:flex;align-items:center;gap:9px;
  text-transform:capitalize;letter-spacing:.01em;
}
.login-label i{
  width:28px;height:28px;border-radius:10px;
  display:flex;align-items:center;justify-content:center;
  font-size:.75rem;color:#fff;
  background:linear-gradient(135deg,#6366f1,#7c3aed);
  box-shadow:0 3px 12px rgba(99,102,241,.4);
}
.login-field:nth-child(2) .login-label i{background:linear-gradient(135deg,#ea580c,#dc2626);box-shadow:0 3px 12px rgba(220,38,38,.3);}

.login-input{
  width:100%;padding:14px 16px;
  background:#fff;border:2px solid #e2e8f0;border-radius:14px;
  color:#0f172a;font-size:.98rem;font-weight:600;
  outline:none;transition:border-color .2s,box-shadow .2s,background .2s;
}
.login-input::placeholder{color:#94a3b8;}
.login-input:focus{
  border-color:#6366f1;background:#fff;
  box-shadow:0 0 0 4px rgba(99,102,241,.18);
}
.login-input-wrap{position:relative;}
.login-input-wrap .login-input{padding-right:48px;}
.login-eye-btn{
  position:absolute;right:12px;top:50%;transform:translateY(-50%);
  background:none;border:none;color:#64748b;cursor:pointer;font-size:1rem;padding:6px;border-radius:10px;
  transition:color .15s,background .15s;
}
.login-eye-btn:hover{color:#4338ca;background:#eef2ff;}

.login-error{
  display:flex;align-items:center;gap:8px;padding:11px 14px;
  background:#fef2f2;border:2px solid #fecaca;border-radius:12px;
  color:#b91c1c;font-size:.8rem;font-weight:600;
}
.login-btn{
  width:100%;margin-top:2px;padding:15px 18px;border:none;border-radius:16px;cursor:pointer;
  font-size:1.02rem;font-weight:900;letter-spacing:.02em;color:#fff;
  background:linear-gradient(135deg,#4f46e5 0%,#7c3aed 45%,#db2777 100%);
  box-shadow:0 5px 0 #312e81,0 14px 28px rgba(79,70,229,.4);
  transition:transform .12s,box-shadow .12s,filter .2s;
}
.login-btn:hover{
  transform:translateY(-2px);
  filter:brightness(1.05);
  box-shadow:0 7px 0 #312e81,0 18px 36px rgba(124,58,237,.35);
}
.login-btn:active{transform:translateY(2px);box-shadow:0 2px 0 #312e81,0 8px 16px rgba(79,70,229,.25);}
.login-btn:disabled{opacity:.65;cursor:not-allowed;transform:none;filter:none;box-shadow:0 3px 0 #64748b;}

.login-footer{
  margin-top:20px;font-size:.7rem;font-weight:700;color:#64748b;line-height:1.35;
}

.login-mode-tabs{
  display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:16px;
}
.login-mode-tab{
  padding:10px 8px;border-radius:12px;border:2px solid #e2e8f0;background:#f8fafc;
  font-size:.72rem;font-weight:800;color:#64748b;cursor:pointer;transition:.15s;
}
.login-mode-tab.active{
  border-color:#6366f1;background:linear-gradient(135deg,#eef2ff,#ede9fe);
  color:#4338ca;box-shadow:0 4px 14px rgba(99,102,241,.18);
}
.demo-signup-hint{
  margin:0 0 14px;padding:12px 14px;border-radius:12px;
  background:linear-gradient(135deg,#eff6ff,#f5f3ff);border:1px solid #c7d2fe;
  font-size:.78rem;font-weight:600;color:#3730a3;line-height:1.45;
}
.demo-signup-hint i{color:#6366f1;margin-right:6px;}
.login-btn-demo{
  background:linear-gradient(135deg,#059669 0%,#10b981 45%,#34d399 100%) !important;
  box-shadow:0 5px 0 #047857,0 14px 28px rgba(16,185,129,.35) !important;
}
.login-btn-virtual{
  background:linear-gradient(135deg,#2563eb 0%,#4f46e5 45%,#7c3aed 100%) !important;
  box-shadow:0 5px 0 #3730a3,0 14px 28px rgba(79,70,229,.35) !important;
}
.demo-signup-success{
  margin-bottom:12px;padding:14px;border-radius:12px;text-align:left;
  background:#ecfdf5;border:2px solid #86efac;color:#14532d;font-size:.82rem;font-weight:600;line-height:1.45;
}
.demo-signup-success code{
  display:block;margin-top:4px;padding:6px 8px;background:#fff;border-radius:8px;
  font-size:.75rem;color:#0f172a;word-break:break-all;
}
.games-app-theme .login-mode-tab.active{border-color:rgba(250,204,21,.45);color:#fde68a;background:rgba(250,204,21,.12);}
.games-app-theme .demo-signup-hint{background:rgba(99,102,241,.12);border-color:rgba(129,140,248,.28);color:#e0e7ff;}
.games-app-theme .demo-signup-success{background:rgba(16,185,129,.12);border-color:rgba(52,211,153,.35);color:#d1fae5;}
.games-app-theme .demo-signup-success code{background:rgba(0,0,0,.2);color:#fff;}

/* ═══ APP SHELL ═══ */
.app-shell{display:flex;flex-direction:column;min-height:100vh;}

/* ═══ TOPBAR ═══ */
.topbar{position:fixed;top:0;left:0;right:0;height:var(--topbar-h);background:var(--bg-card);display:flex;align-items:center;padding:0 20px;gap:12px;z-index:100;border-bottom:1px solid var(--border);box-shadow:0 1px 4px rgba(0,0,0,.04);}
.hamburger{display:none;width:40px;height:40px;border-radius:10px;border:none;background:transparent;font-size:18px;color:var(--text);cursor:pointer;transition:.15s;}
.hamburger:hover{background:var(--blue-light);}
.topbar-brand{display:flex;align-items:center;gap:10px;}
.topbar-logo-icon{width:36px;height:36px;border-radius:10px;background:linear-gradient(135deg,var(--red),var(--blue));color:#fff;display:flex;align-items:center;justify-content:center;font-size:16px;}
.topbar-logo-text{font-size:1.05rem;font-weight:800;color:var(--text);}
.topbar-logo-text small{font-size:.7rem;font-weight:600;color:var(--text-mid);margin-left:4px;}
.topbar-spacer{flex:1;}
/* TOPBAR RIGHT: Clean Modern Educational App Style */
.topbar-actions{display:flex;align-items:center;gap:6px;}

.top-action-btn{height:36px;min-width:36px;padding:0 12px;border-radius:10px;background:transparent;color:var(--text-mid);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;font-size:1.1rem;transition:all 0.2s ease;}
.top-action-btn:hover{background:var(--border);color:var(--text);}
.top-action-btn.btn-primary{background:linear-gradient(135deg,#2563EB,#1E40AF);color:#fff;font-size:0.85rem;font-weight:700;padding:0 14px;box-shadow:0 4px 12px rgba(37,99,235,0.25);}
.top-action-btn.btn-primary:hover{transform:translateY(-1px);box-shadow:0 6px 16px rgba(37,99,235,0.35);}
.topbar-divider{width:1px;height:24px;background:var(--border);margin:0 4px;}

/* Menú de usuario (perfil + cerrar sesión) */
.user-menu-wrap{position:relative;}
.user-menu-trigger{display:flex;align-items:center;gap:10px;padding:6px 10px 6px 6px;border-radius:12px;border:1px solid transparent;background:transparent;cursor:pointer;font:inherit;color:inherit;text-align:left;transition:background .2s,border-color .2s,box-shadow .2s;}
.user-menu-trigger:hover{background:rgba(15,23,42,.04);border-color:var(--border);}
[data-theme="dark"] .user-menu-trigger:hover{background:rgba(255,255,255,.05);border-color:var(--border);box-shadow:0 0 0 1px rgba(255,255,255,.04);}
.user-menu-wrap.is-open .user-menu-trigger{background:rgba(37,99,235,.06);border-color:rgba(37,99,235,.2);}
[data-theme="dark"] .user-menu-wrap.is-open .user-menu-trigger{background:rgba(96,165,250,.1);border-color:rgba(96,165,250,.22);}
.user-menu-chevron{font-size:.6rem;color:var(--text-light);opacity:.85;transition:transform .2s ease;}
.user-menu-wrap.is-open .user-menu-chevron{transform:rotate(180deg);}

.user-menu-dropdown{position:absolute;right:0;top:calc(100% + 8px);min-width:220px;background:var(--bg-card);border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow);padding:6px;z-index:350;}
.user-menu-item{width:100%;display:flex;align-items:center;gap:12px;padding:11px 14px;border:none;border-radius:10px;background:transparent;font-size:.88rem;font-weight:600;color:var(--text);cursor:pointer;text-align:left;transition:background .15s,color .15s;}
.user-menu-item:hover{background:rgba(15,23,42,.06);}
[data-theme="dark"] .user-menu-item:hover{background:rgba(255,255,255,.06);}
.user-menu-item i{width:1.1rem;text-align:center;font-size:.95rem;opacity:.9;}
.user-menu-item--danger{color:var(--red);}
.user-menu-item--danger:hover{background:rgba(220,38,38,.1);color:var(--red-dark);}

.topbar-avatar{width:34px;height:34px;border-radius:50%;background:linear-gradient(135deg, #F59E0B, #E91E63);color:#fff;display:flex;align-items:center;justify-content:center;font-size:.9rem;font-weight:800;box-shadow:0 2px 8px rgba(233,30,99,0.3);}
.top-profile-info{display:flex;flex-direction:column;line-height:1.2;}
.topbar-username{font-size:.85rem;font-weight:700;color:var(--text);}
.topbar-role{font-size:.65rem;font-weight:600;color:var(--text-light);text-transform:uppercase;letter-spacing:0.5px;}

/* Tema / instalar: más suaves en oscuro */
[data-theme="dark"] .top-action-btn{color:var(--text-mid);}
[data-theme="dark"] .top-action-btn:hover{background:rgba(255,255,255,.07);color:var(--text);}
[data-theme="dark"] #theme-toggle-btn{background:rgba(251,191,36,.07);color:#fbbf24;}
[data-theme="dark"] #theme-toggle-btn:hover{background:rgba(251,191,36,.14);color:#fde68a;}
[data-theme="dark"] .top-action-btn.btn-primary{box-shadow:0 4px 18px rgba(37,99,235,.35);}

/* Tarjetas de inicio en modo oscuro (mantienen color sin quemar la vista) */
[data-theme="dark"] .qa-card-blue{background:linear-gradient(145deg,rgba(37,99,235,.14),rgba(30,58,138,.28));border-color:rgba(96,165,250,.22);}
[data-theme="dark"] .qa-card-blue .qa-icon{box-shadow:0 4px 14px rgba(37,99,235,.35);}
[data-theme="dark"] .qa-card-red{background:linear-gradient(145deg,rgba(220,38,38,.12),rgba(127,29,29,.22));border-color:rgba(248,113,113,.2);}
[data-theme="dark"] .qa-card-red .qa-icon{box-shadow:0 4px 14px rgba(220,38,38,.3);}
[data-theme="dark"] .qa-card-yellow{background:linear-gradient(145deg,rgba(245,158,11,.12),rgba(120,53,15,.2));border-color:rgba(251,191,36,.22);}
[data-theme="dark"] .qa-card-yellow .qa-icon{box-shadow:0 4px 14px rgba(245,158,11,.28);}
[data-theme="dark"] .qa-card h3{color:var(--text);}
[data-theme="dark"] .qa-card p{color:var(--text-mid);}
[data-theme="dark"] .join-card,[data-theme="dark"] .recent-section h2{color:var(--text);}
[data-theme="dark"] .empty-state i{color:rgba(148,163,184,.25);}

/* ═══ SIDEBAR ═══ */
.sidebar-overlay{position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:200;opacity:0;pointer-events:none;transition:opacity .3s;}
.sidebar-overlay.active{opacity:1;pointer-events:auto;}
.sidebar{position:fixed;top:0;left:0;bottom:0;width:var(--sidebar-w);background:var(--bg-card);z-index:201;display:flex;flex-direction:column;border-right:1px solid var(--border);transition:transform .3s cubic-bezier(.4,0,.2,1);}
.sidebar-header{display:flex;align-items:center;justify-content:space-between;padding:20px 16px;border-bottom:1px solid var(--border);}
.sidebar-logo{display:flex;align-items:center;gap:10px;}
.sb-logo-icon{width:40px;height:40px;border-radius:10px;background:linear-gradient(135deg,var(--red),var(--blue));color:#fff;display:flex;align-items:center;justify-content:center;font-size:16px;}
.sb-logo-text{font-size:1.1rem;font-weight:800;color:var(--text);}
.sb-logo-sub{display:block;font-size:.65rem;color:var(--text-light);font-weight:500;}
.sidebar-close{display:none;width:32px;height:32px;border-radius:8px;border:none;background:transparent;color:var(--text-light);cursor:pointer;font-size:16px;}
.sidebar-close:hover{background:var(--red-light);color:var(--red);}

.sidebar-nav{flex:1;padding:12px 8px;overflow-y:auto;}
.nav-item{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:12px;font-size:.88rem;font-weight:600;color:var(--text-mid);cursor:pointer;transition:all .15s;margin-bottom:2px;}
.nav-item:hover{background:var(--blue-light);color:var(--blue);}
.nav-item.active{background:var(--blue-light);color:var(--blue);font-weight:700;}
.nav-item i{width:20px;text-align:center;font-size:15px;}
.nav-divider{height:1px;background:var(--border);margin:12px 10px;}
.nav-section-title{display:block;font-size:.6rem;font-weight:700;letter-spacing:1.5px;color:var(--text-light);text-transform:uppercase;padding:4px 14px 8px;margin-top:4px;}

.sidebar-footer{padding:12px;border-top:1px solid var(--border);}
.sidebar-back-btn{width:100%;padding:12px;border-radius:12px;border:2px solid var(--border);background:transparent;color:var(--text-mid);font-size:.82rem;font-weight:600;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;transition:.2s;}
.sidebar-back-btn:hover{border-color:var(--red);color:var(--red);background:var(--red-light);}

/* ═══ MAIN CONTENT ═══ */
.main-content{margin-left:var(--sidebar-w);margin-top:var(--topbar-h);flex:1;padding:32px 40px 100px;min-height:calc(100vh - var(--topbar-h));}
.page{display:none;animation:fadeIn .3s ease;}
.page.active{display:block;}
.page-header h1{font-size:1.6rem;font-weight:900;margin-bottom:6px;color:var(--text);}
.page-subtitle{color:var(--text-mid);font-size:0.9rem;font-weight:600;}
@keyframes fadeIn{from{opacity:0;transform:translateY(8px);}to{opacity:1;transform:none;}}

.page-header{margin-bottom:28px;}
.page-header h1{font-size:1.6rem;font-weight:800;color:var(--text);display:flex;align-items:center;gap:10px;}
.page-header h1 i{color:var(--blue);font-size:1.2rem;}
.page-subtitle{font-size:.88rem;color:var(--text-mid);margin-top:4px;}

/* ═══ QUICK ACTIONS ═══ */
.quick-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;margin-bottom:32px;}
.qa-card{padding:28px 24px;border-radius:var(--radius);cursor:pointer;position:relative;overflow:hidden;transition:transform .2s,box-shadow .2s;border:1px solid transparent;}
.qa-card:hover{transform:translateY(-4px);box-shadow:var(--shadow);}
.qa-card-blue{background:linear-gradient(135deg,#EFF6FF,#DBEAFE);border-color:#BFDBFE;}
.qa-card-blue .qa-icon{background:var(--blue);color:#fff;}
.qa-card-red{background:linear-gradient(135deg,#FFF1F2,#FEE2E2);border-color:#FECACA;}
.qa-card-red .qa-icon{background:var(--red);color:#fff;}
.qa-card-yellow{background:linear-gradient(135deg,#FFFBEB,#FEF3C7);border-color:#FDE68A;}
.qa-card-yellow .qa-icon{background:var(--yellow);color:#fff;}
.qa-icon{width:48px;height:48px;border-radius:14px;display:flex;align-items:center;justify-content:center;font-size:20px;margin-bottom:14px;}
.qa-card h3{font-size:1rem;font-weight:700;margin-bottom:4px;}
.qa-card p{font-size:.78rem;color:var(--text-mid);}

/* ═══ JOIN SECTION ═══ */
.join-section{margin-bottom:32px;}
.join-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:28px 32px;box-shadow:var(--shadow);}
.join-card-header{display:flex;align-items:center;gap:10px;margin-bottom:8px;}
.join-card-header i{color:var(--blue);font-size:1.2rem;}
.join-card-header h2{font-size:1.1rem;font-weight:700;}
.join-card>p{font-size:.85rem;color:var(--text-mid);margin-bottom:16px;}
.join-input-row{display:flex;gap:10px;}
.join-code-input{flex:1;padding:14px 18px;border:2px solid var(--border);border-radius:12px;font-size:1.1rem;font-weight:700;letter-spacing:4px;text-align:center;outline:none;transition:border .2s;}
.join-code-input:focus{border-color:var(--blue);}
.join-code-btn{padding:14px 28px;border:none;border-radius:12px;background:linear-gradient(135deg,var(--blue),var(--blue-dark));color:#fff;font-size:.9rem;font-weight:700;cursor:pointer;display:flex;align-items:center;gap:8px;transition:transform .15s,box-shadow .2s;white-space:nowrap;}
.join-code-btn:hover{transform:translateY(-2px);box-shadow:0 6px 20px rgba(37,99,235,.3);}

/* ═══ JOIN FULL PAGE ═══ */
.join-full-card{max-width:480px;margin:0 auto;text-align:center;background:var(--bg-card);border:1px solid var(--border);border-radius:24px;padding:48px 36px;box-shadow:var(--shadow);}
.join-illustration-circle{width:100px;height:100px;border-radius:50%;background:linear-gradient(135deg,var(--blue-light),var(--blue));margin:0 auto 24px;display:flex;align-items:center;justify-content:center;font-size:36px;color:#fff;box-shadow:0 8px 32px rgba(37,99,235,.25);}
.join-full-card h2{font-size:1.3rem;font-weight:800;margin-bottom:8px;}
.join-full-card>p{font-size:.88rem;color:var(--text-mid);margin-bottom:24px;}
.join-full-input-row{display:flex;flex-direction:column;gap:12px;}
.join-code-full-input{padding:16px 12px;border:2px solid var(--border);border-radius:14px;font-size:1.2rem;font-weight:800;letter-spacing:2px;text-align:center;outline:none;transition:border .2s;width:100%;box-sizing:border-box;}
.join-code-full-input::placeholder{letter-spacing:0;font-size:1rem;font-weight:600;color:var(--text-light);}
.join-code-full-input:focus{border-color:var(--blue);}
.join-full-btn{padding:16px;border:none;border-radius:14px;background:linear-gradient(135deg,var(--blue),var(--blue-dark));color:#fff;font-size:1rem;font-weight:700;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;transition:transform .15s,box-shadow .2s;}
.join-full-btn:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(37,99,235,.35);}
.join-error{margin-top:14px;padding:10px 14px;background:var(--red-light);border:1px solid #FECACA;border-radius:10px;color:var(--red);font-size:.82rem;display:flex;align-items:center;gap:8px;}

/* ═══ RECENT / EMPTY ═══ */
.recent-section{margin-bottom:32px;}
.recent-section h2{font-size:1.05rem;font-weight:700;margin-bottom:16px;display:flex;align-items:center;gap:8px;}
.recent-section h2 i{color:var(--yellow);font-size:.9rem;}
.empty-state{text-align:center;padding:48px 20px;color:var(--text-light);}
.empty-state i{font-size:2.5rem;margin-bottom:12px;display:block;color:var(--border);}
.empty-state p{font-size:.92rem;font-weight:600;margin-bottom:4px;color:var(--text-mid);}
.empty-state small{font-size:.78rem;}

/* ═══ CREAR GRID (ADMIN) ═══ */
.crear-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;}
.crear-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:28px 24px;cursor:pointer;transition:transform .2s,box-shadow .2s;position:relative;}
.crear-card:hover{transform:translateY(-4px);box-shadow:var(--shadow);}
.crear-icon{width:52px;height:52px;border-radius:14px;display:flex;align-items:center;justify-content:center;font-size:22px;color:#fff;margin-bottom:16px;}
.crear-icon-eval{background:linear-gradient(135deg,#22C55E,#16A34A);}
.crear-icon-pres{background:linear-gradient(135deg,var(--blue),var(--blue-dark));}
.crear-icon-video{background:linear-gradient(135deg,var(--red),var(--red-dark));}
.crear-icon-flash{background:linear-gradient(135deg,var(--yellow),var(--yellow-dark));}
.crear-card h3{font-size:.95rem;font-weight:700;margin-bottom:4px;}
.crear-card p{font-size:.78rem;color:var(--text-mid);}
.crear-badge{position:absolute;top:12px;right:12px;font-size:.55rem;font-weight:700;background:var(--yellow-light);color:var(--yellow-dark);padding:3px 8px;border-radius:6px;text-transform:uppercase;letter-spacing:.5px;}

/* ═══ RESULTS / LIBRARY / REPORTS ═══ */
.results-list,.library-list,.reports-list{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);min-height:200px;}

/* ═══ BOTTOM NAV ═══ */
.bottom-nav{display:none;position:fixed;bottom:0;left:0;right:0;height:64px;background:var(--bg-card);border-top:1px solid var(--border);z-index:100;justify-content:space-around;align-items:center;box-shadow:0 -2px 12px rgba(0,0,0,.06);}
.bnav-item{display:flex;flex-direction:column;align-items:center;gap:2px;font-size:.62rem;font-weight:600;color:var(--text-light);cursor:pointer;padding:8px 12px;border-radius:10px;transition:.15s;}
.bnav-item i{font-size:18px;}
.bnav-item.active{color:var(--blue);}
.bnav-item:hover{color:var(--blue);}

/* ═══ RESPONSIVE ═══ */
@media(max-width:768px){
  .hamburger{display:flex;align-items:center;justify-content:center;}
  .sidebar{transform:translateX(-100%);}
  .sidebar.open{transform:translateX(0);}
  .sidebar-close{display:flex;align-items:center;justify-content:center;}
  .main-content{margin-left:0;padding:24px 16px 100px;}
  .bottom-nav{display:flex;}
  .topbar-username{display:none;}
  .join-input-row{flex-direction:column;}
  .quick-actions{grid-template-columns:1fr;}

  /* Page header responsive */
  .page-header h1{font-size:1.4rem;}
  .page-subtitle{font-size:0.82rem;}

  /* Evaluaciones Responsive */
  #quiz-container{margin:0 auto;padding:0 4px;}
  #quiz-question-card{padding:20px!important;margin-bottom:16px!important;}
  #quiz-question-text{font-size:1.1rem!important;}
  .quiz-opt-btn{padding:12px 16px!important;font-size:.9rem!important;}

  /* Quiz splash mobile */
  #splash-text{font-size:2.5rem!important;}

  /* Topbar Responsive */
  .install-text{display:none;}
  .top-action-btn.btn-primary{min-width:36px;padding:0!important;justify-content:center;border-radius:10px;}
  .topbar-actions{gap:4px;}
  .top-profile-info{display:none;}

  /* Login Responsive */
  .login-card{padding:24px 20px 22px;}
  .login-header{gap:12px;padding:10px 12px;margin-bottom:16px;}
  .login-logo-ring{width:56px;height:56px;border-radius:12px;padding:2px;}
  .login-header-logo,.login-header-logo-fallback{border-radius:9px;}
  .login-header-school{font-size:.86rem;}
  .login-header-app{font-size:.58rem;letter-spacing:.06em;}
  .login-btn{font-size:1rem;padding:14px 16px;}

  /* Tables Responsive */
  table th, table td {padding:8px 4px!important;}
}
@media(min-width:769px){
  .sidebar{transform:none;}
  #quiz-container{margin:0 auto;} /* Center the quiz on desktop too */
}

/* ═══ OFFICIAL GAME BACKGROUND ═══ */
.official-game-bg {
  background: 
    repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(255,255,255,0.03) 40px, rgba(255,255,255,0.03) 41px),
    repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(255,255,255,0.03) 40px, rgba(255,255,255,0.03) 41px),
    radial-gradient(circle at 50% 30%, #3a1c61 0%, #170b2e 60%, #0d041a 100%) !important;
  background-attachment: fixed !important;
}

/* ═══ STADIUM PODIUM ═══ */
.stadium-podium-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto 32px;
  background: transparent;
  border-radius: 24px;
  padding: 40px 20px 20px;
  position: relative;
  overflow: visible;
}

.stadium-bg-lines { display: none; }

.stadium-light-beam {
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 420px; height: 520px;
  background: radial-gradient(ellipse at top, rgba(255,215,0,0.38), transparent 65%);
  z-index: 2; mix-blend-mode: screen; pointer-events: none;
  animation: beamFlicker 4s ease-in-out infinite;
}
@keyframes beamFlicker { 0%,100%{opacity:.8} 50%{opacity:1} }

.podium-pillars-wrapper {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  position: relative;
  z-index: 10;
  padding: 0 4px 12px;
  margin-top: 20px;
}
.podium-pillars-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 12px;
  background: linear-gradient(to bottom, #ffe57f 0%, #ffc107 40%, #ff8f00 100%);
  border-radius: 4px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.5), inset 0 1px 2px rgba(255,255,255,0.4);
  z-index: 1;
}

.podium-cylinder {
  position: relative;
  flex: 1;
  max-width: 130px;
  min-width: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: podiumRise 0.9s cubic-bezier(0.175,0.885,0.32,1.275) forwards;
  opacity: 0;
  transform: translateY(70px);
  z-index: 2;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}
.podium-cylinder:hover {
  transform: translateY(-10px) !important;
}
@keyframes podiumRise { to { opacity:1; transform:translateY(0); } }

.cylinder-body {
  width: 100%;
  position: relative;
  border-radius: 0 0 35px 35px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 8px 16px;
  box-shadow:
    inset 0 12px 20px rgba(255,255,255,0.22),
    inset 0 -15px 30px rgba(0,0,0,0.45),
    0 15px 35px rgba(0,0,0,0.6) !important;
  transform-style: preserve-3d;
  border: none !important;
  position: relative;
  overflow: hidden;
}

.rank-1 .cylinder-body {
  min-height: 180px;
  background: linear-gradient(to bottom, #ffd54f, #ff9800) !important;
}
.rank-2 .cylinder-body {
  min-height: 140px;
  background: linear-gradient(to bottom, #dfe6ee, #8d99ae) !important;
}
.rank-3 .cylinder-body {
  min-height: 110px;
  background: linear-gradient(to bottom, #ffb074, #b75a20) !important;
}

/* Rounded Gold/Silver/Bronze Caps/Platforms */
.cylinder-top {
  width: calc(100% + 12px);
  height: 20px;
  border-radius: 50px;
  position: absolute;
  top: -10px; left: -6px;
  z-index: 3;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4), inset 0 2px 4px rgba(255,255,255,0.6);
}
.rank-1 .cylinder-top {
  background: linear-gradient(to bottom, #fff3c4 0%, #ffd700 40%, #b8860b 100%);
  box-shadow: 0 0 15px rgba(255,215,0,0.45), 0 4px 8px rgba(0,0,0,0.4), inset 0 2px 4px rgba(255,255,255,0.6);
}
.rank-2 .cylinder-top {
  background: linear-gradient(to bottom, #ffffff 0%, #c0c0c0 40%, #808080 100%);
  box-shadow: 0 0 10px rgba(200,200,200,0.35), 0 4px 8px rgba(0,0,0,0.4), inset 0 2px 4px rgba(255,255,255,0.6);
}
.rank-3 .cylinder-top {
  background: linear-gradient(to bottom, #ffe0b2 0%, #cd7f32 40%, #8b4513 100%);
  box-shadow: 0 0 10px rgba(205,127,50,0.35), 0 4px 8px rgba(0,0,0,0.4), inset 0 2px 4px rgba(255,255,255,0.6);
}

/* Avatar wrapper */
.podium-avatar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-bottom: 12px;
  position: relative;
  z-index: 5;
}
/* Glow ring */
.podium-avatar-ring {
  position: absolute;
  width: 76px; height: 76px;
  border-radius: 50%;
  top: 4px; left: 50%;
  transform: translateX(-50%);
  animation: glowPulse 2.2s ease-in-out infinite;
  pointer-events:none;
}
.rank-1 .podium-avatar-ring { background: radial-gradient(circle, rgba(255,215,0,0.6) 0%, transparent 70%); }
.rank-2 .podium-avatar-ring { background: radial-gradient(circle, rgba(200,225,245,0.5) 0%, transparent 70%); }
.rank-3 .podium-avatar-ring { background: radial-gradient(circle, rgba(210,130,50,0.5) 0%, transparent 70%); }
@keyframes glowPulse { 0%,100%{opacity:.65;transform:translateX(-50%) scale(1)} 50%{opacity:1;transform:translateX(-50%) scale(1.25)} }

/* Crown on 1st */
.podium-crown {
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 3px 6px rgba(255,180,0,0.95));
  animation: crownBounce 1.6s ease-in-out infinite;
  z-index: 7;
  margin-bottom: 2px;
}
@keyframes crownBounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }

.podium-avatar {
  font-size: 48px;
  line-height: 1;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.6));
  position: relative; z-index: 2;
  width: 72px; height: 72px;
  background: linear-gradient(to bottom, #49a3ff, #005eff);
  border-radius: 50%;
  border: 4px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(0,94,255,0.5);
}
.rank-1 .podium-avatar { border-color: #ffd700; box-shadow: 0 0 20px rgba(255,215,0,0.6); }
.rank-2 .podium-avatar { border-color: #e2e8f0; box-shadow: 0 0 15px rgba(226,232,240,0.5); }
.rank-3 .podium-avatar { border-color: #cd7f32; box-shadow: 0 0 15px rgba(205,127,50,0.5); }

.podium-name {
  font-size: 11px; font-weight: 900; color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.9);
  background: #111;
  border: 1px solid rgba(255,255,255,0.15);
  padding: 5px 12px; border-radius: 20px;
  white-space: nowrap; max-width: 110px;
  overflow: hidden; text-overflow: ellipsis;
  margin-top: 6px; backdrop-filter: blur(4px);
  display: block;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

/* Capsule Score badge overlayed at the very bottom of each pedestal */
.podium-score-badge {
  background: rgba(17, 17, 17, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 16px;
  border-radius: 16px;
  margin-top: 10px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.45);
  text-align: center;
  z-index: 5;
  width: 96%;
}
.podium-score-badge .score-pts {
  font-size: 0.82rem;
  font-weight: 900;
  color: #ffffff;
  white-space: nowrap;
}
.podium-score-badge .score-pct {
  font-size: 0.72rem;
  font-weight: 800;
  color: #ffca28;
  margin-top: 2px;
}

/* Rank number in the center of the column body */
.cylinder-rank {
  font-size: 5.4rem; font-weight: 900;
  font-family: Arial, sans-serif;
  line-height: 1;
  z-index: 3;
  margin-top: 4px;
}
.rank-1 .cylinder-rank {
  color: #ffffff;
  text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.rank-2 .cylinder-rank {
  color: #ffffff;
  text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.rank-3 .cylinder-rank {
  color: #ffffff;
  text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* Laurels wrapping rank 1 number */
.laurel-wreath-rank1-left, .laurel-wreath-rank1-right {
  position: absolute;
  font-size: 1.8rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.85;
}
.laurel-wreath-rank1-left { left: 8px; transform: translateY(-50%) rotate(-30deg); }
.laurel-wreath-rank1-right { right: 8px; transform: translateY(-50%) scaleX(-1) rotate(-30deg); }

/* Circular glowing neon-purple stage base */
.podium-stage-glow {
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%) rotateX(60deg);
  width: 380px;
  height: 130px;
  background: radial-gradient(ellipse at center, rgba(147, 51, 234, 0.4) 0%, rgba(147, 51, 234, 0.05) 50%, transparent 70%);
  border: 3px solid #9333ea;
  border-radius: 50%;
  box-shadow: 
    0 0 20px rgba(147, 51, 234, 0.8),
    inset 0 0 20px rgba(147, 51, 234, 0.6);
  z-index: 1;
  pointer-events: none;
}

#podium-confetti {
  position:absolute; inset:0; pointer-events:none; z-index:1;
  border-radius:24px;
}

@media(max-width:600px){
  .stadium-podium-container { padding: 20px 8px 16px; }
  .podium-cylinder { max-width: 100px; min-width: 76px; }
  .rank-1 .cylinder-body { min-height:130px; }
  .rank-2 .cylinder-body { min-height:98px; }
  .rank-3 .cylinder-body { min-height:70px; }
  .podium-avatar { font-size: 34px; }
  .podium-crown  { font-size: 16px; }
  .cylinder-rank { font-size: 26px; }
  .cylinder-top  { height: 30px; top: -15px; }
  .podium-name   { font-size: 10px; max-width: 88px; padding: 2px 6px; }
  .podium-score-badge { font-size: 9px; padding: 2px 5px; }
  .podium-avatar-ring { width: 52px; height: 52px; }
  .stadium-light-beam { width: 260px; height: 340px; }
}

/* Total Ranking Table - Premium Glassmorphic Theme for Live Quiz */
.total-ranking-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.total-ranking-table tr {
  background: rgba(255,255,255,0.06) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  border: 1px solid rgba(255,255,255,0.08) !important;
}
.total-ranking-table tr:hover {
  transform: translateY(-2px) scale(1.01);
  background: rgba(255,255,255,0.11) !important;
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
}
.total-ranking-table tr.is-me-row {
  background: rgba(233,30,99,0.18) !important;
  border: 1.5px solid rgba(233,30,99,0.55) !important;
  box-shadow: 0 4px 24px rgba(233,30,99,0.28);
}
.total-ranking-table tr.is-me-row:hover { background: rgba(233,30,99,0.26) !important; }
.total-ranking-table tr.row-gold   { border-color: rgba(255,215,0,0.35) !important; }
.total-ranking-table tr.row-silver { border-color: rgba(184,200,216,0.3) !important; }
.total-ranking-table tr.row-bronze { border-color: rgba(205,127,50,0.3) !important; }

.total-ranking-table td {
  padding: 16px 20px;
  border: none !important;
  color: #F1F5F9 !important;
}

.total-ranking-table td:first-child {
  border-radius: 16px 0 0 16px !important;
}

.total-ranking-table td:last-child {
  border-radius: 0 16px 16px 0 !important;
}

.tr-rank-circle {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}
.tr-gold   { background: linear-gradient(135deg,#FFD700,#b8860b); color:#1a1000 !important; border: 2px solid rgba(255,255,255,0.6); box-shadow:0 4px 16px rgba(255,215,0,0.5); }
.tr-silver { background: linear-gradient(135deg,#d4e4f0,#7090a0); color:#0a1820 !important; border: 2px solid rgba(255,255,255,0.5); }
.tr-bronze { background: linear-gradient(135deg,#e8a060,#7a4010); color:#fff !important;    border: 2px solid rgba(255,255,255,0.4); }
.tr-normal { background: rgba(255,255,255,0.1); color:#fff !important; border: 1px solid rgba(255,255,255,0.18); }

/* Text highlighting for readability inside table cells */
.total-ranking-table .player-name {
  color: #FFFFFF !important;
  font-weight: 800 !important;
  font-size: 1.05rem !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.total-ranking-table .player-score {
  color: #38BDF8 !important;
  font-weight: 900 !important;
  font-size: 1.25rem !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.total-ranking-table .player-score span {
  color: #94A3B8 !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
}

.total-ranking-table .player-pct {
  color: #34D399 !important;
  font-weight: 800 !important;
  font-size: 1.1rem !important;
  background: rgba(52, 211, 153, 0.15) !important;
  padding: 5px 12px;
  border-radius: 12px;
  display: inline-block;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* ═══ QUIZ RESPONSIVE LAYOUT ═══ */
.quiz-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  flex: 1;
}

/* TABLETS */
@media (max-width: 900px) {
  .quiz-options-grid {
    gap: 12px;
  }
}

/* SMARTPHONES (iPhone & Android) */
@media (max-width: 768px) {
  /* Main Container adjustments */
  .main-content {
    padding: 20px 16px 80px;
  }
  
  /* Topbar Mobile */
  .topbar-actions { gap: 4px; }
  .top-action-btn.btn-primary {
    padding: 0 10px;
    font-size: 0.75rem;
  }
  .topbar-logo-text small { display: none; } /* Ocultar "Admin" en celus muy chicos */

  /* Quiz HUD */
  #quiz-top-hud {
    flex-direction: column !important;
    gap: 8px;
    align-items: center;
  }

  /* Quiz Question Card */
  #quiz-question-card {
    padding: 20px !important;
    min-height: 120px !important;
    margin-bottom: 20px !important;
  }
  #quiz-question-text {
    font-size: 1.3rem !important;
  }

  /* Quiz Grid: Stack to 1 column on Mobile */
  .quiz-options-grid {
    grid-template-columns: 1fr;
  }
  .quiz-opt-btn {
    min-height: 70px !important;
    padding: 16px !important;
    font-size: 1.05rem !important;
  }

  /* Podium & Ranking Mobile */
  .stadium-podium-container {
    padding: 16px 8px 16px !important;
    border-radius: 16px !important;
  }
  #quiz-result {
    padding: 0 8px !important;
  }
  #quiz-podium { text-align:left; }
  
  .total-ranking-table td {
    padding: 10px 6px;
    font-size: 0.82rem;
  }
  .total-ranking-table .player-score { font-size: 1rem !important; }
  .total-ranking-table .player-pct   { font-size: 0.9rem !important; padding: 3px 8px; }
  .total-ranking-table .player-name  { font-size: 0.88rem !important; }
  .tr-rank-circle {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }
  
  /* Quiz Review List adjustments */
  #quiz-review-section h3 {
    font-size: 1.1rem !important;
  }
  #quiz-review-list > div {
    padding: 12px !important;
  }
  #quiz-review-list > div > div:first-child {
    flex-direction: column;
    gap: 6px;
  }
}

/* SMALL PHONES */
@media (max-width: 480px) {
  #quiz-question-text {
    font-size: 1.15rem !important;
  }
  .quiz-opt-btn {
    min-height: 60px !important;
    font-size: 0.95rem !important;
  }
  #quiz-question-card {
    padding: 16px !important;
    min-height: 100px !important;
    border-radius: 18px !important;
  }
  #splash-text {
    font-size: 2rem !important;
  }
  .page-header {
    padding: 0 0 12px 0;
  }
  .page-header h1 {
    font-size: 1.2rem;
  }
  .explorar-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .explorar-subject-card {
    padding: 14px 10px;
    border-radius: 14px;
  }
  .explorar-subject-icon {
    width: 44px; height: 44px; font-size: 20px; margin-bottom: 8px;
  }
  .explorar-subject-card h3 {
    font-size: 0.7rem;
  }
  .explorar-subject-badge {
    font-size: 0.55rem; padding: 1px 6px;
  }
  .bottom-nav {
    height: 56px;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .bnav-item {
    font-size: 0.55rem;
    padding: 4px 6px;
  }
  .bnav-item i {
    font-size: 16px;
  }
}

/* ═══ NATIVE APP OVERRIDES (EXPO) ═══ */

/* ═══ COMODINES POWER-UPS ═══ */
.powerup-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    border-radius: 16px;
    border: 2px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.7rem;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    backdrop-filter: blur(8px);
    min-width: 70px;
}
.powerup-btn:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.12);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.powerup-btn:active {
    transform: scale(0.9);
}
.powerup-icon {
    font-size: 1.3rem;
    transition: transform 0.2s;
}
.powerup-btn:hover .powerup-icon {
    transform: scale(1.2) rotate(10deg);
}
.powerup-label {
    font-size: 0.6rem;
    letter-spacing: 0.3px;
    text-align: center;
    line-height: 1.1;
}
@media (max-width: 480px) {
    .powerup-btn {
        padding: 8px 10px;
        min-width: 58px;
        border-radius: 12px;
    }
    .powerup-icon { font-size: 1.1rem; }
    .powerup-label { font-size: 0.52rem; }
}
@keyframes powerupGlow {
    0%,100% { box-shadow: 0 0 10px currentColor, 0 0 20px currentColor; }
    50% { box-shadow: 0 0 20px currentColor, 0 0 40px currentColor; }
}
@keyframes popIn {
    0% { transform: translateX(-50%) scale(0.5); opacity: 0; }
    100% { transform: translateX(-50%) scale(1); opacity: 1; }
}
@keyframes bounce {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}
@keyframes pulse {
    0%,100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ═══ TARJETAS DE COMODÍN ═══ */
@keyframes cardSlideIn {
    0% { transform: translateY(60px) scale(0.7); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes floatIcon {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@keyframes bounceIn {
    0% { transform: scale(0); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}
.powerup-card {
    animation-timing-function: cubic-bezier(.34,1.56,.64,1);
}
.powerup-card:active {
    transform: scale(0.9) !important;
}
@media (max-width: 600px) {
    .powerup-card {
        width: 140px !important;
        padding: 16px 12px !important;
    }
    .powerup-card-icon {
        font-size: 2.2rem !important;
    }
    .powerup-card h3 {
        font-size: 0.8rem !important;
    }
}

/* ═══ CARTAS VOLTEADAS (YU-GI-OH STYLE) ═══ */
.powerup-flip-card {
    perspective: 1400px;
    transition: transform 0.3s, filter 0.5s;
}
.ygo-card {
    filter: drop-shadow(0 12px 32px rgba(0,0,0,0.6)) drop-shadow(0 0 8px gold);
    transition: transform 0.35s cubic-bezier(.34,1.56,.64,1), filter 0.5s !important;
}
.ygo-card:hover {
    filter: drop-shadow(0 16px 40px rgba(0,0,0,0.7)) drop-shadow(0 0 20px gold) !important;
}
.powerup-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(.34,1.56,.64,1);
    transform-style: preserve-3d;
}
.powerup-flip-front, .powerup-flip-back {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.ygo-card-back {
    box-shadow: inset 0 0 80px rgba(139,105,20,0.15), 0 0 30px rgba(139,105,20,0.1);
}
@media (max-width: 700px) {
    .ygo-card {
        width: 160px !important;
        height: 235px !important;
    }
    .ygo-card-front > div:first-child {
        font-size: 0.6rem !important;
        padding: 5px 6px !important;
    }
}
@media (max-width: 500px) {
    .ygo-card {
        width: 120px !important;
        height: 178px !important;
    }
    .powerup-flip-front > div:first-child,
    .ygo-card-front > div:first-child {
        font-size: 0.55rem !important;
    }
}
.ygo-card-front {
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
@keyframes slowSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes floatUp {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}
@media (max-width: 600px) {
    .ygo-card {
        width: 150px !important;
        height: 220px !important;
    }
    .ygo-card-front > div:first-child {
        font-size: 0.6rem !important;
        padding: 5px 6px !important;
    }
}
@media (max-width: 400px) {
    .ygo-card {
        width: 115px !important;
        height: 172px !important;
    }
}

/* ═══ RESULTADOS ═══ */
#quiz-result-breakdown > div > div {
    transition: transform 0.2s;
}
#quiz-result-breakdown > div > div:hover {
    transform: scale(1.15);
}
#quiz-review-section {
    animation: fadeIn 0.5s ease;
}
@media (max-width: 480px) {
    .quiz-result-trophy-wrap {
        width: 104px !important;
        height: 104px !important;
    }
    .quiz-result-trophy-ring i {
        font-size: 2.65rem !important;
    }
    #quiz-result-title {
        font-size: 1.3rem !important;
    }
    #quiz-result-score {
        font-size: 1rem !important;
    }
}

/* ═══ NATIVE APP OVERRIDES (EXPO) ═══ */
body.is-native-app .topbar { display: none !important; }
body.is-native-app .bottom-nav { display: none !important; }
body.is-native-app .main-content {
  margin-top: 0 !important;
  margin-left: 0 !important;
  padding: 30px 20px 40px !important;
  min-height: 100vh !important;
}
body.is-native-app .sidebar { display: none !important; }

/* ═══ EXPLORAR — MODO AUTODIDACTA ═══ */
.explorar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.explorar-subject-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: transform .3s, box-shadow .3s, border-color .3s;
    position: relative;
    overflow: hidden;
}
.explorar-subject-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 48px rgba(0,0,0,.1);
    border-color: #818CF8;
}
.explorar-subject-card:active {
    transform: scale(0.96);
}
.explorar-subject-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    transition: transform .35s;
}
.explorar-subject-card:hover .explorar-subject-icon {
    transform: scale(1.12) rotate(-6deg);
}
.explorar-subject-card h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 4px;
}
.explorar-subject-card p {
    font-size: 0.75rem;
    color: #94A3B8;
    margin: 0;
}
.explorar-subject-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #EEF2FF;
    color: #4F46E5;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
}
.explorar-eval-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.explorar-eval-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: transform .2s, box-shadow .2s;
    cursor: pointer;
    flex-wrap: wrap;
}
.explorar-eval-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.explorar-eval-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 4px;
}
.explorar-eval-card .eval-meta {
    font-size: 0.78rem;
    color: #94A3B8;
}
.explorar-btn-study {
    padding: 10px 24px;
    background: linear-gradient(135deg, #6366F1, #4F46E5);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .2s, transform .2s;
}
.explorar-btn-study:hover {
    opacity: 0.9;
    transform: scale(1.04);
}
.explorar-btn-study:active {
    transform: scale(0.95);
}
.explorar-back-btn {
    padding: 10px 24px;
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 16px;
    color: #475569;
    font-size: 14px;
}
.explorar-filter-chip {
    padding: 8px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    color: #475569;
    transition: all .2s;
}
.explorar-filter-chip:hover, .explorar-filter-chip.active {
    background: #EEF2FF;
    border-color: #818CF8;
    color: #4F46E5;
}
@media (max-width: 600px) {
    .explorar-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .explorar-subject-card {
        padding: 16px 10px;
        border-radius: 16px;
    }
    .explorar-subject-icon {
        width: 52px; height: 52px; font-size: 24px; margin-bottom: 10px;
    }
    .explorar-subject-card h3 {
        font-size: 0.78rem;
    }
    .explorar-subject-card p {
        font-size: 0.65rem;
    }
    .explorar-subject-badge {
        top: 6px; right: 6px; font-size: 0.6rem; padding: 2px 7px;
    }
    .explorar-eval-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 16px;
    }
    .explorar-eval-card h4 {
        font-size: 0.9rem;
    }
    .explorar-btn-study {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
        font-size: 0.8rem;
        border-radius: 14px;
    }
    .explorar-back-btn {
        font-size: 0.78rem;
        padding: 8px 14px;
    }
    .page-header h1 {
        font-size: 1.3rem;
    }
    #top-estudiantes-list > div {
        padding: 10px 12px !important;
    }
    #top-estudiantes-list > div > div:first-child {
        font-size: 1.4rem !important;
        min-width: 28px !important;
    }
    #top-estudiantes-list > div > div:nth-child(2) {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.3rem !important;
    }
}

@media (max-width: 400px) {
    .explorar-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .explorar-subject-card {
        padding: 12px 8px;
    }
    .explorar-subject-icon {
        width: 42px; height: 42px; font-size: 20px; margin-bottom: 8px;
    }
    .explorar-subject-card h3 {
        font-size: 0.68rem;
    }
    .explorar-subject-badge {
        font-size: 0.55rem; padding: 1px 6px;
    }
    .page-header h1 {
        font-size: 1.15rem;
    }
    #top-estudiantes-list > div {
        gap: 8px !important;
        padding: 8px 10px !important;
    }
    #top-estudiantes-list > div > div:first-child {
        font-size: 1.2rem !important;
        min-width: 24px !important;
    }
}

/* ═══ BOTTOM NAV MOBILE OPTIMIZATION ═══ */
@media (max-width: 480px) {
    .bottom-nav {
        height: 56px;
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    .bnav-item {
        font-size: 0.55rem;
        padding: 4px 8px;
    }
    .bnav-item i {
        font-size: 16px;
    }
}

/* ═══ SAFE AREA iOS ═══ */
.main-content {
    padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 768px) {
    .main-content {
        padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
    }
}

/* ═══ REPORT DETAIL MODAL PREMIUM RESPONSIVE ═══ */
.report-detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.report-detail-modal-box {
    background: var(--bg-card);
    border-radius: 24px;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0,0,0,.45);
    animation: popIn .3s cubic-bezier(.34,1.56,.64,1);
    overflow: hidden;
}
.report-detail-header {
    padding: 20px 24px;
    background: #F8FAFC;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.report-detail-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* Mobile fine-tuning for Report Detail Modal */
@media (max-width: 600px) {
    .report-detail-overlay {
        padding: 8px;
    }
    .report-detail-modal-box {
        max-height: 94vh;
        border-radius: 20px;
    }
    .report-detail-header {
        padding: 14px 16px;
    }
    .report-detail-header h2 {
        font-size: 1.05rem !important;
    }
    .report-detail-body {
        padding: 14px 12px;
    }
    /* Stats pills wrapper */
    .report-detail-body > div:first-child {
        gap: 8px !important;
        margin-bottom: 16px !important;
    }
    .report-detail-body > div:first-child > div {
        padding: 10px 8px !important;
        border-radius: 12px !important;
    }
    .report-detail-body > div:first-child > div > div:first-child {
        font-size: 20px !important;
    }
    .report-detail-body > div:first-child > div > div:last-child {
        font-size: 11px !important;
    }
}

/* ═══ QUIZ COMPETITIVE TOP HUD ═══ */
.quiz-top-hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    margin-bottom: 16px;
    gap: 12px;
}
.quiz-hud-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.quiz-hud-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.quiz-hud-mult {
    background: linear-gradient(135deg, #FF6B00, #FF3D00);
    color: #fff;
    font-weight: 900;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 10px;
    animation: pulse 0.8s infinite;
    white-space: nowrap;
    box-shadow: 0 0 10px rgba(255, 61, 0, 0.4);
}
.quiz-question-counter {
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    background: rgba(0, 0, 0, 0.35);
    padding: 6px 14px;
    border-radius: 10px;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
#test-mode-student-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(37, 99, 235, 0.25) !important;
    border: 1px solid rgba(37, 99, 235, 0.45) !important;
    padding: 6px 10px !important;
    border-radius: 8px;
    white-space: nowrap;
}

/* Mobile top HUD styling */
@media (max-width: 600px) {
    .quiz-top-hud {
        padding: 8px 10px;
        margin-bottom: 12px;
        gap: 8px;
    }
    .quiz-hud-left {
        gap: 6px;
        flex: 1;
    }
    .quiz-hud-badge {
        padding: 4px 8px;
        gap: 6px;
        border-radius: 6px;
    }
    .quiz-hud-badge i {
        font-size: 0.85rem;
    }
    .quiz-hud-badge span {
        font-size: 0.85rem !important;
    }
    .quiz-hud-mult {
        font-size: 0.72rem;
        padding: 3px 6px;
        border-radius: 8px;
    }
    .quiz-question-counter {
        font-size: 0.9rem;
        padding: 4px 10px;
        border-radius: 8px;
    }
    #test-mode-student-badge {
        padding: 4px 8px !important;
        gap: 4px;
    }
    #test-mode-student-badge span {
        font-size: 0.72rem !important;
    }
    #test-mode-student-badge i {
        font-size: 0.75rem !important;
    }
}

/* ═══ POWERUP JOKER CARDS RESPONSIVE DESIGN ═══ */
.ygo-card-front {
    background: linear-gradient(170deg,#0f0f1a 0%,#1a1a2e 40%,#16213e 100%);
    border-radius: 14px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    backface-visibility: hidden;
    position: absolute;
    inset: 0;
    transform: rotateY(180deg);
    overflow: hidden;
}
.ygo-card-border-neon {
    position: absolute;
    inset: 5px;
    border-radius: 10px;
    pointer-events: none;
    z-index: 1;
}
.ygo-card-banner {
    color: #fff;
    padding: 10px 8px 6px;
    font-weight: 900;
    font-size: 0.95rem;
    text-align: center;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 2;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
    border-bottom: 2px solid rgba(255,255,255,0.25);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ygo-card-art-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    margin: 2px 8px;
    min-height: 0;
}
.ygo-card-icon {
    font-size: 4rem;
    z-index: 1;
    transition: transform 0.2s;
}
.ygo-card-category-circle {
    position: absolute;
    top: 4px; right: 4px;
    width: 26px; height: 26px;
    border-radius: 50%;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}
.ygo-card-rarity-row {
    background: rgba(255,255,255,0.06);
    padding: 4px 8px;
    font-size: 0.65rem;
    font-weight: 800;
    text-align: center;
    z-index: 2;
    letter-spacing: 1px;
}
.ygo-card-desc-box {
    background: rgba(255,255,255,0.1);
    margin: 4px 6px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    color: #FFFFFF;
    line-height: 1.4;
    z-index: 2;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    overflow: hidden;
}
.ygo-card-footer {
    display: flex;
    justify-content: space-between;
    padding: 2px 10px 6px;
    z-index: 2;
    font-size: 0.55rem;
    font-weight: 800;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.5px;
}

/* Responsive adjustment for Comodín cards */
@media (max-width: 600px) {
    .ygo-card-banner {
        font-size: 0.8rem;
        padding: 8px 6px 4px;
    }
    .ygo-card-icon {
        font-size: 2.8rem;
    }
    .ygo-card-category-circle {
        width: 22px; height: 22px;
        font-size: 0.6rem;
    }
    .ygo-card-rarity-row {
        font-size: 0.58rem;
        padding: 3px 6px;
    }
    .ygo-card-desc-box {
        font-size: 0.64rem;
        min-height: 38px;
        padding: 6px 8px;
        margin: 2px 4px;
    }
    .ygo-card-footer {
        font-size: 0.5rem;
        padding-bottom: 4px;
    }
}
@media (max-width: 420px) {
    .ygo-card-banner {
        font-size: 0.7rem;
    }
    .ygo-card-icon {
        font-size: 2.2rem;
    }
    .ygo-card-desc-box {
        font-size: 0.58rem;
        min-height: 32px;
        padding: 4px 6px;
    }
}

/* ═══ USER POSITION CARD (EXTRACTED ZIP INTEGRATION) ═══ */
#my-rank-pill {
    display: none;
    background: rgba(255, 255, 255, 0.06) !important;
    padding: 22px !important;
    border-radius: 24px !important;
    text-align: center !important;
    font-size: 20px !important;
    margin-bottom: 30px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    width: 100% !important;
    max-width: 480px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-shadow: 
      inset 0 4px 12px rgba(255, 255, 255, 0.05),
      0 12px 36px rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    animation: pulse 2.5s infinite;
}
#my-rank-pill strong {
    color: #ffca28 !important;
    font-size: 38px !important;
    font-weight: 900 !important;
    margin: 0 6px !important;
    text-shadow: 0 4px 12px rgba(255, 202, 40, 0.45) !important;
}

.background-glow {
    position: absolute;
    width: 700px;
    height: 700px;
    background: rgba(166, 0, 255, 0.15);
    filter: blur(100px);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* ═══ MEDAL & RIBBON FLEX LAYOUT FOR USER POSITION CARD ═══ */
#my-rank-pill {
    display: none; /* Controlled dynamically by JS */
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.06) !important;
    padding: 16px 24px !important;
    border-radius: 24px !important;
    text-align: left !important;
    font-size: 1.15rem !important;
    margin: 20px auto 30px auto !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    width: 100% !important;
    max-width: 480px !important;
    box-shadow: 
      inset 0 4px 12px rgba(255, 255, 255, 0.05),
      0 12px 36px rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}
.rank-pill-text-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.3;
}
.rank-pill-text-content strong {
    color: #ffca28 !important;
    font-size: 2.2rem !important;
    font-weight: 900 !important;
    margin: 0 4px !important;
    text-shadow: 0 4px 12px rgba(255, 202, 40, 0.45) !important;
    display: inline-block;
    line-height: 1;
    vertical-align: middle;
}

/* High Fidelity Gold Medal & Ribbon Ribbons */
.medal-ribbon-container {
    position: relative;
    width: 54px;
    height: 54px;
    margin-right: 18px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ribbon-blue-left, .ribbon-blue-right {
    position: absolute;
    top: 2px;
    width: 12px;
    height: 24px;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    border-radius: 2px;
}
.ribbon-blue-left {
    background: linear-gradient(to right, #2563eb 0%, #3b82f6 40%, #1d4ed8 100%);
    transform: rotate(25deg);
    left: 14px;
}
.ribbon-blue-right {
    background: linear-gradient(to right, #2563eb 0%, #3b82f6 40%, #1d4ed8 100%);
    transform: rotate(-25deg);
    right: 14px;
}
.medal-gold-circle {
    font-size: 2.5rem;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
    animation: scalePulse 2s ease-in-out infinite;
}
@keyframes scalePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* ═══ ELEGANTE HEADER CON LAURELES (MIDDLE SCREEN STYLE) ═══ */
.podium-custom-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
    position: relative;
    z-index: 10;
    width: 100%;
}
.podium-title-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.gold-trophy-top {
    font-size: 2.4rem;
    filter: drop-shadow(0 4px 10px rgba(250,204,21,0.55));
    animation: bounce 1.8s infinite;
}
.podium-title-box h2 {
    font-size: 1.8rem !important;
    font-weight: 900 !important;
    color: #fff !important;
    text-shadow: 0 4px 10px rgba(0,0,0,0.8) !important;
    margin: 4px 0 0 0 !important;
    line-height: 1.1 !important;
}
.podium-title-box h2 .highlight-yellow {
    color: #ffd700;
    background: linear-gradient(to bottom, #fff3c4, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    font-size: 2.1rem;
    font-weight: 950;
}
.laurel-wreath-left, .laurel-wreath-right {
    font-size: 2.6rem;
    pointer-events: none;
    opacity: 0.9;
    animation: pulse 2.5s infinite;
}
.laurel-wreath-left {
    transform: rotate(-15deg);
}
.laurel-wreath-right {
    transform: scaleX(-1) rotate(-15deg);
}

/* ═══ MÓVILES - AJUSTE EN LA DISTRIBUCIÓN DEL PODIO ═══ */
@media (max-width: 480px) {
    .podium-stage-glow {
        width: 320px;
        height: 110px;
    }
    .laurel-wreath-left, .laurel-wreath-right {
        font-size: 2rem;
    }
    .podium-title-box h2 {
        font-size: 1.4rem !important;
    }
    .podium-title-box h2 .highlight-yellow {
        font-size: 1.7rem;
    }
    #my-rank-pill {
        padding: 12px 18px !important;
        border-radius: 20px !important;
        font-size: 0.95rem !important;
    }
    .rank-pill-text-content strong {
        font-size: 1.75rem !important;
    }
    .medal-ribbon-container {
        width: 44px;
        height: 44px;
        margin-right: 12px;
    }
    .medal-gold-circle {
        font-size: 2rem;
    }
}

/* App-store game skin for /juegos */
[data-theme="dark"] .games-app-theme {
    --bg: #131c2b;
    --bg-card: #1e2a3d;
    --text: #e8edf5;
    --text-mid: #9aa8bd;
    --text-light: #7c8aa1;
    --border: rgba(148, 163, 184, 0.16);
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.38);
    --badge-published-bg: rgba(34,197,94,0.15); --badge-published-color: #4ADE80;
    --badge-draft-bg: rgba(245,158,11,0.15); --badge-draft-color: #FBBF24;
    --danger-bg: rgba(220,38,38,0.15); --danger-border: rgba(220,38,38,0.3);
    --fb-correct-bg: rgba(34,197,94,0.12); --fb-correct-border: rgba(34,197,94,0.25); --fb-correct-text: #4ADE80;
    --fb-incorrect-bg: rgba(220,38,38,0.12); --fb-incorrect-border: rgba(220,38,38,0.25);
    --score-correct-bg: rgba(34,197,94,0.12); --score-correct-border: rgba(34,197,94,0.2); --score-correct-text: #4ADE80;
    --score-precision-bg: rgba(37,99,235,0.12); --score-precision-border: rgba(37,99,235,0.2); --score-precision-text: #60A5FA;
    --tag-livecard-bg: rgba(148,163,184,0.15); --tag-livecard-text: var(--text-mid);
    background: var(--bg);
    background-attachment: fixed;
    min-height: 100vh;
}

[data-theme="dark"] .games-app-theme .app-shell,
[data-theme="dark"] .games-app-theme .main-content,
[data-theme="dark"] .games-app-theme .page,
[data-theme="dark"] .games-app-theme #page-jugar {
    background-color: transparent !important;
}

[data-theme="dark"] .games-app-theme .app-shell {
    background: var(--bg);
    min-height: 100vh;
}

[data-theme="dark"] .games-app-theme .topbar {
    background: rgba(13, 7, 28, 0.84);
    border-bottom: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.28);
}

[data-theme="dark"] .games-app-theme .topbar-logo-icon,
[data-theme="dark"] .games-app-theme .sb-logo-icon {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 46%, #f59e0b 100%);
    box-shadow: 0 8px 22px rgba(124, 58, 237, 0.34);
}

[data-theme="dark"] .games-app-theme .sidebar,
[data-theme="dark"] .games-app-theme .bottom-nav {
    background: rgba(13, 7, 28, 0.92);
    border-color: rgba(255,255,255,0.12);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

[data-theme="dark"] .games-app-theme .nav-item.active,
[data-theme="dark"] .games-app-theme .nav-item:hover,
[data-theme="dark"] .games-app-theme .bnav-item.active,
[data-theme="dark"] .games-app-theme .bnav-item:hover {
    color: #facc15;
}

[data-theme="dark"] .games-app-theme .nav-item.active {
    background: rgba(250, 204, 21, 0.12);
    box-shadow: inset 3px 0 0 #facc15;
}

[data-theme="dark"] .games-app-theme .login-screen {
    background:
        radial-gradient(circle at 50% 18%, rgba(124, 58, 237, 0.36), transparent 22rem),
        radial-gradient(circle at 18% 80%, rgba(37, 99, 235, 0.22), transparent 18rem),
        linear-gradient(180deg, #080412 0%, #16092a 55%, #0b0715 100%);
}

[data-theme="dark"] .games-app-theme .login-card {
    background: rgba(20, 10, 38, 0.88);
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: 0 28px 70px rgba(0,0,0,0.56), inset 0 1px 0 rgba(255,255,255,0.10);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.games-app-theme .login-header {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.12);
}

.games-app-theme .login-header-school,
.games-app-theme .login-card h2 {
    color: #fff;
}

.games-app-theme .login-header-app,
.games-app-theme .login-footer {
    color: #cbd5e1;
}

.games-app-theme .login-input {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.14);
    color: #fff;
}

.games-app-theme .login-input:focus {
    background: rgba(255,255,255,0.12);
    border-color: #facc15;
    box-shadow: 0 0 0 4px rgba(250,204,21,0.16);
}

[data-theme="dark"] .games-app-theme .login-label {
    color: #fde68a;
}

.games-app-theme .app-shell,
.games-app-theme .login-screen,
.games-app-theme-light .app-shell,
.games-app-theme-light .login-screen {
    position: relative;
    z-index: 1;
}

.games-app-theme .main-content,
.games-app-theme-light .main-content {
    position: relative;
    z-index: 1;
}

.games-app-theme .app-shell,
.games-app-theme .main-content,
.games-app-theme .page,
.games-app-theme #page-jugar,
.games-app-theme-light .app-shell,
.games-app-theme-light .main-content,
.games-app-theme-light .page,
.games-app-theme-light #page-jugar {
    background-color: var(--bg);
}

.game-app-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 28px;
    align-items: center;
    margin: 0 0 22px;
    padding: 26px;
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 24px;
    background:
        radial-gradient(circle at 86% 22%, rgba(250, 204, 21, 0.26), transparent 11rem),
        radial-gradient(circle at 18% 12%, rgba(37, 99, 235, 0.22), transparent 13rem),
        linear-gradient(145deg, rgba(31, 16, 55, 0.92), rgba(12, 7, 25, 0.94));
    box-shadow: 0 22px 60px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.10);
}

.game-app-hero::after {
    content: "";
    position: absolute;
    inset: auto -15% -35% -15%;
    height: 46%;
    background: radial-gradient(ellipse at center, rgba(147, 51, 234, 0.52), transparent 62%);
    pointer-events: none;
}

.game-app-hero-copy {
    position: relative;
    z-index: 2;
}

.game-app-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #fde68a;
    background: rgba(250, 204, 21, 0.13);
    border: 1px solid rgba(250, 204, 21, 0.24);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.game-app-hero h1 {
    margin: 12px 0 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: clamp(2rem, 5vw, 4.1rem);
    font-weight: 950;
    line-height: 0.92;
    text-shadow: 0 5px 0 rgba(0,0,0,0.24), 0 16px 32px rgba(0,0,0,0.42);
}

.game-app-hero h1 i {
    color: #38bdf8;
    filter: drop-shadow(0 0 16px rgba(56, 189, 248, 0.5));
}

.game-app-hero p {
    max-width: 560px;
    color: #dbeafe;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.45;
}

.game-download-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.game-download-btn {
    min-height: 54px;
    border: 0;
    border-radius: 15px;
    padding: 9px 16px;
    color: #fff;
    background: linear-gradient(180deg, #22c55e, #15803d);
    box-shadow: 0 5px 0 #14532d, 0 16px 28px rgba(34, 197, 94, 0.22);
    display: inline-flex;
    align-items: center;
    gap: 11px;
    cursor: pointer;
    transition: transform .15s, filter .2s, box-shadow .15s;
    text-align: left;
}

.game-download-btn-ios {
    background: linear-gradient(180deg, #38bdf8, #1d4ed8);
    box-shadow: 0 5px 0 #1e3a8a, 0 16px 28px rgba(56, 189, 248, 0.22);
}

.game-download-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.07);
}

.game-download-btn:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.45), 0 8px 18px rgba(0,0,0,0.22);
}

.game-download-btn i {
    font-size: 1.45rem;
}

.game-download-btn span {
    display: flex;
    flex-direction: column;
    font-size: 0.94rem;
    font-weight: 950;
    line-height: 1.05;
    letter-spacing: 0;
}

.game-download-btn small {
    color: rgba(255,255,255,0.74);
    font-size: 0.61rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.game-phone-preview {
    position: relative;
    z-index: 2;
    width: 164px;
    height: 258px;
    border-radius: 28px;
    padding: 24px 14px 16px;
    border: 1px solid rgba(255,255,255,0.18);
    background:
        radial-gradient(circle at 50% 20%, rgba(250, 204, 21, 0.22), transparent 5.8rem),
        linear-gradient(180deg, #210d3d 0%, #0e061d 100%);
    box-shadow: inset 0 0 0 5px rgba(0,0,0,0.38), 0 24px 48px rgba(0,0,0,0.44);
    justify-self: end;
}

.game-phone-notch {
    position: absolute;
    top: 9px;
    left: 50%;
    width: 54px;
    height: 7px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(0,0,0,0.56);
}

.game-phone-preview img {
    display: block;
    width: 68px;
    height: 68px;
    object-fit: cover;
    border-radius: 18px;
    margin: 4px auto 12px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.34);
}

.game-phone-title {
    color: #fff;
    text-align: center;
    font-size: 0.92rem;
    font-weight: 950;
    line-height: 1.05;
    text-shadow: 0 3px 10px rgba(0,0,0,0.6);
}

.game-mini-podium {
    height: 86px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.mini-podium {
    width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px 10px 8px 8px;
    color: #fff;
    font-weight: 950;
    text-shadow: 0 2px 0 rgba(0,0,0,0.25);
    box-shadow: inset 0 8px 16px rgba(255,255,255,0.2), inset 0 -12px 20px rgba(0,0,0,0.32);
}

.mini-podium-1 { height: 80px; background: linear-gradient(180deg, #fde047, #f59e0b); color: #7c2d12; font-size: 2rem; }
.mini-podium-2 { height: 58px; background: linear-gradient(180deg, #e2e8f0, #94a3b8); color: #334155; font-size: 1.55rem; }
.mini-podium-3 { height: 44px; background: linear-gradient(180deg, #fb923c, #9a3412); font-size: 1.35rem; }

.game-section-title {
    margin-bottom: 12px;
}

.game-section-title h2 {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #fff;
    font-size: 1.18rem;
    font-weight: 950;
    text-shadow: 0 3px 12px rgba(0,0,0,0.38);
}

.game-section-title h2 i {
    color: #facc15;
    filter: drop-shadow(0 0 10px rgba(250,204,21,0.46));
}

.games-app-theme .explorar-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
}

.games-app-theme .explorar-subject-card {
    min-height: 172px;
    color: #fff;
    box-shadow: 0 16px 32px rgba(0,0,0,0.24), inset 0 1px 0 rgba(255,255,255,0.08);
    background:
        radial-gradient(circle at 78% 18%, rgba(56,189,248,0.16), transparent 7rem),
        linear-gradient(145deg, rgba(255,255,255,0.08), rgba(20,10,38,0.88)) !important;
    border-color: rgba(255,255,255,0.13) !important;
}

.games-app-theme .explorar-subject-card h3 {
    color: #fff !important;
}

.games-app-theme .explorar-subject-card p {
    color: #dbeafe !important;
}

.games-app-theme .explorar-eval-card,
.games-app-theme .results-list,
.games-app-theme .library-list,
.games-app-theme .reports-list,
.games-app-theme .join-card,
.games-app-theme .join-full-card {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.12);
    box-shadow: 0 16px 34px rgba(0,0,0,0.24);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.games-app-theme .explorar-eval-card h4 {
    color: #fff !important;
}

.games-app-theme .explorar-filter-chip {
    background: rgba(255,255,255,0.08);
    color: #e2e8f0;
    border-color: rgba(255,255,255,0.13);
}

.game-rank-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 18px;
    padding: 13px 15px;
    display: flex;
    align-items: center;
    gap: 13px;
    box-shadow: 0 14px 28px rgba(0,0,0,0.22);
    transition: transform .2s, box-shadow .2s, border-color .2s;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.game-rank-card:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 18px 36px rgba(0,0,0,0.28);
}

.student-stats-trigger {
    cursor: pointer;
}

.student-stats-trigger:focus {
    outline: 2px solid rgba(250,204,21,0.6);
    outline-offset: 3px;
}

.game-rank-arrow {
    color: rgba(255,255,255,0.3);
    font-size: 0.8rem;
    margin-left: auto;
    transition: transform .2s, color .2s;
}

.student-stats-trigger:hover .game-rank-arrow {
    color: rgba(250,204,21,0.9);
    transform: translateX(3px);
}

.student-stats-open {
    overflow: hidden;
}

.student-stats-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(3,7,18,0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.student-stats-modal.open {
    display: flex;
}

.student-stats-panel {
    position: relative;
    width: min(860px, 100%);
    max-height: min(86vh, 760px);
    overflow: auto;
    border-radius: 24px;
    padding: 24px;
    background: linear-gradient(160deg, rgba(15,23,42,0.98), rgba(25,13,54,0.98));
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 28px 80px rgba(0,0,0,0.55);
}

.student-stats-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 13px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    cursor: pointer;
}

.student-stats-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-right: 48px;
    margin-bottom: 18px;
}

.student-stats-avatar {
    width: 68px;
    height: 68px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(250,204,21,0.22), rgba(37,99,235,0.14));
    border: 1px solid rgba(255,255,255,0.16);
    overflow: hidden;
}

.student-stats-avatar-media {
    width: 64px;
    height: 64px;
}

.student-stats-head span {
    color: #facc15;
    font-weight: 900;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.student-stats-head h2 {
    margin: 4px 0;
    color: #fff;
    font-size: 1.55rem;
    font-weight: 950;
}

.student-stats-head p {
    margin: 0;
    color: rgba(226,232,240,0.68);
    font-weight: 700;
}

.student-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.student-stats-metric {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.075);
    border: 1px solid rgba(255,255,255,0.11);
}

.student-stats-metric-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    color: #fff;
    background: rgba(96,165,250,0.22);
}

.student-stats-metric strong {
    display: block;
    color: #fff;
    font-size: 1.45rem;
    font-weight: 950;
    line-height: 1.05;
}

.student-stats-metric small {
    display: block;
    margin-top: 5px;
    color: rgba(226,232,240,0.68);
    font-weight: 800;
}

.student-stats-metric.green .student-stats-metric-icon { background: rgba(52,211,153,0.22); color: #6ee7b7; }
.student-stats-metric.violet .student-stats-metric-icon { background: rgba(139,92,246,0.24); color: #c4b5fd; }
.student-stats-metric.gold .student-stats-metric-icon { background: rgba(250,204,21,0.22); color: #fde68a; }
.student-stats-metric.cyan .student-stats-metric-icon { background: rgba(34,211,238,0.2); color: #67e8f9; }
.student-stats-metric.orange .student-stats-metric-icon { background: rgba(251,146,60,0.22); color: #fdba74; }

.student-stats-footnote {
    padding: 12px 14px;
    border-radius: 15px;
    background: rgba(250,204,21,0.1);
    border: 1px solid rgba(250,204,21,0.18);
    color: rgba(255,255,255,0.78);
    font-weight: 800;
    margin-bottom: 18px;
}

.student-stats-section-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 950;
    margin: 8px 0 10px;
}

.student-stats-attempts {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.student-stats-attempt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 14px;
    border-radius: 16px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
}

.student-stats-attempt strong,
.student-stats-attempt small {
    display: block;
}

.student-stats-attempt strong {
    color: #fff;
    font-weight: 900;
}

.student-stats-attempt small {
    color: rgba(226,232,240,0.62);
    font-weight: 700;
    margin-top: 3px;
}

.student-stats-attempt-score {
    white-space: nowrap;
    font-weight: 950;
    color: #fbbf24;
}

.student-stats-attempt-score.good { color: #34d399; }
.student-stats-attempt-score.mid { color: #fbbf24; }
.student-stats-attempt-score.low { color: #f87171; }

.student-stats-loading,
.student-stats-empty {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: rgba(226,232,240,0.75);
    font-weight: 850;
    text-align: center;
}

.student-stats-empty.compact {
    min-height: 96px;
    border-radius: 16px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 720px) {
    .student-stats-modal {
        align-items: flex-end;
        padding: 10px;
    }

    .student-stats-panel {
        width: 100%;
        max-height: 88vh;
        border-radius: 22px 22px 18px 18px;
        padding: 18px;
    }

    .student-stats-head {
        align-items: flex-start;
        padding-right: 44px;
    }

    .student-stats-avatar {
        width: 58px;
        height: 58px;
        border-radius: 18px;
        flex: 0 0 auto;
    }

    .student-stats-avatar-media {
        width: 55px;
        height: 55px;
    }

    .student-stats-head h2 {
        font-size: 1.22rem;
    }

    .student-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .student-stats-metric {
        padding: 13px;
    }

    .student-stats-metric strong {
        font-size: 1.18rem;
    }

    .student-stats-attempt {
        align-items: flex-start;
        flex-direction: column;
    }

    .student-stats-attempt-score {
        white-space: normal;
    }
}

.game-rank-card.rank-gold { border-color: rgba(250,204,21,0.45); background: linear-gradient(90deg, rgba(250,204,21,0.16), rgba(255,255,255,0.08)); }
.game-rank-card.rank-silver { border-color: rgba(226,232,240,0.36); background: linear-gradient(90deg, rgba(226,232,240,0.14), rgba(255,255,255,0.08)); }
.game-rank-card.rank-bronze { border-color: rgba(251,146,60,0.40); background: linear-gradient(90deg, rgba(251,146,60,0.15), rgba(255,255,255,0.08)); }
/* ═══════════════════════════════════════════════════
   PODIO BG-IMAGE + OVERLAYS
   ═══════════════════════════════════════════════════ */

/* Contenedor principal: imagen de fondo + aspect-ratio cuadrado */
.rp-bg-wrap {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin: 0 auto 24px auto;
    aspect-ratio: 1 / 1;
    background-image: url('assets/podio_bg_clean.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.06);
}

/* Base para todos los overlays */
.rp-ov {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ── AVATAR CÍRCULO 1° LUGAR (dorado, centro-arriba) ── */
.rp-ov-circle-1 {
    left: 50%;
    top: 10%;
    width: 35%;
    aspect-ratio: 1/1;
    transform: translateX(-50%);
    border-radius: 50%;
    overflow: hidden;
}

/* ── AVATAR CÍRCULO 2° LUGAR (plateado, izquierda) ── */
.rp-ov-circle-2 {
    left: 7.5%;
    top: 32%;
    width: 23%;
    aspect-ratio: 1/1;
    border-radius: 50%;
    overflow: hidden;
}

/* ── AVATAR CÍRCULO 3° LUGAR (bronce, derecha) ── */
.rp-ov-circle-3 {
    right: 7.5%;
    top: 35%;
    width: 22%;
    aspect-ratio: 1/1;
    border-radius: 50%;
    overflow: hidden;
}

/* Avatar dentro de cada círculo */
.rp-ov-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Coincide con el interior de los círculos de la imagen */
    background: #1c2044;
    position: relative;
}
/* Viñeta sutil para mezclar bordes del avatar con el anillo */
.rp-ov-circle-1 .rp-ov-avatar::after,
.rp-ov-circle-2 .rp-ov-avatar::after,
.rp-ov-circle-3 .rp-ov-avatar::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: inset 0 0 25px 12px rgba(15,15,45,0.85);
    pointer-events: none;
    z-index: 2;
}

/* ── CAJAS DE NOMBRE + SCORE ── */
.rp-ov-info-1 {
    left: 50%;
    transform: translateX(-50%);
    top: 72%;
    width: 33%;
    gap: 1px;
}
.rp-ov-info-2 {
    left: 4%;
    top: 76%;
    width: 32%;
    gap: 1px;
}
.rp-ov-info-3 {
    right: 4%;
    top: 78%;
    width: 32%;
    gap: 1px;
}

/* Nombre en la caja */
.rp-ov-name {
    font-size: clamp(0.6rem, 2.5vw, 0.85rem);
    font-weight: 900;
    color: #e2e8f0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-shadow: 0 1px 6px rgba(0,0,0,1);
    line-height: 1.1;
}

/* Score box */
.rp-ov-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

/* Pts y pct */
.rp-ov-pts {
    font-size: clamp(0.55rem, 2vw, 0.72rem);
    font-weight: 800;
    color: #e2e8f0;
    text-shadow: 0 1px 6px rgba(0,0,0,1);
    line-height: 1.2;
}
.rp-ov-pts-gold {
    font-size: clamp(0.6rem, 2.2vw, 0.85rem);
    font-weight: 900;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255,215,0,0.6), 0 1px 6px rgba(0,0,0,1);
    line-height: 1.2;
}
.rp-ov-pct-gold   { font-size: clamp(0.55rem, 2vw, 0.72rem); font-weight: 800; color: #ffd700; text-shadow: 0 1px 6px rgba(0,0,0,1); line-height: 1.2; }
.rp-ov-pct-silver { font-size: clamp(0.55rem, 2vw, 0.72rem); font-weight: 800; color: #94b8d8; text-shadow: 0 1px 6px rgba(0,0,0,1); line-height: 1.2; }
.rp-ov-pct-bronze { font-size: clamp(0.55rem, 2vw, 0.72rem); font-weight: 800; color: #e8a060; text-shadow: 0 1px 6px rgba(0,0,0,1); line-height: 1.2; }

/* Avatar images — recorte circular centrado en cara/torso */
.rp-ov-avatar img,
.rp-ov-avatar .rp-avatar-media,
.rp-ov-avatar .avatar-render,
.rp-ov-avatar .avatar-render-base {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center 5% !important;
    border-radius: 50% !important;
    background: transparent !important;
}
.rp-ov-avatar .avatar-render {
    position: relative;
    border-radius: 50% !important;
    overflow: hidden !important;
    background: transparent !important;
}

/* ── Responsive: Móvil ── */
@media (max-width: 600px) {
    .rp-bg-wrap {
        max-width: 100%;
        border-radius: 16px;
        margin-bottom: 16px;
    }
    .rp-ov-name {
        font-size: clamp(0.5rem, 3vw, 0.7rem);
    }
    .rp-ov-pts, .rp-ov-pts-gold {
        font-size: clamp(0.45rem, 2.5vw, 0.65rem);
    }
    .rp-ov-pct-gold, .rp-ov-pct-silver, .rp-ov-pct-bronze {
        font-size: clamp(0.4rem, 2.2vw, 0.6rem);
    }
}

.game-rank-card.is-me-ranking { border-color: rgba(233,30,99,0.55) !important; background: linear-gradient(90deg, rgba(233,30,99,0.18), rgba(255,255,255,0.06)) !important; box-shadow: 0 0 20px rgba(233,30,99,0.22); }


.games-app-theme #top-estudiantes-list > div,
.games-app-theme #top-estudiantes-list > div[style] {
    background:
        radial-gradient(circle at 12% 50%, rgba(124,58,237,0.22), transparent 5rem),
        linear-gradient(90deg, rgba(255,255,255,0.09), rgba(20,10,38,0.92)) !important;
    border: 1px solid rgba(255,255,255,0.14) !important;
    color: #fff !important;
    box-shadow: 0 16px 34px rgba(0,0,0,0.30), inset 0 1px 0 rgba(255,255,255,0.09) !important;
}

.games-app-theme #top-estudiantes-list > div:nth-child(1) {
    border-color: rgba(250,204,21,0.42) !important;
    background:
        radial-gradient(circle at 10% 50%, rgba(250,204,21,0.24), transparent 5rem),
        linear-gradient(90deg, rgba(250,204,21,0.12), rgba(20,10,38,0.92)) !important;
}

.games-app-theme #top-estudiantes-list > div:nth-child(2) {
    border-color: rgba(226,232,240,0.34) !important;
}

.games-app-theme #top-estudiantes-list > div:nth-child(3) {
    border-color: rgba(251,146,60,0.38) !important;
}

.games-app-theme #top-estudiantes-list * {
    color: #fff !important;
}

.games-app-theme #top-estudiantes-list span[style*="color:#059669"],
.games-app-theme #top-estudiantes-list span[style*="color: #059669"],
.games-app-theme #top-estudiantes-list span[style*="color:#22c55e"],
.games-app-theme #top-estudiantes-list span[style*="color: #22c55e"] {
    color: #34d399 !important;
}

.games-app-theme #top-estudiantes-list span[style*="color:#D97706"],
.games-app-theme #top-estudiantes-list span[style*="color: #D97706"] {
    color: #facc15 !important;
}

.game-rank-number {
    width: 38px;
    min-width: 38px;
    height: 38px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(15,23,42,0.6);
    font-size: 1.25rem;
    font-weight: 950;
}

.game-rank-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    background: linear-gradient(180deg, rgba(56,189,248,0.22), rgba(37,99,235,0.16));
    border: 2px solid rgba(255,255,255,0.16);
}

.game-rank-info {
    min-width: 0;
    flex: 1;
}

.game-rank-name {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-rank-meta {
    margin-top: 2px;
    color: #cbd5e1;
    font-size: 0.75rem;
    font-weight: 750;
}

.game-rank-badge {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(250,204,21,0.13);
    color: #fde047;
    border: 1px solid rgba(250,204,21,0.22);
    font-size: 0.68rem;
    font-weight: 950;
    white-space: nowrap;
}

.games-app-theme #quiz-result {
    max-width: 430px !important;
}

.games-app-theme #quiz-podium {
    text-align: center !important;
}

.games-app-theme .stadium-podium-container {
    max-width: 420px;
    min-height: 560px;
    margin: 0 auto 18px;
    padding: 22px 14px 24px;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.12);
    background:
        radial-gradient(circle at 50% 30%, rgba(147, 51, 234, 0.48), transparent 13rem),
        radial-gradient(circle at 50% 70%, rgba(250, 204, 21, 0.22), transparent 10rem),
        linear-gradient(180deg, rgba(12, 4, 28, 0.96), rgba(24, 8, 44, 0.98));
    box-shadow: 0 24px 70px rgba(0,0,0,0.58), inset 0 1px 0 rgba(255,255,255,0.12);
}

.games-app-theme .stadium-podium-container::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 16% 78%, rgba(56, 189, 248, 0.18), transparent 7rem),
        radial-gradient(circle at 84% 84%, rgba(34, 197, 94, 0.16), transparent 7rem);
    z-index: 0;
}

.games-app-theme .stadium-light-beam {
    top: 70px;
    width: 360px;
    height: 360px;
    background: radial-gradient(ellipse at center, rgba(250,204,21,0.34), rgba(147,51,234,0.22) 38%, transparent 72%);
}

.games-app-theme .podium-custom-header {
    margin-bottom: 18px;
}

.games-app-theme .gold-trophy-top {
    font-size: 2.15rem;
}

.games-app-theme .podium-title-box h2 {
    font-size: 1.75rem !important;
}

.games-app-theme .podium-title-box h2 .highlight-yellow {
    font-size: 2.05rem;
}

.games-app-theme .podium-pillars-wrapper {
    min-height: 318px;
    gap: 10px;
    margin-top: 8px;
    padding-bottom: 28px;
}

.games-app-theme .podium-pillars-wrapper::after {
    left: 10px;
    right: 10px;
    bottom: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(168,85,247,0.95), rgba(88,28,135,0.72) 48%, transparent 73%);
    border: 2px solid rgba(168,85,247,0.7);
    box-shadow: 0 0 28px rgba(168,85,247,0.82), inset 0 0 18px rgba(250,204,21,0.18);
}

.games-app-theme .podium-cylinder {
    min-width: 86px;
    max-width: 116px;
}

.games-app-theme .rank-1 {
    max-width: 130px;
}

.games-app-theme .rank-1 .cylinder-body { min-height: 162px; }
.games-app-theme .rank-2 .cylinder-body { min-height: 124px; }
.games-app-theme .rank-3 .cylinder-body { min-height: 104px; }

.games-app-theme .cylinder-body {
    border-radius: 0 0 24px 24px;
}

.games-app-theme .cylinder-rank {
    color: rgba(255,255,255,0.88) !important;
    font-size: 4.3rem;
    text-shadow: 0 3px 0 rgba(0,0,0,0.22), 0 12px 18px rgba(0,0,0,0.38) !important;
}

.games-app-theme .podium-avatar {
    width: 66px;
    height: 66px;
    font-size: 38px;
    background: linear-gradient(180deg, #38bdf8, #2563eb);
}

.games-app-theme .rank-1 .podium-avatar {
    width: 76px;
    height: 76px;
    font-size: 44px;
}

.games-app-theme .podium-score-badge {
    width: auto;
    min-width: 92px;
    padding: 7px 12px;
    margin-top: 8px;
    border-radius: 14px;
    background: rgba(8, 5, 18, 0.86);
}

.podium-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    max-width: 420px;
    margin: -8px auto 24px;
}

.podium-action-btn {
    flex: 1;
    min-height: 52px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 950;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 5px 0 rgba(0,0,0,0.34), 0 16px 28px rgba(0,0,0,0.24);
    transition: transform .15s, filter .2s;
}

.podium-action-home {
    background: linear-gradient(180deg, #38bdf8, #2563eb);
}

.podium-action-ranking {
    background: linear-gradient(180deg, #22c55e, #15803d);
}

.podium-action-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
}

.podium-action-btn:active {
    transform: translateY(3px);
}

@media (max-width: 768px) {
    .games-app-theme .topbar {
        height: 58px;
        padding: 0 8px 0 12px;
    }
    /* Asegurar que el avatar de perfil no se corte */
    .games-app-theme .user-menu-wrap {
        flex-shrink: 0;
    }
    .games-app-theme .user-menu-trigger {
        padding: 5px 8px 5px 5px;
        gap: 6px;
    }
    .games-app-theme .topbar-avatar {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }
    .games-app-theme .topbar-actions {
        flex-shrink: 0;
        overflow: visible;
        gap: 4px;
    }
    .games-app-theme .main-content {
        padding: 14px 12px 88px;
    }
    .games-app-theme .bottom-nav {
        left: 10px;
        right: 10px;
        bottom: 10px;
        height: 62px;
        border-radius: 22px;
        border: 1px solid rgba(255,255,255,0.14);
        box-shadow: 0 18px 38px rgba(0,0,0,0.46);
    }
    .game-app-hero {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 20px;
    }
    .game-phone-preview {
        width: 100%;
        max-width: 210px;
        height: 172px;
        justify-self: center;
        display: grid;
        grid-template-columns: 70px 1fr;
        column-gap: 12px;
        align-items: center;
        padding: 22px 16px 14px;
    }
    .game-phone-preview img {
        margin: 0;
    }
    .game-phone-title {
        text-align: left;
    }
    .game-mini-podium {
        grid-column: 1 / -1;
        height: 52px;
        margin-top: 10px;
    }
    .mini-podium { width: 42px; }
    .mini-podium-1 { height: 52px; font-size: 1.5rem; }
    .mini-podium-2 { height: 40px; font-size: 1.25rem; }
    .mini-podium-3 { height: 32px; font-size: 1.1rem; }
}

@media (max-width: 520px) {
    .game-app-hero h1 {
        font-size: 2.35rem;
    }
    .game-download-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .game-download-btn {
        min-width: 0;
        padding: 8px 10px;
        justify-content: center;
    }
    .game-download-btn i {
        font-size: 1.25rem;
    }
    .game-download-btn span {
        font-size: 0.78rem;
    }
    .game-download-btn small {
        font-size: 0.52rem;
    }
    .games-app-theme .explorar-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .games-app-theme .explorar-subject-card {
        min-height: 145px;
        padding: 16px 10px;
    }
    .game-rank-card {
        padding: 11px;
        gap: 9px;
    }
    .game-rank-number {
        width: 32px;
        min-width: 32px;
        height: 32px;
        border-radius: 11px;
        font-size: 1rem;
    }
    .game-rank-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.35rem;
    }
    .game-rank-badge {
        display: none;
    }
    .games-app-theme .stadium-podium-container {
        min-height: 526px;
        padding: 18px 8px 20px;
    }
    .games-app-theme .podium-pillars-wrapper {
        min-height: 296px;
        gap: 6px;
    }
    .games-app-theme .podium-cylinder {
        min-width: 76px;
        max-width: 100px;
    }
    .games-app-theme .rank-1 {
        max-width: 112px;
    }
    .games-app-theme .rank-1 .cylinder-body { min-height: 138px; }
    .games-app-theme .rank-2 .cylinder-body { min-height: 108px; }
    .games-app-theme .rank-3 .cylinder-body { min-height: 88px; }
    .games-app-theme .cylinder-rank {
        font-size: 3.2rem;
    }
    .games-app-theme .podium-avatar,
    .games-app-theme .rank-1 .podium-avatar {
        width: 58px;
        height: 58px;
        font-size: 32px;
    }
    .games-app-theme .podium-title-box h2 {
        font-size: 1.38rem !important;
    }
    .games-app-theme .podium-title-box h2 .highlight-yellow {
        font-size: 1.65rem;
    }
    .podium-actions {
        gap: 8px;
    }
    .podium-action-btn {
        min-height: 48px;
        font-size: 0.78rem;
    }
}

/* Full mobile app polish */
.games-app-theme .page-header h1,
.games-app-theme .page-header h2,
.games-app-theme #greeting-text {
    color: #fff !important;
    text-shadow: 0 4px 16px rgba(0,0,0,0.42);
}

.games-app-theme #greeting-text {
    display: block;
    font-size: clamp(1.7rem, 7vw, 3rem);
    line-height: 1.02;
    letter-spacing: 0;
    margin: 6px 0 18px;
}

.games-app-theme #page-inicio .page-header {
    margin: 0 0 18px;
}

.games-app-theme .quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.games-app-theme .qa-card {
    min-height: 178px;
    border-radius: 24px;
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: 0 22px 48px rgba(0,0,0,0.34), inset 0 1px 0 rgba(255,255,255,0.12);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.games-app-theme .qa-card-blue {
    background:
        radial-gradient(circle at 86% 18%, rgba(56,189,248,0.26), transparent 8rem),
        linear-gradient(145deg, rgba(37,99,235,0.34), rgba(16,9,35,0.92));
    border-color: rgba(96,165,250,0.34);
}

.games-app-theme .qa-card-red {
    background:
        radial-gradient(circle at 86% 18%, rgba(248,113,113,0.26), transparent 8rem),
        linear-gradient(145deg, rgba(220,38,38,0.30), rgba(16,9,35,0.92));
    border-color: rgba(248,113,113,0.34);
}

.games-app-theme .qa-card-yellow {
    background:
        radial-gradient(circle at 86% 18%, rgba(250,204,21,0.24), transparent 8rem),
        linear-gradient(145deg, rgba(245,158,11,0.30), rgba(16,9,35,0.92));
    border-color: rgba(250,204,21,0.34);
}

.games-app-theme .qa-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    margin-bottom: 24px;
    font-size: 24px;
    box-shadow: 0 14px 28px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.26);
}

.games-app-theme .qa-card-blue .qa-icon { background: linear-gradient(180deg, #38bdf8, #2563eb); }
.games-app-theme .qa-card-red .qa-icon { background: linear-gradient(180deg, #fb7185, #dc2626); }
.games-app-theme .qa-card-yellow .qa-icon { background: linear-gradient(180deg, #fde047, #f59e0b); color: #78350f; }

.games-app-theme .qa-card h3 {
    color: #fff !important;
    font-size: 1.14rem;
    font-weight: 950;
    text-shadow: 0 3px 12px rgba(0,0,0,0.42);
}

.games-app-theme .qa-card p {
    color: #dbeafe !important;
    font-size: 0.86rem;
    font-weight: 750;
}

.games-app-theme .avatar-section > div,
.games-app-theme #student-avatar-section > div {
    background:
        radial-gradient(circle at 18% 50%, rgba(124,58,237,0.38), transparent 8rem),
        linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.045)) !important;
    border: 1px solid rgba(255,255,255,0.13) !important;
    border-radius: 26px !important;
    color: #fff !important;
    box-shadow: 0 22px 46px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.10) !important;
    overflow: hidden;
}

.games-app-theme #student-avatar-section h3,
.games-app-theme #student-avatar-section p {
    color: #fff !important;
}

.games-app-theme #student-avatar-section p {
    opacity: 0.86;
}

.games-app-theme #current-avatar-display {
    width: 96px !important;
    height: 96px !important;
    border: 4px solid rgba(255,255,255,0.88) !important;
    box-shadow: 0 0 0 8px rgba(124,58,237,0.28), 0 18px 40px rgba(0,0,0,0.38) !important;
}

.games-app-theme #student-avatar-section button,
.games-app-theme .join-code-btn,
.games-app-theme .join-full-btn,
.games-app-theme .explorar-btn-study {
    border-radius: 16px !important;
    color: #fff !important;
    background: linear-gradient(180deg, #38bdf8, #2563eb) !important;
    box-shadow: 0 5px 0 #1e3a8a, 0 16px 30px rgba(37,99,235,0.28) !important;
}

.games-app-theme .join-card,
.games-app-theme .join-full-card,
.games-app-theme .recent-section,
.games-app-theme .results-list,
.games-app-theme .library-list,
.games-app-theme .reports-list {
    color: #fff;
}

.games-app-theme .join-card h2,
.games-app-theme .join-full-card h2,
.games-app-theme .recent-section h2 {
    color: #fff;
}

.games-app-theme .join-card p,
.games-app-theme .join-full-card p,
.games-app-theme .empty-state p,
.games-app-theme .empty-state small {
    color: #cbd5e1;
}

.games-app-theme .join-code-input,
.games-app-theme .join-code-full-input {
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.14);
    color: #fff;
}

.games-app-theme .join-code-input:focus,
.games-app-theme .join-code-full-input:focus {
    border-color: #facc15;
    box-shadow: 0 0 0 4px rgba(250,204,21,0.16);
}

.games-app-theme .crear-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.13);
    box-shadow: 0 18px 38px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.08);
}

.games-app-theme .crear-card h3,
.games-app-theme .crear-card p {
    color: #fff;
}

.games-app-theme #results-list > div[style],
.games-app-theme #library-list > div[style],
.games-app-theme #reports-list > div[style] {
    background: rgba(255,255,255,0.08) !important;
    border: 1px solid rgba(255,255,255,0.13) !important;
    border-radius: 18px !important;
    color: #fff !important;
    box-shadow: 0 16px 32px rgba(0,0,0,0.26), inset 0 1px 0 rgba(255,255,255,0.08) !important;
}

.games-app-theme #results-list > div[style]:hover,
.games-app-theme #library-list > div[style]:hover,
.games-app-theme #reports-list > div[style]:hover {
    box-shadow: 0 22px 42px rgba(0,0,0,0.34), inset 0 1px 0 rgba(255,255,255,0.10) !important;
}

.games-app-theme #results-list h4,
.games-app-theme #library-list h4,
.games-app-theme #reports-list h4,
.games-app-theme #results-list p,
.games-app-theme #library-list p,
.games-app-theme #reports-list p,
.games-app-theme #results-list span,
.games-app-theme #library-list span,
.games-app-theme #reports-list span,
.games-app-theme #results-list small,
.games-app-theme #library-list small,
.games-app-theme #reports-list small {
    color: #f8fafc !important;
}

.games-app-theme #results-list > div[style] > div:first-child {
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.28));
}

.games-app-theme #results-list > div[style] > div:last-child span:first-child {
    color: #facc15 !important;
}

.games-app-theme #results-list [style*="background:#EEF2F6"],
.games-app-theme #results-list [style*="background:#EEF2FF"],
.games-app-theme #library-list [style*="background:#EEF2F6"],
.games-app-theme #reports-list [style*="background:#EEF2F6"] {
    background: rgba(56,189,248,0.16) !important;
    color: #bae6fd !important;
    border: 1px solid rgba(56,189,248,0.22) !important;
}

.game-podium-showcase {
    position: relative;
    z-index: 2;
    min-height: 306px;
    border-radius: 28px;
    padding: 18px 12px 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.13);
    background:
        radial-gradient(circle at 50% 36%, rgba(250,204,21,0.30), transparent 8rem),
        radial-gradient(circle at 50% 72%, rgba(168,85,247,0.50), transparent 9rem),
        linear-gradient(180deg, rgba(15,5,35,0.95), rgba(35,10,68,0.94));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 24px 48px rgba(0,0,0,0.42);
}

.game-podium-showcase::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(255,255,255,0.16) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.28;
}

.showcase-trophy {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #facc15;
    font-size: 2rem;
    filter: drop-shadow(0 0 14px rgba(250,204,21,0.72));
}

.showcase-title {
    position: relative;
    z-index: 2;
    margin-top: 2px;
    color: #fff;
    text-align: center;
    font-size: 1.32rem;
    line-height: 1.02;
    font-weight: 950;
    text-shadow: 0 4px 12px rgba(0,0,0,0.66);
}

.showcase-title span {
    display: block;
    color: #facc15;
    font-size: 1.48rem;
}

.showcase-laurels span {
    position: absolute;
    top: 55px;
    width: 44px;
    height: 78px;
    border-radius: 50%;
    border-left: 8px solid #22c55e;
    opacity: 0.78;
}

.showcase-laurels span:first-child {
    left: 12px;
    transform: rotate(-18deg);
}

.showcase-laurels span:last-child {
    right: 12px;
    transform: scaleX(-1) rotate(-18deg);
}

.showcase-stage {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    min-height: 212px;
    margin-top: 8px;
}

.showcase-stage::after {
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 4px;
    height: 28px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(168,85,247,0.92), rgba(88,28,135,0.58) 52%, transparent 74%);
    box-shadow: 0 0 24px rgba(168,85,247,0.78);
}

.showcase-player {
    position: relative;
    z-index: 2;
    width: 86px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.showcase-player-1 {
    width: 102px;
    margin-bottom: 0;
}

.showcase-player-2 { order: 1; }
.showcase-player-1 { order: 2; }
.showcase-player-3 { order: 3; }

.showcase-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(180deg, #38bdf8, #2563eb);
    border: 3px solid rgba(255,255,255,0.9);
    box-shadow: 0 0 20px rgba(56,189,248,0.52);
}

.showcase-player-1 .showcase-avatar {
    width: 66px;
    height: 66px;
    border-color: #facc15;
    box-shadow: 0 0 28px rgba(250,204,21,0.60);
}

.showcase-crown {
    color: #facc15;
    font-size: 1.6rem;
    line-height: 1;
    margin-bottom: -3px;
    filter: drop-shadow(0 4px 10px rgba(250,204,21,0.64));
}

.showcase-name {
    position: relative;
    z-index: 6;
    max-width: 94px;
    margin: -3px 0 7px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #fff;
    background: rgba(0,0,0,0.82);
    border: 1px solid rgba(255,255,255,0.12);
    font-size: 0.62rem;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 7px 14px rgba(0,0,0,0.28);
}

.showcase-pillar {
    width: 100%;
    height: 92px;
    border-radius: 16px 16px 20px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 14px 18px rgba(255,255,255,0.24), inset 0 -18px 30px rgba(0,0,0,0.34), 0 16px 26px rgba(0,0,0,0.36);
}

.showcase-player-1 .showcase-pillar {
    height: 128px;
    background: linear-gradient(180deg, #fde047, #f59e0b);
}

.showcase-player-2 .showcase-pillar {
    height: 100px;
    background: linear-gradient(180deg, #f8fafc, #94a3b8);
}

.showcase-player-3 .showcase-pillar {
    height: 82px;
    background: linear-gradient(180deg, #fb923c, #9a3412);
}

.showcase-pillar strong {
    color: rgba(255,255,255,0.92);
    font-size: 3.2rem;
    font-weight: 950;
    text-shadow: 0 3px 0 rgba(0,0,0,0.22), 0 9px 16px rgba(0,0,0,0.34);
}

.showcase-player-1 .showcase-pillar strong {
    color: #fff7ad;
    font-size: 4.2rem;
}

.showcase-player-2 .showcase-pillar strong {
    color: #f8fafc;
}

.showcase-score {
    min-width: 76px;
    margin-top: -14px;
    padding: 5px 8px;
    border-radius: 12px;
    color: #fff;
    background: rgba(0,0,0,0.74);
    text-align: center;
    font-size: 0.6rem;
    font-weight: 950;
    line-height: 1.2;
    box-shadow: 0 8px 16px rgba(0,0,0,0.34);
}

.showcase-score span {
    color: #facc15;
}

@media (max-width: 900px) {
    .game-app-hero {
        grid-template-columns: 1fr;
    }

    .game-podium-showcase {
        width: min(100%, 350px);
        justify-self: center;
    }
}

@media (max-width: 600px) {
    .games-app-theme .quick-actions {
        grid-template-columns: 1fr;
    }

    .games-app-theme .qa-card {
        min-height: 166px;
    }

    .games-app-theme #student-avatar-section > div {
        align-items: center !important;
        padding: 20px !important;
    }

    .game-podium-showcase {
        min-height: 330px;
        padding-top: 16px;
    }

    .showcase-stage {
        gap: 5px;
    }

    .showcase-player {
        width: 78px;
    }

    .showcase-player-1 {
        width: 96px;
    }
}

/* JUGAR premium mission board */
.games-app-theme #page-jugar {
    padding-bottom: 28px;
}

.games-app-theme #page-jugar .game-app-hero {
    grid-template-columns: minmax(0, 0.88fr) minmax(320px, 1.12fr);
    align-items: stretch;
    padding: 18px;
    border-radius: 30px;
    background:
        radial-gradient(circle at 78% 40%, rgba(250,204,21,0.20), transparent 16rem),
        radial-gradient(circle at 10% 12%, rgba(56,189,248,0.18), transparent 14rem),
        linear-gradient(145deg, rgba(20,8,38,0.94), rgba(7,4,18,0.98));
}

.games-app-theme #page-jugar .game-app-hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 260px;
    padding: 12px 0 12px 8px;
}

.games-app-theme #page-jugar .game-app-hero h1 {
    font-size: clamp(2.4rem, 7vw, 4.7rem);
}

.games-app-theme #page-jugar .game-podium-showcase {
    min-height: 390px;
    border-radius: 30px;
    background:
        radial-gradient(circle at 50% 17%, rgba(255,219,77,0.34), transparent 8rem),
        radial-gradient(circle at 50% 58%, rgba(168,85,247,0.52), transparent 12rem),
        linear-gradient(180deg, #16053a 0%, #2a0961 56%, #10051f 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.16),
        inset 0 -18px 40px rgba(0,0,0,0.38),
        0 20px 48px rgba(0,0,0,0.42);
}

.games-app-theme #page-jugar .game-podium-showcase::after {
    content: "";
    position: absolute;
    inset: auto 10px 14px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(236,72,153,0.85), rgba(88,28,135,0.64) 54%, transparent 76%);
    box-shadow: 0 0 28px rgba(236,72,153,0.55), 0 0 44px rgba(168,85,247,0.45);
}

.games-app-theme #page-jugar .game-podium-showcase::before {
    background:
        linear-gradient(115deg, transparent 0 34%, rgba(255,255,255,0.08) 35% 38%, transparent 39%),
        radial-gradient(circle, rgba(255,255,255,0.18) 1px, transparent 1px);
    background-size: auto, 26px 26px;
    opacity: 0.42;
}

.games-app-theme #page-jugar .showcase-title {
    font-size: 1.55rem;
}

.games-app-theme #page-jugar .showcase-title span {
    font-size: 1.78rem;
}

.games-app-theme #page-jugar .showcase-stage {
    min-height: 272px;
}

.games-app-theme #page-jugar .showcase-player {
    width: 94px;
}

.games-app-theme #page-jugar .showcase-player-1 {
    width: 116px;
}

.games-app-theme #page-jugar .showcase-avatar {
    position: relative;
    background:
        radial-gradient(circle at 34% 25%, rgba(255,255,255,0.62) 0 10%, transparent 11%),
        radial-gradient(circle at 50% 40%, #5fd3ff 0 33%, #1778f2 73%);
    border-width: 4px;
    box-shadow:
        0 0 0 4px rgba(56,189,248,0.18),
        0 0 24px rgba(56,189,248,0.58),
        inset -8px -10px 16px rgba(0,48,156,0.42),
        inset 8px 8px 14px rgba(255,255,255,0.26);
}

.games-app-theme #page-jugar .showcase-avatar::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -18px;
    width: 42px;
    height: 28px;
    transform: translateX(-50%);
    border-radius: 22px 22px 10px 10px;
    background: linear-gradient(180deg, #42c7ff, #1e63df);
    box-shadow: inset 0 6px 10px rgba(255,255,255,0.18);
}

.games-app-theme #page-jugar .showcase-player-1 .showcase-avatar::after {
    width: 52px;
    height: 34px;
}

.games-app-theme #page-jugar .showcase-pillar {
    position: relative;
    border-radius: 16px 16px 22px 22px;
    transform: perspective(180px) rotateX(1deg);
}

.games-app-theme #page-jugar .showcase-pillar::before {
    content: "";
    position: absolute;
    left: -4px;
    right: -4px;
    top: -11px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.78), rgba(255,255,255,0.30));
    box-shadow: inset 0 5px 10px rgba(255,255,255,0.40), 0 7px 14px rgba(0,0,0,0.28);
}

.games-app-theme #page-jugar .showcase-pillar::after {
    content: "";
    position: absolute;
    inset: 8px 10px auto auto;
    width: 20px;
    height: calc(100% - 20px);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255,255,255,0.28), transparent);
    opacity: 0.7;
}

.games-app-theme #page-jugar .showcase-player-1 .showcase-pillar {
    height: 148px;
    background:
        linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent),
        linear-gradient(180deg, #ffe96b, #f5b400 48%, #d98200) !important;
}

.games-app-theme #page-jugar .showcase-player-2 .showcase-pillar {
    height: 116px;
    background:
        linear-gradient(90deg, transparent, rgba(255,255,255,0.20), transparent),
        linear-gradient(180deg, #ffffff, #cbd5e1 48%, #7c8797) !important;
}

.games-app-theme #page-jugar .showcase-player-3 .showcase-pillar {
    height: 98px;
    background:
        linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent),
        linear-gradient(180deg, #ffb774, #d56d28 50%, #8f3c15) !important;
}

.games-app-theme #page-jugar .explorar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

@media (min-width: 1260px) {
    .games-app-theme #page-jugar .explorar-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.games-app-theme .subject-mission-card {
    position: relative;
    min-height: 176px;
    padding: 14px;
    border-radius: 24px !important;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(circle at 18% 26%, color-mix(in srgb, var(--subject-color) 34%, transparent), transparent 7rem),
        linear-gradient(145deg, rgba(255,255,255,0.11), rgba(10,5,25,0.94)) !important;
    border: 1px solid color-mix(in srgb, var(--subject-color) 46%, rgba(255,255,255,0.14)) !important;
    box-shadow:
        0 16px 34px rgba(0,0,0,0.34),
        inset 0 1px 0 rgba(255,255,255,0.12) !important;
}

.games-app-theme .subject-mission-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, transparent 0 42%, rgba(255,255,255,0.08) 43% 46%, transparent 47%),
        repeating-linear-gradient(135deg, rgba(255,255,255,0.045) 0 1px, transparent 1px 9px);
    opacity: 0.52;
    z-index: -1;
}

.games-app-theme .subject-mission-card::after {
    content: "";
    position: absolute;
    right: -34px;
    bottom: -42px;
    width: 118px;
    height: 118px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--subject-color) 42%, transparent), transparent 68%);
    z-index: -1;
}

.games-app-theme .mission-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 0 34%, rgba(255,255,255,0.13) 46%, transparent 58%);
    transform: translateX(-75%);
    transition: transform .45s ease;
    pointer-events: none;
}

.games-app-theme .subject-mission-card:hover .mission-shine {
    transform: translateX(70%);
}

.games-app-theme .mission-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.games-app-theme .mission-topline span,
.games-app-theme .mission-topline strong {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.58rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.games-app-theme .mission-topline span {
    color: #fff;
    background: rgba(0,0,0,0.28);
    border: 1px solid rgba(255,255,255,0.10);
}

.games-app-theme .mission-topline strong {
    color: var(--subject-color);
    background: color-mix(in srgb, var(--subject-color) 18%, rgba(255,255,255,0.06));
    border: 1px solid color-mix(in srgb, var(--subject-color) 34%, transparent);
}

.games-app-theme .mission-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.games-app-theme .mission-orb {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 32% 28%, rgba(255,255,255,0.34), transparent 24%),
        linear-gradient(160deg, color-mix(in srgb, var(--subject-color) 82%, #fff 8%), color-mix(in srgb, var(--subject-color) 45%, #0b0618));
    box-shadow: 0 12px 24px color-mix(in srgb, var(--subject-color) 26%, transparent), inset 0 1px 0 rgba(255,255,255,0.28);
}

.games-app-theme .mission-orb span {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: #fff;
    background: rgba(0,0,0,0.20);
    border: 1px solid rgba(255,255,255,0.16);
    font-size: 0.88rem;
    font-weight: 950;
    letter-spacing: 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.35);
    filter: none;
}

.games-app-theme .mission-orb::before,
.games-app-theme .mission-orb::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.games-app-theme .mission-orb::before {
    width: 34px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.26);
    transform: rotate(-34deg);
}

.games-app-theme .mission-orb::after {
    width: 8px;
    height: 34px;
    border-radius: 999px;
    background: rgba(255,255,255,0.18);
    transform: rotate(-34deg);
}

.games-app-theme .mission-copy {
    min-width: 0;
}

.games-app-theme .mission-copy h3 {
    margin: 0;
    color: #fff !important;
    font-size: 0.98rem !important;
    line-height: 1.02;
    font-weight: 950 !important;
    letter-spacing: 0 !important;
    text-shadow: 0 3px 12px rgba(0,0,0,0.42);
}

.games-app-theme .mission-copy p {
    margin: 6px 0 0;
    color: #cbd5e1 !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
}

.games-app-theme .mission-play {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #120818;
    background: linear-gradient(180deg, #fde047, #f59e0b);
    box-shadow: 0 5px 0 #92400e, 0 12px 22px rgba(245,158,11,0.26);
}

.games-app-theme .mission-progress {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 12px;
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255,255,255,0.11);
}

.games-app-theme .mission-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--subject-color), #facc15);
    box-shadow: 0 0 16px color-mix(in srgb, var(--subject-color) 60%, transparent);
}

@media (max-width: 768px) {
    .games-app-theme #page-jugar .game-app-hero {
        display: block;
        padding: 14px;
        border-radius: 26px;
    }

    .games-app-theme #page-jugar .game-app-hero-copy {
        min-height: 0;
        padding: 0 4px 12px;
    }

    .games-app-theme #page-jugar .game-app-hero h1 {
        font-size: 2.55rem;
    }

    .games-app-theme #page-jugar .game-app-hero p {
        font-size: 0.88rem;
    }

    .games-app-theme #page-jugar .game-podium-showcase {
        min-height: 390px;
        margin-top: 10px;
    }

    .games-app-theme #page-jugar .explorar-grid {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 16px;
    }

    .games-app-theme .subject-mission-card {
        min-height: 134px;
        padding: 13px;
    }
}


/* ═══════════════════════════════════════════════════════════════
   ALCOCERMED ARENA — upgrade visual / avatars premium
   ═══════════════════════════════════════════════════════════════ */
.games-app-theme .topbar-avatar,
.games-app-theme #current-avatar-display,
.games-app-theme #waiting-avatar-icon,
.games-app-theme .game-rank-avatar,
.games-app-theme .showcase-avatar,
.games-app-theme .podium-avatar,
.games-app-theme .podium-mini-avatar,
.games-app-theme .team-member-avatar {
    overflow: hidden;
}

.topbar-avatar-media,
.avatar-choice-media,
.waiting-avatar-media,
.game-rank-avatar-media,
.showcase-avatar-media,
.podium-avatar-media,
.podium-mini-avatar-media,
.team-member-avatar-media,
.avatar-modal-thumb {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.games-app-theme .topbar-avatar {
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.35), rgba(255,255,255,.08)), linear-gradient(135deg, #6d28d9, #2563eb) !important;
    box-shadow: 0 8px 18px rgba(79,70,229,.42);
    border: 2px solid rgba(255,255,255,.22);
}

.games-app-theme #current-avatar-display {
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.32), rgba(255,255,255,0)), linear-gradient(180deg, rgba(91,33,182,.95), rgba(30,41,59,.96)) !important;
}

.avatar-modal-card {
    border: 1px solid rgba(148,163,184,.18);
    border-radius: 18px;
    background: rgba(15,23,42,.76);
    padding: 10px 8px;
    color: #fff;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.avatar-modal-card:hover,
.avatar-modal-card.selected {
    transform: translateY(-3px);
    border-color: rgba(96,165,250,.65);
    box-shadow: 0 12px 28px rgba(37,99,235,.22);
}

.avatar-modal-thumb-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    margin: 0 auto 8px;
    padding: 6px;
    border-radius: 18px;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.2), rgba(255,255,255,0)), linear-gradient(180deg, var(--avatar-accent, #7c3aed), rgba(15,23,42,.94));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 10px 20px rgba(0,0,0,.3);
}

.avatar-modal-label {
    display: block;
    font-size: .73rem;
    font-weight: 700;
}

.games-app-theme .bottom-nav {
    display: flex;
    left: 14px;
    right: 14px;
    bottom: 12px;
    height: auto;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom,0px));
    border-radius: 24px;
    border: 1px solid rgba(99,102,241,.28);
    background: linear-gradient(180deg, rgba(14,11,35,.92), rgba(8,8,22,.96)) !important;
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 45px rgba(7,10,31,.42), inset 0 1px 0 rgba(255,255,255,.08);
    gap: 8px;
}

.games-app-theme .bnav-item {
    flex: 1 1 0;
    min-width: 0;
    gap: 4px;
    padding: 10px 6px;
    border-radius: 18px;
    color: rgba(226,232,240,.72);
    transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}

.games-app-theme .bnav-item i { font-size: 18px; }
.games-app-theme .bnav-item span { font-size: .7rem; letter-spacing: .01em; }
.games-app-theme .bnav-item.active,
.games-app-theme .bnav-item:hover {
    color: #fff;
    background: linear-gradient(180deg, rgba(99,102,241,.42), rgba(37,99,235,.22));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 10px 20px rgba(79,70,229,.22);
    transform: translateY(-2px);
}

.games-app-theme .bnav-item[data-page="jugar"].active {
    background: linear-gradient(180deg, rgba(56,189,248,.48), rgba(37,99,235,.26));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 12px 24px rgba(56,189,248,.22);
}

.game-ranking-shell {
    background: linear-gradient(180deg, rgba(12,11,33,.95), rgba(15,16,43,.94));
    border: 1px solid rgba(99,102,241,.22);
    border-radius: 28px;
    padding: 18px 16px;
    box-shadow: 0 18px 40px rgba(8,10,30,.36);
}

.game-ranking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.game-ranking-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.08rem;
    font-weight: 900;
}

.game-ranking-header p {
    margin: 4px 0 0;
    color: rgba(226,232,240,.68);
    font-size: .82rem;
}

.game-ranking-chip {
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(56,189,248,.12);
    border: 1px solid rgba(56,189,248,.24);
    color: #7dd3fc;
    font-size: .75rem;
    font-weight: 800;
}

.game-ranking-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.games-app-theme .game-rank-card {
    display: grid;
    grid-template-columns: 34px 56px 1fr 18px;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: linear-gradient(180deg, rgba(17,24,39,.82), rgba(10,15,28,.86));
    border: 1px solid rgba(148,163,184,.12);
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.game-rank-number-plain {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(99,102,241,.16);
    color: #c4b5fd;
    font-size: .92rem;
    font-weight: 900;
}

.games-app-theme .game-rank-avatar {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    padding: 4px;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.22), rgba(255,255,255,0)), linear-gradient(180deg, rgba(76,29,149,.95), rgba(15,23,42,.98));
    border: 1px solid rgba(129,140,248,.26);
}

.game-rank-name { color: #fff !important; }
.game-rank-meta { color: rgba(226,232,240,.72) !important; }
.game-rank-pct { font-weight: 900; }
.game-rank-pct.pct-high { color: #4ade80; }
.game-rank-pct.pct-mid { color: #fbbf24; }
.game-rank-pct.pct-low { color: #f87171; }
.game-rank-arrow { color: rgba(226,232,240,.4); font-size: .8rem; }

.games-app-theme .game-podium-showcase {
    min-height: 430px;
    background: radial-gradient(circle at 50% 0%, rgba(94,58,255,.32), rgba(11,8,28,.98) 75%);
    border: 1px solid rgba(129,140,248,.24);
    box-shadow: 0 28px 70px rgba(14,13,38,.46);
}

.games-app-theme .showcase-stage { align-items: flex-end; }

.games-app-theme .showcase-avatar {
    width: 110px;
    height: 110px;
    border-radius: 28px;
    padding: 7px;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.28), rgba(255,255,255,0)), linear-gradient(180deg, rgba(91,33,182,.88), rgba(17,24,39,.96));
    border: 2px solid rgba(96,165,250,.4);
    box-shadow: 0 16px 28px rgba(0,0,0,.28), 0 0 0 7px rgba(56,189,248,.08);
}

.games-app-theme .showcase-player-1 .showcase-avatar {
    width: 132px;
    height: 132px;
    border-color: rgba(250,204,21,.55);
    box-shadow: 0 18px 32px rgba(0,0,0,.32), 0 0 0 10px rgba(250,204,21,.10);
}

.showcase-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    font-size: 2.2rem;
    font-weight: 900;
    color: rgba(255,255,255,.72);
}

.showcase-player-empty { opacity: .75; }
.showcase-player-empty .showcase-name,
.showcase-player-empty .showcase-score { color: rgba(226,232,240,.65); }

.games-app-theme .showcase-name {
    min-width: 90px;
    text-align: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15,23,42,.72);
    border: 1px solid rgba(255,255,255,.08);
    font-weight: 800;
}

.games-app-theme .showcase-score {
    min-width: 94px;
    background: rgba(10,15,30,.78);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    padding: 8px 12px;
    font-weight: 800;
    box-shadow: 0 12px 20px rgba(3,7,18,.18);
}

.games-app-theme .showcase-score span {
    color: #facc15;
    font-size: .88rem;
    font-weight: 900;
}

.games-app-theme .podium-avatar {
    font-size: initial;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.games-app-theme .podium-mini-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    padding: 3px;
    background: linear-gradient(180deg, rgba(91,33,182,.92), rgba(15,23,42,.96));
    border: 1px solid rgba(129,140,248,.26);
}

.games-app-theme .team-member-avatar {
    display: inline-flex;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    padding: 2px;
    background: linear-gradient(180deg, rgba(91,33,182,.92), rgba(15,23,42,.96));
    border: 1px solid rgba(129,140,248,.24);
}

@media (max-width: 768px) {
    .games-app-theme .game-app-hero {
        padding: 22px 18px;
    }

    .games-app-theme .game-podium-showcase {
        min-height: 395px;
        padding: 18px 14px 22px;
    }

    .games-app-theme .showcase-avatar {
        width: 88px;
        height: 88px;
        border-radius: 22px;
    }

    .games-app-theme .showcase-player-1 .showcase-avatar {
        width: 104px;
        height: 104px;
    }

    .games-app-theme .showcase-name {
        min-width: auto;
        font-size: .74rem;
        padding: 7px 10px;
    }

    .games-app-theme .showcase-score {
        min-width: auto;
        font-size: .74rem;
        padding: 8px 10px;
    }

    .games-app-theme .game-rank-card {
        grid-template-columns: 30px 48px 1fr 14px;
        padding: 10px;
    }

    .games-app-theme .game-rank-avatar {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }

    .games-app-theme .bottom-nav {
        display: flex !important;
    }
}

/* Fix de distribucion para el ranking gamer.
   Las reglas antiguas de #top-estudiantes-list ajustaban hijos directos
   como si fueran filas simples y comprimian el layout nuevo. */
.games-app-theme #top-estudiantes-list .game-ranking-shell,
.games-app-theme #top-estudiantes-list .game-ranking-header,
.games-app-theme #top-estudiantes-list .game-ranking-list,
.games-app-theme #top-estudiantes-list .game-rank-card {
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    font-size: inherit !important;
}

.games-app-theme #top-estudiantes-list .game-ranking-shell {
    display: block !important;
    padding: 18px 16px !important;
    overflow: hidden;
}

.games-app-theme #top-estudiantes-list .game-ranking-header {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 12px !important;
}

.games-app-theme #top-estudiantes-list .game-ranking-header > div {
    min-width: 0;
}

.games-app-theme #top-estudiantes-list .game-ranking-header h3,
.games-app-theme #top-estudiantes-list .game-ranking-header p {
    overflow-wrap: anywhere;
}

.games-app-theme #top-estudiantes-list .game-ranking-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.games-app-theme #top-estudiantes-list .game-rank-card {
    display: grid !important;
    grid-template-columns: 36px 56px minmax(0, 1fr) 18px !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 12px !important;
}

.games-app-theme #top-estudiantes-list .game-rank-number,
.games-app-theme #top-estudiantes-list .game-rank-number-plain {
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    font-size: .95rem !important;
    line-height: 1 !important;
}

.games-app-theme #top-estudiantes-list .game-rank-avatar {
    width: 56px !important;
    min-width: 56px !important;
    height: 56px !important;
    font-size: initial !important;
}

.games-app-theme #top-estudiantes-list .game-rank-info {
    min-width: 0 !important;
    overflow: hidden;
}

.games-app-theme #top-estudiantes-list .game-rank-name,
.games-app-theme #top-estudiantes-list .game-rank-meta {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.games-app-theme #top-estudiantes-list .game-rank-meta {
    line-height: 1.35;
}

.games-app-theme #top-estudiantes-list .game-rank-arrow {
    width: 18px;
    min-width: 18px;
    text-align: center;
}

@media (max-width: 480px) {
    .games-app-theme #top-estudiantes-list .game-ranking-shell {
        padding: 14px 12px 16px !important;
        border-radius: 22px;
    }

    .games-app-theme #top-estudiantes-list .game-ranking-header {
        align-items: center !important;
    }

    .games-app-theme #top-estudiantes-list .game-ranking-header h3 {
        font-size: .98rem !important;
    }

    .games-app-theme #top-estudiantes-list .game-ranking-header p {
        font-size: .72rem !important;
        line-height: 1.25;
    }

    .games-app-theme #top-estudiantes-list .game-ranking-chip {
        flex: 0 0 auto;
        padding: 7px 9px;
        font-size: .68rem;
    }

    .games-app-theme #top-estudiantes-list .game-rank-card {
        grid-template-columns: 32px 48px minmax(0, 1fr) 14px !important;
        gap: 9px !important;
        padding: 9px 10px !important;
        border-radius: 16px;
    }

    .games-app-theme #top-estudiantes-list .game-rank-number,
    .games-app-theme #top-estudiantes-list .game-rank-number-plain {
        width: 32px !important;
        min-width: 32px !important;
        height: 32px !important;
        border-radius: 11px;
        font-size: .86rem !important;
    }

    .games-app-theme #top-estudiantes-list .game-rank-avatar {
        width: 48px !important;
        min-width: 48px !important;
        height: 48px !important;
        border-radius: 14px;
    }

    .games-app-theme #top-estudiantes-list .game-rank-name {
        font-size: .86rem !important;
        line-height: 1.15;
    }

    .games-app-theme #top-estudiantes-list .game-rank-meta {
        font-size: .7rem !important;
    }
}

/* Fix de separacion para los puntajes del podio principal. */
.games-app-theme #page-jugar .showcase-stage {
    padding-bottom: 18px;
}

.games-app-theme #page-jugar .showcase-player {
    justify-content: flex-end;
}

.games-app-theme #page-jugar .showcase-score,
.games-app-theme .showcase-score {
    position: relative;
    z-index: 8;
    margin-top: 10px !important;
    min-width: 86px;
    padding: 7px 10px;
    line-height: 1.08;
    white-space: nowrap;
}

.games-app-theme #page-jugar .showcase-score span,
.games-app-theme .showcase-score span {
    display: block;
    margin-top: 2px;
    line-height: 1;
}

@media (max-width: 480px) {
    .games-app-theme #page-jugar .showcase-stage {
        min-height: 286px;
        padding-bottom: 22px;
    }

    .games-app-theme #page-jugar .showcase-score,
    .games-app-theme .showcase-score {
        min-width: 74px;
        padding: 6px 8px;
        font-size: .56rem;
        border-radius: 13px;
    }
}

/* Modo juego: durante preguntas/resultados se oculta toda la navegacion. */
body.quiz-focus-mode,
body.quiz-focus-mode .app-shell {
    overflow-x: hidden;
}

body.quiz-focus-mode .topbar,
body.quiz-focus-mode .sidebar,
body.quiz-focus-mode .bottom-nav,
body.quiz-focus-mode .sidebar-overlay {
    display: none !important;
}

body.quiz-focus-mode .main-content {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh !important;
}

body.quiz-focus-mode #page-quiz {
    min-height: 100vh;
    padding: 0 !important;
}

body.quiz-focus-mode #quiz-container {
    min-height: 100vh;
    height: 100vh !important;
    max-width: 1100px;
    padding: 0 12px 18px !important;
}

@supports (height: 100dvh) {
    body.quiz-focus-mode .main-content,
    body.quiz-focus-mode #page-quiz,
    body.quiz-focus-mode #quiz-container {
        min-height: 100dvh !important;
    }

    body.quiz-focus-mode #quiz-container {
        height: 100dvh !important;
    }
}

@media (max-width: 768px) {
    body.quiz-focus-mode #quiz-container {
        padding: 0 10px 14px !important;
    }
}

/* Ajustes moviles para preguntas de relacionar imagen con incisos. */
.quiz-options-grid.quiz-options-dnd {
    display: block;
    flex: 0 0 auto;
    min-height: 0;
    overflow: visible;
}

.quiz-dnd-builder {
    grid-column: 1 / -1;
    max-width: 100%;
}

.quiz-dnd-map-shell {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 16px;
    overflow: visible;
    border: 4px solid rgba(255, 255, 255, 0.2);
    background: #2D1B4E;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
    padding: 0;
}

.quiz-dnd-image-stage {
    position: relative;
    display: inline-block;
    vertical-align: top;
    max-width: 100%;
    line-height: 0;
    border-radius: 12px;
    overflow: visible;
    background: #fff;
}

.quiz-dnd-image-stage .quiz-dnd-image {
    display: block;
    max-width: 100%;
    max-height: min(62vh, 560px);
    width: auto;
    height: auto;
    user-select: none;
    pointer-events: none;
    object-fit: contain;
}

.quiz-dnd-image-stage .quiz-dnd-slot {
    position: absolute;
    left: calc(var(--pin-x) * 1%);
    top: calc(var(--pin-y) * 1%);
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-card, #fff);
    border: 3px solid var(--border, #E2E8F0);
    color: var(--text, #334155);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    transition: all 0.2s;
    z-index: 100;
}

.quiz-dnd-image {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.quiz-question-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.quiz-question-image-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: -16px 0 20px;
    padding: 0 4px;
}

.quiz-question-image-wrap[hidden] {
    display: none !important;
    margin: 0;
    padding: 0;
}

.quiz-question-image-wrap .quiz-question-image,
.quiz-question-image {
    display: block;
    width: auto;
    max-width: min(100%, 620px);
    max-height: min(46vh, 380px);
    border-radius: 18px;
    background: #fff;
    object-fit: contain;
    box-shadow: 0 14px 34px rgba(0,0,0,.20);
}

.quiz-dnd-anchor,
.quiz-dnd-connector {
    display: none;
}

body.quiz-focus-mode #page-quiz {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

body.quiz-focus-mode #quiz-container {
    height: auto !important;
    overflow: visible;
}

@media (max-width: 768px) {
    body.quiz-focus-mode #quiz-container {
        min-height: 100vh !important;
        height: auto !important;
        padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)) !important;
    }

    body.quiz-focus-mode #quiz-question-card {
        flex: 0 0 auto;
        min-height: 92px !important;
        margin-bottom: 12px !important;
    }

    .quiz-question-image-wrap {
        margin: -8px 0 14px;
        padding: 0;
    }

    .quiz-options-grid.quiz-options-dnd {
        padding-bottom: 22px;
    }

    .quiz-dnd-builder {
        gap: 10px !important;
    }

    .quiz-question-content {
        gap: 12px;
    }

    .quiz-question-image-wrap .quiz-question-image,
    .quiz-question-image {
        max-width: 100%;
        max-height: min(34vh, 300px);
        border-radius: 14px;
    }

    .quiz-dnd-builder > p {
        width: 100%;
        margin: 0 !important;
        padding: 8px 10px !important;
        font-size: 0.86rem !important;
        line-height: 1.3 !important;
    }

    #dnd-student-container.quiz-dnd-map-shell {
        width: 100%;
        border-width: 2px !important;
        border-radius: 12px !important;
        overflow: visible !important;
    }

    .quiz-dnd-image-stage .quiz-dnd-image {
        max-height: min(48vh, 390px) !important;
    }

    .quiz-dnd-image-stage .quiz-dnd-anchor {
        display: block;
        position: absolute;
        left: calc(var(--pin-x) * 1%);
        top: calc(var(--pin-y) * 1%);
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #f43f5e;
        border: 2px solid #fff;
        transform: translate(-50%, -50%);
        z-index: 78;
        box-shadow: 0 0 0 3px rgba(244,63,94,.22);
        pointer-events: none;
    }

    .quiz-dnd-image-stage .quiz-dnd-connector {
        display: block;
        position: absolute;
        left: calc(var(--pin-x) * 1%);
        top: calc(var(--pin-y) * 1%);
        height: 3px;
        width: calc(92% - (var(--pin-x) * 1%));
        min-width: 18px;
        max-width: 128px;
        border-radius: 999px;
        background: linear-gradient(90deg, rgba(244,63,94,.92), rgba(244,63,94,.18));
        transform: translateY(-50%);
        z-index: 76;
        pointer-events: none;
        box-shadow: 0 0 10px rgba(244,63,94,.28);
    }

    .quiz-dnd-image-stage .quiz-dnd-slot {
        left: 92% !important;
        top: calc(var(--pin-y) * 1%) !important;
        width: 32px !important;
        height: 32px !important;
        font-size: 0.88rem !important;
        z-index: 90 !important;
        border-width: 2px !important;
        box-shadow: 0 5px 14px rgba(0,0,0,.32), 0 0 0 3px rgba(15,23,42,.22) !important;
    }

    #dnd-labels-container {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 8px !important;
        width: 100%;
        margin-top: 2px !important;
    }

    #dnd-labels-container .quiz-dnd-label-btn {
        width: 100%;
        min-height: 44px !important;
        padding: 10px 12px !important;
        font-size: 0.9rem !important;
        line-height: 1.25 !important;
        text-align: left !important;
    }

    #quiz-confirm-dnd {
        margin-top: 2px !important;
        padding: 13px 16px !important;
        min-height: 48px;
        font-size: 1rem !important;
        position: sticky;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        z-index: 25;
    }
}

@media (max-width: 380px) {
    .quiz-dnd-image-stage .quiz-dnd-image {
        max-height: 44vh !important;
    }

    #dnd-labels-container .quiz-dnd-label-btn {
        min-height: 40px !important;
        padding: 9px 10px !important;
        font-size: 0.84rem !important;
    }
}

/* DND v2: layout compacto para relacionar imagen + etiquetas. */
.quiz-options-grid.quiz-options-dnd {
    display: block !important;
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 0 0 18px;
}

.quiz-dnd-builder {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
    gap: 12px !important;
}

.quiz-dnd-prompt {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    color: #fff;
    font-size: 1rem;
    line-height: 1.25;
    font-weight: 900;
    text-align: center;
    background: rgba(0,0,0,0.34);
    padding: 9px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
}

.quiz-dnd-prompt i {
    color: #A78BFA;
    margin-right: 8px;
}

.quiz-dnd-workspace {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(220px, max-content) minmax(240px, 320px);
    gap: 16px;
    align-items: center;
    justify-content: center;
}

.quiz-dnd-map-shell {
    justify-self: center;
    min-width: 0;
    max-width: 100%;
    background: #fff !important;
    border: 2px solid rgba(255,255,255,0.22) !important;
    border-radius: 16px !important;
    padding: 8px !important;
    box-shadow: 0 14px 34px rgba(0,0,0,0.36) !important;
}

.quiz-dnd-image-stage {
    max-width: 100%;
    background: #fff;
}

.quiz-dnd-image-stage .quiz-dnd-image {
    max-width: min(100%, 680px) !important;
    max-height: min(58vh, 590px) !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

.quiz-dnd-side-panel {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}

.quiz-dnd-labels-container {
    width: 100%;
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 10px !important;
    margin: 0 !important;
}

#dnd-labels-container .quiz-dnd-label-btn {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px !important;
    border: none !important;
    border-radius: 12px !important;
    background: var(--dnd-label-bg, #2563EB) !important;
    color: #fff !important;
    text-align: left !important;
    font-size: 0.98rem !important;
    line-height: 1.2 !important;
    font-weight: 900 !important;
    cursor: pointer;
    transition: transform .12s, filter .18s, box-shadow .18s !important;
    box-shadow: inset 0 -4px 0 rgba(0,0,0,0.22), 0 5px 12px rgba(0,0,0,0.25) !important;
}

.quiz-dnd-submit {
    width: 100%;
    min-height: 52px;
    padding: 14px 18px;
    background: #94A3B8;
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 900;
    cursor: not-allowed;
    box-shadow: 0 6px 0 #64748B;
    transition: background .18s, box-shadow .18s, transform .12s;
}

@media (min-width: 769px) {
    .quiz-dnd-builder {
        margin-top: -4px;
    }

    .quiz-dnd-side-panel {
        position: sticky;
        top: 16px;
    }
}

@media (max-width: 768px) {
    .quiz-options-grid.quiz-options-dnd {
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .quiz-dnd-builder {
        gap: 9px !important;
    }

    .quiz-dnd-prompt {
        width: 100%;
        padding: 8px 10px !important;
        font-size: 0.86rem !important;
        line-height: 1.22 !important;
    }

    .quiz-dnd-workspace {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    #dnd-student-container.quiz-dnd-map-shell {
        width: fit-content !important;
        max-width: 100% !important;
        padding: 5px !important;
        border-width: 2px !important;
        border-radius: 12px !important;
    }

    .quiz-dnd-image-stage .quiz-dnd-image {
        max-width: 100% !important;
        max-height: min(48svh, 410px) !important;
    }

    .quiz-dnd-side-panel {
        gap: 9px;
    }

    #dnd-labels-container.quiz-dnd-labels-container {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        width: 100%;
    }

    #dnd-labels-container .quiz-dnd-label-btn {
        min-height: 42px !important;
        padding: 9px 10px !important;
        font-size: 0.84rem !important;
        text-align: center !important;
        word-break: normal;
        overflow-wrap: anywhere;
    }

    #quiz-confirm-dnd.quiz-dnd-submit {
        min-height: 46px;
        padding: 12px 14px !important;
        font-size: 0.98rem !important;
        position: sticky;
        bottom: calc(8px + env(safe-area-inset-bottom, 0px));
        z-index: 25;
    }
}

@media (max-width: 390px) {
    .quiz-dnd-image-stage .quiz-dnd-image {
        max-height: min(43svh, 360px) !important;
    }

    #dnd-labels-container .quiz-dnd-label-btn {
        min-height: 40px !important;
        padding: 8px 8px !important;
        font-size: 0.8rem !important;
    }
}

/* Selector de avatar en carrusel horizontal, uno por uno. */
.avatar-modal-panel {
    overflow: hidden;
}

#avatar-grid.avatar-carousel {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 16px !important;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding: 18px;
    padding: 6px 8px 18px;
    margin: 0 -8px 10px !important;
    -webkit-overflow-scrolling: touch;
}

#avatar-grid.avatar-carousel::-webkit-scrollbar {
    height: 8px;
}

#avatar-grid.avatar-carousel::-webkit-scrollbar-thumb {
    background: rgba(148,163,184,.45);
    border-radius: 999px;
}

#avatar-grid.avatar-carousel .avatar-modal-card {
    flex: 0 0 min(86vw, 360px);
    min-height: 336px;
    scroll-snap-align: center;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

#avatar-grid.avatar-carousel .avatar-modal-thumb-wrap {
    width: 100%;
    height: min(64vh, 292px);
    min-height: 250px;
    border-radius: 24px;
}

#avatar-grid.avatar-carousel .avatar-modal-label {
    font-size: 1rem;
}

@media (max-width: 480px) {
    #avatar-modal {
        padding: 14px !important;
    }

    .avatar-modal-panel {
        padding: 24px 16px !important;
        max-width: 100% !important;
    }

    #avatar-grid.avatar-carousel {
        scroll-padding: 12px;
        padding-inline: 6px;
        margin-inline: -6px !important;
    }

    #avatar-grid.avatar-carousel .avatar-modal-card {
        flex-basis: calc(100% - 18px);
        min-height: 328px;
    }
}

/* Modo demo para la muestra: el resto queda visible con candado. */
.subject-mission-card.subject-mission-locked {
    filter: saturate(0.78);
}

.subject-mission-card.subject-mission-locked .mission-play {
    background: rgba(15,23,42,.72) !important;
    border-color: rgba(148,163,184,.35) !important;
}

.explorar-eval-card.explorar-eval-locked {
    position: relative;
    opacity: 0.88;
}

.explorar-eval-card.explorar-eval-locked::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(15,23,42,.08), rgba(15,23,42,.18));
}

.demo-access-badge,
.locked-access-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    vertical-align: middle;
}

.demo-access-badge {
    background: rgba(34,197,94,.16);
    color: #16A34A;
    border: 1px solid rgba(34,197,94,.26);
}

.locked-access-badge {
    background: rgba(15,23,42,.10);
    color: #64748B;
    border: 1px solid rgba(100,116,139,.22);
}

.explorar-btn-study.explorar-btn-locked {
    background: linear-gradient(135deg, #64748B, #334155) !important;
    color: #fff !important;
    box-shadow: 0 10px 20px rgba(15,23,42,.18) !important;
}

.explorar-btn-study.explorar-btn-locked:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(15,23,42,.24) !important;
}

@media (max-width: 600px) {
    .demo-access-badge,
    .locked-access-badge {
        font-size: 0.6rem;
        padding: 3px 7px;
    }
}


/* ═══════════════════════════════════════════════
   AVATAR CUSTOMIZER / RENDERER
   ═══════════════════════════════════════════════ */
.avatar-render {
  position: relative;
  display: inline-flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}
.avatar-render-base {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.avatar-accessory {
  position: absolute;
  pointer-events: none;
  z-index: 3;
}
.avatar-accessory svg {
  width: 100%;
  height: 100%;
  display: block;
}
.avatar-accessory-cap {
  width: 52%;
  left: 24%;
  top: 4%;
}
.avatar-accessory-glasses,
.avatar-accessory-sunglasses {
  width: 42%;
  left: 29%;
  top: 16%;
}
.avatar-accessory-headphones {
  width: 50%;
  left: 25%;
  top: 5%;
}
.avatar-accessory-stethoscope {
  width: 30%;
  left: 35%;
  top: 25%;
}

.user-menu-item {
  width: 100%;
  padding: 11px 14px;
  background: transparent;
  border: none;
  color: var(--text);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 600;
}
.user-menu-item:hover {
  background: rgba(148,163,184,.12);
}
.user-menu-item--danger {
  color: var(--red);
}

.avatar-editor-panel {
  max-height: min(90vh, 760px);
  overflow-y: auto;
}
.avatar-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.avatar-modal-close {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: rgba(148,163,184,.12);
  color: var(--text);
  cursor: pointer;
}
.avatar-preview-card {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 16px;
  align-items: center;
  background: linear-gradient(135deg, rgba(15,23,42,.94), rgba(30,41,59,.88));
  border: 1px solid rgba(96,165,250,.24);
  border-radius: 22px;
  padding: 16px;
  margin-bottom: 18px;
}
.avatar-preview-stage {
  width: 132px;
  height: 132px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 35% 18%, rgba(255,255,255,.28), rgba(255,255,255,0) 34%),
    linear-gradient(160deg, rgba(37,99,235,.96), rgba(15,23,42,.98));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 10px 28px rgba(15,23,42,.28);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-preview-media,
.avatar-preview-media .avatar-render-base {
  width: 100%;
  height: 100%;
}
.avatar-preview-copy strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--text);
}
.avatar-preview-copy span {
  display: block;
  color: var(--text-mid);
  font-size: .84rem;
  line-height: 1.4;
}
.avatar-editor-section {
  margin-bottom: 18px;
}
.avatar-editor-section h3 {
  font-size: .9rem;
  color: var(--text);
  margin-bottom: 10px;
}
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.avatar-modal-card {
  border: 1px solid rgba(148,163,184,.28);
  background: linear-gradient(180deg, rgba(15,23,42,.92), rgba(30,41,59,.86));
  border-radius: 16px;
  padding: 10px;
  text-align: center;
  cursor: default;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.avatar-modal-card:hover,
.avatar-modal-card.selected {
  transform: translateY(-2px);
  border-color: rgba(59,130,246,.45);
  box-shadow: 0 10px 26px rgba(37,99,235,.12);
}
.avatar-modal-thumb-wrap {
  display: flex;
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 18%, rgba(255,255,255,.28), rgba(255,255,255,0) 34%),
    linear-gradient(160deg, var(--avatar-accent, #7c3aed), rgba(15,23,42,.98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 10px 20px rgba(0,0,0,.28);
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.avatar-modal-thumb,
.avatar-modal-thumb .avatar-render-base {
  width: 100%;
  height: 100%;
}
.avatar-modal-label {
  display: block;
  margin-top: 8px;
  font-size: .76rem;
  color: #f8fafc;
  font-weight: 700;
}
.avatar-carousel-hint {
  margin: -4px 0 12px;
  color: var(--text-mid);
  font-size: .82rem;
  line-height: 1.35;
}
.avatar-card-select {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.avatar-card-layout {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 10px;
  align-items: center;
}
.avatar-modal-state {
  display: none;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15,23,42,.62);
  color: rgba(226,232,240,.92);
  font-size: .72rem;
  font-weight: 800;
}
.avatar-card-variants {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-content: center;
}
.avatar-variant-btn {
  border: 1px solid rgba(148,163,184,.34);
  border-radius: 12px;
  padding: 4px;
  width: 64px;
  height: 64px;
  background: rgba(15,23,42,.78);
  color: #f8fafc;
  cursor: pointer;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-variant-btn:hover,
.avatar-variant-btn.selected {
  border-color: rgba(96,165,250,.72);
  background: rgba(248,250,252,.96);
  box-shadow: 0 8px 22px rgba(37,99,235,.22);
}
.avatar-variant-thumb,
.avatar-variant-thumb .avatar-render-base {
  width: 100%;
  height: 100%;
}
.avatar-color-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.avatar-color-chip,
.avatar-accessory-chip {
  border: 1px solid rgba(148,163,184,.28);
  background: rgba(15,23,42,.78);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: #f8fafc;
  font-weight: 700;
}
.avatar-color-chip.selected,
.avatar-accessory-chip.selected {
  border-color: rgba(96,165,250,.64);
  box-shadow: 0 8px 24px rgba(37,99,235,.22);
  background: linear-gradient(135deg, rgba(37,99,235,.84), rgba(14,165,233,.56));
}
.avatar-color-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.75), 0 0 0 1px rgba(15,23,42,.08);
  flex: 0 0 auto;
}
.avatar-accessory-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
#avatar-color-options[hidden],
#avatar-accessory-options[hidden] {
  display: none !important;
}
.avatar-editor-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.avatar-editor-btn {
  flex: 1;
  padding: 14px 16px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-weight: 800;
}
.avatar-editor-btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff;
  box-shadow: 0 12px 24px rgba(37,99,235,.22);
}
.avatar-editor-btn-secondary {
  background: rgba(148,163,184,.12);
  color: var(--text);
}

@media (max-width: 640px) {
  .avatar-preview-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .avatar-preview-stage {
    margin: 0 auto;
  }
  .avatar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Avatar cleanup: transparent figures fitted inside ranking and home circles. */
.rp-ov-circle-1 {
  left: 50% !important;
  top: 14.5% !important;
  width: 33% !important;
  overflow: visible !important;
  z-index: 5;
}

.rp-ov-circle-2 {
  left: 9.5% !important;
  top: 32.8% !important;
  width: 28% !important;
  overflow: visible !important;
  z-index: 4;
}

.rp-ov-circle-3 {
  right: 9.5% !important;
  top: 38.4% !important;
  width: 26.5% !important;
  overflow: visible !important;
  z-index: 4;
}

.rp-ov-info-1 {
  top: 71.8% !important;
  width: 35% !important;
  z-index: 8;
}

.rp-ov-info-2 {
  left: 6.2% !important;
  top: 74.6% !important;
  width: 33.5% !important;
  z-index: 8;
}

.rp-ov-info-3 {
  right: 6.2% !important;
  top: 76.8% !important;
  width: 33.5% !important;
  z-index: 8;
}

.rp-bg-wrap .rp-ov-avatar,
.rp-bg-wrap .rp-ov-avatar.showcase-avatar {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  overflow: hidden !important;
  position: relative;
  z-index: 2;
}

.rp-ov-circle-1 .rp-ov-avatar::after,
.rp-ov-circle-2 .rp-ov-avatar::after,
.rp-ov-circle-3 .rp-ov-avatar::after {
  display: none !important;
}

.rp-ov-avatar .rp-avatar-media,
.rp-ov-avatar .avatar-render,
.rp-ov-avatar .avatar-render-base {
  width: 100% !important;
  height: 100% !important;
  border-radius: 0 !important;
  background: transparent !important;
  object-fit: contain !important;
  object-position: center bottom !important;
  overflow: visible !important;
}

.rp-ov-circle-1 .avatar-render-base { transform: scale(1.18); }
.rp-ov-circle-2 .avatar-render-base,
.rp-ov-circle-3 .avatar-render-base { transform: scale(1.16); }

.rp-ov-crown {
  position: absolute;
  left: 50%;
  top: -14%;
  transform: translateX(-50%);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(22px, 6.6vw, 40px);
  height: clamp(20px, 6vw, 36px);
  border-radius: 999px;
  filter: drop-shadow(0 5px 8px rgba(0,0,0,.55));
  pointer-events: none;
}

.rp-ov-circle-1 .rp-ov-crown {
  top: -28%;
  font-size: clamp(1.2rem, 4.8vw, 2.2rem);
}

.rp-ov-circle-2 .rp-ov-crown,
.rp-ov-circle-3 .rp-ov-crown {
  top: -30%;
  font-size: clamp(.95rem, 3.8vw, 1.55rem);
}

.rp-ov-crown-gold {
  color: #ffd84a;
  text-shadow: 0 0 12px rgba(255,216,74,.85), 0 2px 0 rgba(120,53,15,.8);
}

.rp-ov-crown-silver {
  color: #f8fafc;
  text-shadow: 0 0 10px rgba(226,232,240,.85), 0 2px 0 rgba(51,65,85,.8);
}

.rp-ov-crown-bronze {
  color: #fb923c;
  text-shadow: 0 0 10px rgba(251,146,60,.85), 0 2px 0 rgba(124,45,18,.8);
}

.rp-bg-wrap .rp-ov-name {
  display: block !important;
  width: 100%;
  max-width: 100%;
  min-height: 1.8em;
  padding: .34em .62em;
  border-radius: 999px;
  background: rgba(5,10,28,.74);
  border: 1px solid rgba(255,255,255,.16);
  color: #fff !important;
  font-size: clamp(.58rem, 2.35vw, .84rem);
  line-height: 1.08;
  box-shadow: 0 7px 14px rgba(0,0,0,.35);
}

.rp-bg-wrap .rp-ov-score {
  margin-top: .16rem;
  min-height: 1.6rem;
}

.game-podium-bg-showcase {
  width: 100%;
  max-width: 560px;
  justify-self: center;
  align-self: center;
  margin: 0;
}

.games-app-theme #page-jugar .game-podium-bg-showcase {
  border-radius: 28px;
  box-shadow:
    0 20px 48px rgba(0,0,0,.42),
    0 0 0 1px rgba(255,255,255,.07);
}

.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-circle-1 {
  top: 13.2% !important;
  width: 31.5% !important;
}

.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-circle-2 {
  left: 5.2% !important;
  top: 34.2% !important;
  width: 25.5% !important;
}

.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-circle-3 {
  right: 5.4% !important;
  top: 39.6% !important;
  width: 24.5% !important;
}

.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-info-1 {
  top: 70.8% !important;
  width: 36% !important;
}

.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-info-2 {
  left: 5.2% !important;
  top: 74.2% !important;
  width: 32% !important;
}

.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-info-3 {
  right: 5.2% !important;
  top: 76.5% !important;
  width: 32% !important;
}

@media (max-width: 600px) {
  .games-app-theme #page-jugar .game-app-hero {
    padding-left: 12px;
    padding-right: 12px;
  }

  .games-app-theme #page-jugar .game-podium-bg-showcase {
    width: calc(100% + 8px);
    margin-left: -4px;
    margin-right: -4px;
  }
}

.games-app-theme .topbar-avatar,
.games-app-theme .game-rank-avatar,
.games-app-theme .showcase-avatar,
.games-app-theme #current-avatar-display {
  background: transparent !important;
  border-radius: 50% !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.games-app-theme .topbar-avatar {
  border: 2px solid rgba(255,255,255,.35) !important;
  box-shadow: 0 8px 18px rgba(0,0,0,.22) !important;
}

.games-app-theme .game-rank-avatar {
  border: 1px solid rgba(255,255,255,.32) !important;
  box-shadow: 0 8px 18px rgba(0,0,0,.22) !important;
}

.games-app-theme #current-avatar-display {
  border: 3px solid rgba(255,255,255,.82) !important;
  box-shadow: 0 0 0 7px rgba(56,189,248,.16), 0 16px 34px rgba(0,0,0,.30) !important;
}

.games-app-theme #page-jugar .showcase-avatar {
  border: 3px solid rgba(255,255,255,.72) !important;
  box-shadow: 0 12px 26px rgba(0,0,0,.28), 0 0 0 6px rgba(56,189,248,.10) !important;
}

.games-app-theme #page-jugar .showcase-player-1 .showcase-avatar {
  border-color: rgba(250,204,21,.82) !important;
  box-shadow: 0 16px 30px rgba(0,0,0,.30), 0 0 0 8px rgba(250,204,21,.14) !important;
}

.games-app-theme #page-jugar .showcase-avatar::after {
  display: none !important;
}

.topbar-avatar .avatar-render,
.game-rank-avatar .avatar-render,
.showcase-avatar .avatar-render,
#current-avatar-display .avatar-render,
.topbar-avatar .avatar-render-base,
.game-rank-avatar .avatar-render-base,
.showcase-avatar .avatar-render-base,
#current-avatar-display .avatar-render-base {
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
  object-fit: contain !important;
  object-position: center bottom !important;
}

.topbar-avatar .avatar-render-base,
.game-rank-avatar .avatar-render-base,
#current-avatar-display .avatar-render-base {
  transform: scale(1.14);
}

.showcase-avatar .avatar-render-base {
  transform: scale(1.16);
}

.games-app-theme .rp-bg-wrap .rp-ov-avatar.showcase-avatar {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.rp-bg-wrap .rp-ov-circle-1 .avatar-render-base {
  transform: scale(1.18) !important;
}

.rp-bg-wrap .rp-ov-circle-2 .avatar-render-base,
.rp-bg-wrap .rp-ov-circle-3 .avatar-render-base {
  transform: scale(1.16) !important;
}

/* Resultado demo: arena premium con podio compartido de Ranking. */
.games-app-theme #quiz-result.quiz-result-arena {
  position: relative;
  max-width: min(100%, 690px) !important;
  padding: 18px 12px 42px !important;
  isolation: isolate;
}

.games-app-theme #quiz-result.quiz-result-arena::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(5,3,16,.26), rgba(5,3,16,.66)),
    url('assets/result_arena_bg.png') center center / cover no-repeat,
    radial-gradient(circle at 50% 15%, rgba(250,204,21,.16), transparent 12rem),
    radial-gradient(circle at 12% 38%, rgba(56,189,248,.13), transparent 11rem),
    radial-gradient(circle at 86% 72%, rgba(236,72,153,.13), transparent 12rem),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: auto, cover, auto, auto, auto, 80px 80px, 80px 80px;
}

.games-app-theme .result-home-float {
  top: 12px !important;
  margin-bottom: 22px !important;
}

.games-app-theme .result-home-btn {
  width: min(100%, 560px);
  justify-content: center;
  min-height: 64px;
  border: 1px solid rgba(255,255,255,.18) !important;
  border-radius: 24px !important;
  background: linear-gradient(135deg, #e91e63, #be185d) !important;
  box-shadow: 0 18px 38px rgba(233,30,99,.34), inset 0 1px 0 rgba(255,255,255,.22) !important;
}

/* Trofeo de resultado (estilo Arena, reemplaza emoji genérico) */
.quiz-result-trophy-wrap {
  width: 132px;
  height: 132px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz-result-trophy-ring {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.42),
    inset 0 2px 0 rgba(255, 255, 255, 0.35);
}

.quiz-result-trophy-ring i {
  position: relative;
  z-index: 2;
  font-size: 3.35rem;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.quiz-result-trophy-glow {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
}

.quiz-result-trophy--gold .quiz-result-trophy-ring {
  background: linear-gradient(145deg, #fde047 0%, #f59e0b 42%, #d97706 100%);
  box-shadow:
    0 0 0 8px rgba(250, 204, 21, 0.14),
    0 0 40px rgba(250, 204, 21, 0.35),
    0 22px 52px rgba(0, 0, 0, 0.44),
    inset 0 2px 0 rgba(255, 255, 255, 0.4);
}

.quiz-result-trophy--gold .quiz-result-trophy-ring i {
  color: #fffbeb;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.45);
}

.quiz-result-trophy--gold .quiz-result-trophy-glow {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55) 0%, transparent 68%);
}

.quiz-result-trophy--silver .quiz-result-trophy-ring {
  background: linear-gradient(145deg, #f8fafc 0%, #cbd5e1 48%, #64748b 100%);
  box-shadow:
    0 0 0 8px rgba(148, 163, 184, 0.12),
    0 0 32px rgba(148, 163, 184, 0.28),
    0 22px 52px rgba(0, 0, 0, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.45);
}

.quiz-result-trophy--silver .quiz-result-trophy-ring i {
  color: #f8fafc;
}

.quiz-result-trophy--silver .quiz-result-trophy-glow {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.42) 0%, transparent 70%);
}

.quiz-result-trophy--bronze .quiz-result-trophy-ring {
  background: linear-gradient(145deg, #fdba74 0%, #ea580c 50%, #9a3412 100%);
  box-shadow:
    0 0 0 8px rgba(251, 146, 60, 0.12),
    0 0 28px rgba(234, 88, 12, 0.28),
    0 22px 52px rgba(0, 0, 0, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.28);
}

.quiz-result-trophy--bronze .quiz-result-trophy-ring i {
  color: #fff7ed;
}

.quiz-result-trophy--bronze .quiz-result-trophy-glow {
  background: radial-gradient(circle, rgba(255, 237, 213, 0.45) 0%, transparent 70%);
}

.games-app-theme #quiz-result-emoji.quiz-result-trophy-wrap {
  width: 128px !important;
  height: 128px !important;
  margin-bottom: 18px !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.games-app-theme #quiz-result-title {
  font-size: clamp(2.1rem, 8vw, 3.1rem) !important;
  letter-spacing: 0;
}

.games-app-theme #quiz-result-score {
  font-size: clamp(1.15rem, 4.6vw, 1.55rem) !important;
}

.games-app-theme #quiz-result-detail {
  color: rgba(226,232,240,.74) !important;
  font-weight: 750;
}

.games-app-theme .quiz-result-progress {
  height: 16px !important;
  padding: 3px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(15,23,42,.72) !important;
  box-shadow: inset 0 1px 8px rgba(0,0,0,.42), 0 12px 22px rgba(0,0,0,.20);
}

.games-app-theme .quiz-result-scroll-hint {
  color: rgba(226,232,240,.68) !important;
  font-weight: 800;
}

.games-app-theme #quiz-result-breakdown > div {
  gap: 12px !important;
  margin: 12px 0 26px !important;
}

.games-app-theme #quiz-result-breakdown > div > div {
  width: 52px !important;
  height: 52px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 14px 26px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.42);
}

.games-app-theme #quiz-podium {
  text-align: center !important;
}

.quiz-podium-arena,
.quiz-daily-ranking-list {
  border: 1px solid rgba(255,255,255,.12);
  background:
    radial-gradient(circle at 50% 12%, rgba(250,204,21,.18), transparent 12rem),
    radial-gradient(circle at 50% 72%, rgba(168,85,247,.24), transparent 13rem),
    linear-gradient(180deg, rgba(13,8,30,.92), rgba(6,4,18,.98));
  border-radius: 28px;
  box-shadow: 0 26px 60px rgba(0,0,0,.46), inset 0 1px 0 rgba(255,255,255,.10);
  overflow: hidden;
}

.quiz-podium-arena {
  padding: 18px 12px 16px;
  margin: 0 auto 18px;
}

.quiz-podium-head {
  text-align: center;
  margin-bottom: 12px;
}

.quiz-podium-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(250,204,21,.13);
  border: 1px solid rgba(250,204,21,.24);
  color: #fde047;
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.quiz-podium-head h2 {
  margin: 10px 0 4px;
  color: #fff;
  font-size: clamp(1.55rem, 6vw, 2.25rem);
  font-weight: 950;
  line-height: 1.05;
  text-shadow: 0 8px 24px rgba(0,0,0,.42);
}

.quiz-podium-head h2 i {
  color: #facc15;
  filter: drop-shadow(0 0 12px rgba(250,204,21,.58));
}

.quiz-podium-head p {
  margin: 0;
  color: rgba(226,232,240,.68);
  font-size: .8rem;
  font-weight: 750;
}

.quiz-rp-bg-wrap {
  margin-bottom: 0 !important;
  max-width: 590px !important;
  border-radius: 24px !important;
}

.quiz-daily-ranking-list {
  padding: 18px 14px 16px;
}

.quiz-daily-ranking-list h3 {
  text-align: left;
  margin-bottom: 12px !important;
}

.quiz-daily-ranking-list .total-ranking-table {
  border-collapse: separate;
  border-spacing: 0 10px;
}

.quiz-daily-ranking-list .total-ranking-table tr {
  background: rgba(255,255,255,.07);
  border-radius: 18px;
  box-shadow: 0 12px 26px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.08);
}

.quiz-daily-ranking-list .total-ranking-table td {
  border: 0;
}

.quiz-ranking-empty {
  padding: 20px 14px;
  text-align: center;
  color: rgba(226,232,240,.78);
  font-weight: 800;
}

.quiz-ranking-empty i {
  display: block;
  margin-bottom: 8px;
  color: #facc15;
  font-size: 1.35rem;
}

@media (max-width: 600px) {
  .games-app-theme #quiz-result.quiz-result-arena {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .quiz-podium-arena,
  .quiz-daily-ranking-list {
    border-radius: 22px;
  }

  .quiz-rp-bg-wrap {
    width: calc(100% + 10px);
    margin-left: -5px !important;
    margin-right: -5px !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   MODO DÍA — AlcocerMed Arena (coherente con el skin oscuro)
   ═══════════════════════════════════════════════════════════════ */
[data-theme="light"] .games-app-theme {
  --bg: #eef2ff;
  --bg-card: #ffffff;
  --text: #1e1b4b;
  --text-mid: #475569;
  --text-light: #64748b;
  --border: rgba(99, 102, 241, 0.14);
  --shadow: 0 10px 32px rgba(79, 70, 229, 0.08);
  background:
    radial-gradient(circle at 12% 8%, rgba(167, 139, 250, 0.18), transparent 22rem),
    radial-gradient(circle at 88% 12%, rgba(56, 189, 248, 0.14), transparent 18rem),
    linear-gradient(180deg, #f5f3ff 0%, #eef2ff 42%, #e8eef8 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

[data-theme="light"] .games-app-theme .app-shell,
[data-theme="light"] .games-app-theme .main-content,
[data-theme="light"] .games-app-theme .page,
[data-theme="light"] .games-app-theme #page-jugar {
  background-color: transparent !important;
}

[data-theme="light"] .games-app-theme .app-shell {
  background: transparent;
  min-height: 100vh;
}

[data-theme="light"] .games-app-theme .topbar {
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(99, 102, 241, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.06);
}

[data-theme="light"] .games-app-theme .topbar-logo-text,
[data-theme="light"] .games-app-theme .sb-logo-text,
[data-theme="light"] .games-app-theme .topbar-username {
  color: var(--text);
}

[data-theme="light"] .games-app-theme .topbar-logo-icon,
[data-theme="light"] .games-app-theme .sb-logo-icon {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 46%, #f59e0b 100%);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.28);
}

[data-theme="light"] .games-app-theme .sidebar,
[data-theme="light"] .games-app-theme .bottom-nav {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(99, 102, 241, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 -8px 28px rgba(79, 70, 229, 0.05);
}

[data-theme="light"] .games-app-theme .nav-item,
[data-theme="light"] .games-app-theme .bnav-item {
  color: var(--text-mid);
}

[data-theme="light"] .games-app-theme .nav-item.active,
[data-theme="light"] .games-app-theme .nav-item:hover,
[data-theme="light"] .games-app-theme .bnav-item.active,
[data-theme="light"] .games-app-theme .bnav-item:hover {
  color: #b45309;
}

[data-theme="light"] .games-app-theme .nav-item.active {
  background: rgba(245, 158, 11, 0.12);
  box-shadow: inset 3px 0 0 #f59e0b;
}

[data-theme="light"] .games-app-theme #theme-toggle-btn {
  background: rgba(99, 102, 241, 0.08);
  color: #4f46e5;
}

[data-theme="light"] .games-app-theme #theme-toggle-btn:hover {
  background: rgba(99, 102, 241, 0.14);
  color: #4338ca;
}

[data-theme="light"] .games-app-theme .login-screen {
  background:
    radial-gradient(circle at 50% 18%, rgba(167, 139, 250, 0.35), transparent 22rem),
    radial-gradient(circle at 18% 80%, rgba(56, 189, 248, 0.22), transparent 18rem),
    linear-gradient(180deg, #ede9fe 0%, #e0e7ff 55%, #dbeafe 100%);
}

[data-theme="light"] .games-app-theme .login-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(99, 102, 241, 0.14);
  box-shadow: 0 24px 56px rgba(79, 70, 229, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .games-app-theme .login-header {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-theme="light"] .games-app-theme .login-header-school,
[data-theme="light"] .games-app-theme .login-card h2 {
  color: #0f172a;
}

[data-theme="light"] .games-app-theme .login-header-app,
[data-theme="light"] .games-app-theme .login-footer {
  color: #64748b;
}

[data-theme="light"] .games-app-theme .login-input {
  background: #fff;
  border-color: #e2e8f0;
  color: #0f172a;
}

[data-theme="light"] .games-app-theme .login-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18);
}

[data-theme="light"] .games-app-theme .login-label {
  color: #4338ca;
}

[data-theme="light"] .game-app-hero {
  border: 1px solid rgba(99, 102, 241, 0.14);
  background:
    radial-gradient(circle at 86% 22%, rgba(250, 204, 21, 0.22), transparent 11rem),
    radial-gradient(circle at 18% 12%, rgba(37, 99, 235, 0.12), transparent 13rem),
    linear-gradient(145deg, #ffffff 0%, #f5f3ff 58%, #ede9fe 100%);
  box-shadow: 0 16px 40px rgba(79, 70, 229, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .game-app-kicker {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.28);
}

[data-theme="light"] .game-app-hero h1 {
  color: #1e1b4b;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.8), 0 8px 20px rgba(79, 70, 229, 0.12);
}

[data-theme="light"] .game-app-hero h1 i {
  color: #2563eb;
  filter: drop-shadow(0 0 10px rgba(37, 99, 235, 0.25));
}

[data-theme="light"] .game-app-hero p {
  color: #475569;
}

[data-theme="light"] .game-section-title h2 {
  color: #1e1b4b;
  text-shadow: none;
}

[data-theme="light"] .game-section-title h2 i {
  color: #d97706;
  filter: none;
}

[data-theme="light"] .games-app-theme #page-jugar .game-app-hero {
  background:
    radial-gradient(circle at 78% 40%, rgba(250, 204, 21, 0.16), transparent 16rem),
    radial-gradient(circle at 10% 12%, rgba(56, 189, 248, 0.12), transparent 14rem),
    linear-gradient(145deg, #ffffff 0%, #f5f3ff 62%, #ede9fe 100%);
}

[data-theme="light"] .games-app-theme #page-jugar .game-podium-showcase,
[data-theme="light"] .games-app-theme .game-podium-bg-showcase.rp-bg-wrap {
  border: 1px solid rgba(124, 58, 237, 0.16);
  box-shadow:
    0 16px 40px rgba(79, 70, 229, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .games-app-theme .subject-mission-card {
  background:
    radial-gradient(circle at 18% 26%, color-mix(in srgb, var(--subject-color) 22%, transparent), transparent 7rem),
    linear-gradient(145deg, #ffffff 0%, #f8fafc 100%) !important;
  border: 1px solid color-mix(in srgb, var(--subject-color) 38%, rgba(99, 102, 241, 0.12)) !important;
  box-shadow:
    0 10px 28px rgba(79, 70, 229, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

[data-theme="light"] .games-app-theme .subject-mission-card::before {
  background:
    linear-gradient(120deg, transparent 0 42%, rgba(255, 255, 255, 0.65) 43% 46%, transparent 47%),
    repeating-linear-gradient(135deg, rgba(99, 102, 241, 0.04) 0 1px, transparent 1px 9px);
  opacity: 0.65;
}

[data-theme="light"] .games-app-theme .mission-topline span {
  color: #334155;
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.14);
}

[data-theme="light"] .games-app-theme .mission-copy h3 {
  color: #1e1b4b !important;
  text-shadow: none;
}

[data-theme="light"] .games-app-theme .mission-copy p {
  color: #64748b !important;
}

[data-theme="light"] .games-app-theme .mission-orb span {
  color: #fff;
}

[data-theme="light"] .games-app-theme .mission-progress {
  background: rgba(99, 102, 241, 0.1);
}

[data-theme="light"] .games-app-theme .explorar-subject-card {
  color: var(--text);
  background:
    radial-gradient(circle at 78% 18%, rgba(56, 189, 248, 0.1), transparent 7rem),
    linear-gradient(145deg, #ffffff, #f8fafc) !important;
  border-color: rgba(99, 102, 241, 0.14) !important;
  box-shadow: 0 10px 28px rgba(79, 70, 229, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .games-app-theme .explorar-subject-card h3 {
  color: #1e1b4b !important;
}

[data-theme="light"] .games-app-theme .explorar-subject-card p {
  color: #64748b !important;
}

[data-theme="light"] .games-app-theme .explorar-eval-card,
[data-theme="light"] .games-app-theme .results-list,
[data-theme="light"] .games-app-theme .library-list,
[data-theme="light"] .games-app-theme .reports-list,
[data-theme="light"] .games-app-theme .join-card,
[data-theme="light"] .games-app-theme .join-full-card,
[data-theme="light"] .game-rank-card {
  background: #ffffff;
  border-color: rgba(99, 102, 241, 0.12);
  box-shadow: 0 10px 28px rgba(79, 70, 229, 0.07);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

[data-theme="light"] .games-app-theme .explorar-eval-card h4 {
  color: #1e1b4b !important;
}

[data-theme="light"] .games-app-theme .explorar-filter-chip {
  background: #fff;
  color: var(--text-mid);
  border-color: rgba(99, 102, 241, 0.14);
}

[data-theme="light"] .game-rank-card.rank-gold {
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(90deg, rgba(254, 243, 199, 0.9), #ffffff);
}

[data-theme="light"] .game-rank-card.rank-silver {
  border-color: rgba(148, 163, 184, 0.45);
  background: linear-gradient(90deg, rgba(241, 245, 249, 0.95), #ffffff);
}

[data-theme="light"] .game-rank-card.rank-bronze {
  border-color: rgba(251, 146, 60, 0.4);
  background: linear-gradient(90deg, rgba(255, 237, 213, 0.9), #ffffff);
}

[data-theme="light"] .game-rank-number {
  color: #fff;
  background: linear-gradient(180deg, #6366f1, #4f46e5);
}

[data-theme="light"] .game-rank-name {
  color: #1e1b4b;
}

[data-theme="light"] .game-rank-meta {
  color: #64748b;
}

[data-theme="light"] .game-rank-badge {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.28);
}

[data-theme="light"] .games-app-theme #top-estudiantes-list > div,
[data-theme="light"] .games-app-theme #top-estudiantes-list > div[style] {
  background:
    radial-gradient(circle at 12% 50%, rgba(124, 58, 237, 0.08), transparent 5rem),
    linear-gradient(90deg, #ffffff, #f8fafc) !important;
  border: 1px solid rgba(99, 102, 241, 0.12) !important;
  color: #1e1b4b !important;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

[data-theme="light"] .games-app-theme #top-estudiantes-list > div:nth-child(1) {
  border-color: rgba(245, 158, 11, 0.45) !important;
  background:
    radial-gradient(circle at 10% 50%, rgba(250, 204, 21, 0.14), transparent 5rem),
    linear-gradient(90deg, #fffbeb, #ffffff) !important;
}

[data-theme="light"] .games-app-theme #top-estudiantes-list * {
  color: #1e1b4b !important;
}

[data-theme="light"] .games-app-theme #top-estudiantes-list span[style*="color:#059669"],
[data-theme="light"] .games-app-theme #top-estudiantes-list span[style*="color: #059669"],
[data-theme="light"] .games-app-theme #top-estudiantes-list span[style*="color:#22c55e"],
[data-theme="light"] .games-app-theme #top-estudiantes-list span[style*="color: #22c55e"] {
  color: #059669 !important;
}

[data-theme="light"] .games-app-theme #top-estudiantes-list span[style*="color:#D97706"],
[data-theme="light"] .games-app-theme #top-estudiantes-list span[style*="color: #D97706"] {
  color: #d97706 !important;
}

[data-theme="light"] .games-app-theme .qa-card-blue {
  background: linear-gradient(145deg, #eff6ff, #dbeafe) !important;
  border-color: rgba(37, 99, 235, 0.2) !important;
}

[data-theme="light"] .games-app-theme .qa-card-red {
  background: linear-gradient(145deg, #fef2f2, #fee2e2) !important;
  border-color: rgba(220, 38, 38, 0.18) !important;
}

[data-theme="light"] .games-app-theme .qa-card-yellow {
  background: linear-gradient(145deg, #fffbeb, #fef3c7) !important;
  border-color: rgba(245, 158, 11, 0.22) !important;
}

[data-theme="light"] .games-app-theme .game-ranking-header h3,
[data-theme="light"] .games-app-theme .game-ranking-header p {
  color: var(--text);
}

[data-theme="light"] .games-app-theme .game-ranking-chip {
  background: rgba(99, 102, 241, 0.1);
  color: #4338ca;
  border: 1px solid rgba(99, 102, 241, 0.16);
}

[data-theme="light"] .games-app-theme .empty-state {
  color: var(--text-mid);
}

[data-theme="light"] .games-app-theme .empty-state i {
  color: rgba(99, 102, 241, 0.25);
}

[data-theme="light"] .games-app-theme #explorar-back-btn,
[data-theme="light"] #explorar-back-btn {
  background: #fff !important;
  border-color: rgba(99, 102, 241, 0.14) !important;
  color: var(--text-mid) !important;
}

[data-theme="light"] .games-app-theme .recent-section h2,
[data-theme="light"] .games-app-theme .join-card h2 {
  color: var(--text);
}

[data-theme="light"] .games-app-theme .quiz-podium-head h2 {
  color: #1e1b4b;
  text-shadow: none;
}

[data-theme="light"] .games-app-theme .quiz-podium-head p,
[data-theme="light"] .games-app-theme .quiz-ranking-empty {
  color: #64748b;
}

[data-theme="light"] .games-app-theme .quiz-daily-ranking-list .total-ranking-table tr {
  background: #fff;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .games-app-theme .quiz-daily-ranking-list h3 {
  color: var(--text);
}

[data-theme="light"] .games-app-theme .page-header h1,
[data-theme="light"] .games-app-theme .page-header h2,
[data-theme="light"] .games-app-theme #greeting-text {
  color: #1e1b4b !important;
  text-shadow: none;
}

[data-theme="light"] .games-app-theme .qa-card {
  border: 1px solid rgba(99, 102, 241, 0.12);
  box-shadow: 0 12px 32px rgba(79, 70, 229, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

[data-theme="light"] .games-app-theme .qa-card h3,
[data-theme="light"] .games-app-theme .qa-card p {
  color: var(--text);
}

[data-theme="light"] .games-app-theme .qa-card p {
  color: var(--text-mid);
}

[data-theme="light"] .game-ranking-shell {
  background: linear-gradient(180deg, #ffffff 0%, #f5f3ff 100%);
  border: 1px solid rgba(99, 102, 241, 0.14);
  box-shadow: 0 14px 36px rgba(79, 70, 229, 0.08);
}

[data-theme="light"] .games-app-theme .game-rank-card {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid rgba(99, 102, 241, 0.1);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.06);
}

[data-theme="light"] .game-rank-name {
  color: #1e1b4b !important;
}

[data-theme="light"] .game-rank-meta {
  color: #64748b !important;
}

[data-theme="light"] .game-rank-number-plain {
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
}

[data-theme="light"] .game-rank-arrow {
  color: #94a3b8;
}

[data-theme="light"] .games-app-theme .join-card,
[data-theme="light"] .games-app-theme .recent-section {
  color: var(--text);
}

/* Day mode polish for the main menu: bright arena, not generic white. */
[data-theme="light"] .games-app-theme {
  --bg: #dfe8ff;
  --bg-card: rgba(255, 255, 255, 0.82);
  --text: #172554;
  --text-mid: #475569;
  --text-light: #64748b;
  --border: rgba(37, 99, 235, 0.16);
  --shadow: 0 18px 42px rgba(37, 99, 235, 0.12);
  background:
    radial-gradient(circle at 50% -8%, rgba(255, 255, 255, 0.96), transparent 18rem),
    radial-gradient(circle at 12% 18%, rgba(56, 189, 248, 0.26), transparent 17rem),
    radial-gradient(circle at 88% 26%, rgba(250, 204, 21, 0.24), transparent 14rem),
    linear-gradient(rgba(37, 99, 235, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, #f7fbff 0%, #e8efff 42%, #dbeafe 100%);
  background-size: auto, auto, auto, 34px 34px, 34px 34px, auto;
  background-attachment: fixed;
}

[data-theme="light"] .games-app-theme .app-shell {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.38), rgba(219,234,254,0.18)),
    transparent !important;
}

[data-theme="light"] .games-app-theme .main-content {
  background: transparent !important;
}

[data-theme="light"] .games-app-theme .topbar {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.94), rgba(239,246,255,0.88)) !important;
  border-bottom: 1px solid rgba(37, 99, 235, 0.14) !important;
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.10) !important;
}

[data-theme="light"] .games-app-theme .sidebar,
[data-theme="light"] .games-app-theme .bottom-nav {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(239,246,255,0.90)) !important;
  border-color: rgba(37, 99, 235, 0.14) !important;
  box-shadow: 0 -14px 34px rgba(37, 99, 235, 0.12), inset 0 1px 0 rgba(255,255,255,0.85) !important;
}

[data-theme="light"] .games-app-theme .bnav-item.active,
[data-theme="light"] .games-app-theme .bnav-item:hover,
[data-theme="light"] .games-app-theme .nav-item.active,
[data-theme="light"] .games-app-theme .nav-item:hover {
  color: #1d4ed8 !important;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.13), rgba(14, 165, 233, 0.10)) !important;
}

[data-theme="light"] .games-app-theme .bnav-item[data-page="jugar"].active {
  color: #0f172a !important;
  background: linear-gradient(180deg, rgba(250, 204, 21, 0.42), rgba(59, 130, 246, 0.16)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.76), 0 12px 24px rgba(37, 99, 235, 0.14) !important;
}

[data-theme="light"] .games-app-theme .top-action-btn,
[data-theme="light"] .games-app-theme .user-menu-trigger {
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(37, 99, 235, 0.12);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08);
}

[data-theme="light"] .games-app-theme #page-inicio .page-header {
  margin-bottom: 14px;
}

[data-theme="light"] .games-app-theme #greeting-text {
  color: #172554 !important;
  text-shadow: 0 2px 0 rgba(255,255,255,0.88), 0 14px 26px rgba(37,99,235,0.15) !important;
}

[data-theme="light"] .games-app-theme .qa-card,
[data-theme="light"] .games-app-theme #student-avatar-section > div,
[data-theme="light"] .games-app-theme .join-card,
[data-theme="light"] .games-app-theme .recent-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 16%, rgba(255,255,255,0.94), transparent 7rem),
    radial-gradient(circle at 92% 22%, rgba(59,130,246,0.12), transparent 8rem),
    linear-gradient(145deg, rgba(255,255,255,0.92), rgba(239,246,255,0.72)) !important;
  border: 1px solid rgba(37, 99, 235, 0.15) !important;
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.12), inset 0 1px 0 rgba(255,255,255,0.92) !important;
}

[data-theme="light"] .games-app-theme .qa-card::after,
[data-theme="light"] .games-app-theme .join-card::after,
[data-theme="light"] .games-app-theme #student-avatar-section > div::after {
  content: "";
  position: absolute;
  inset: auto -18% -42% 22%;
  height: 70%;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(124,58,237,0.16), transparent 65%);
  pointer-events: none;
}

[data-theme="light"] .games-app-theme .qa-card h3,
[data-theme="light"] .games-app-theme .join-card h2,
[data-theme="light"] .games-app-theme #student-avatar-section h3 {
  color: #172554 !important;
}

[data-theme="light"] .games-app-theme .qa-card p,
[data-theme="light"] .games-app-theme .join-card p,
[data-theme="light"] .games-app-theme #student-avatar-section p {
  color: #475569 !important;
}

[data-theme="light"] .games-app-theme .qa-icon,
[data-theme="light"] .games-app-theme .join-card-header i {
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.16), inset 0 1px 0 rgba(255,255,255,0.32);
}

[data-theme="light"] .games-app-theme .join-code-input,
[data-theme="light"] .games-app-theme .join-code-full-input {
  background: rgba(255,255,255,0.9) !important;
  border-color: rgba(37, 99, 235, 0.18) !important;
  color: #172554 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

[data-theme="light"] .games-app-theme .game-app-hero {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.70), rgba(255,255,255,0.28)),
    radial-gradient(circle at 78% 40%, rgba(250, 204, 21, 0.24), transparent 16rem),
    radial-gradient(circle at 12% 18%, rgba(56, 189, 248, 0.18), transparent 14rem),
    linear-gradient(145deg, #f8fbff 0%, #eef4ff 58%, #e0e7ff 100%) !important;
}

[data-theme="light"] .games-app-theme .game-app-kicker {
  background: rgba(255, 247, 237, 0.86) !important;
  border-color: rgba(245, 158, 11, 0.32) !important;
  color: #b45309 !important;
}

/* Home/JUGAR podium: keep only the rings baked into the background image. */
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-avatar.showcase-avatar,
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-avatar,
.games-app-theme #page-jugar .game-podium-bg-showcase .showcase-avatar {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}

.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-avatar.showcase-avatar::before,
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-avatar.showcase-avatar::after,
.games-app-theme #page-jugar .game-podium-bg-showcase .showcase-avatar::before,
.games-app-theme #page-jugar .game-podium-bg-showcase .showcase-avatar::after {
  display: none !important;
  content: none !important;
}

.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-avatar .rp-avatar-media,
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-avatar .avatar-render,
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-avatar .avatar-render-base {
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  object-fit: contain !important;
  object-position: center bottom !important;
  overflow: visible !important;
}

.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-circle-1 .avatar-render-base {
  transform: scale(1.18) translateY(10%) !important;
}

.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-circle-2 .avatar-render-base,
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-circle-3 .avatar-render-base {
  transform: scale(1.16) translateY(2%) !important;
}

/* Quiz result podium: reuse ranking art, but place figures on the stage. */
.games-app-theme .quiz-rp-bg-wrap {
  max-width: 560px !important;
  background-image: url('assets/podio_bg_clean.png') !important;
}

.games-app-theme .quiz-rp-bg-wrap .rp-ov-circle-1,
.games-app-theme .quiz-rp-bg-wrap .rp-ov-circle-2,
.games-app-theme .quiz-rp-bg-wrap .rp-ov-circle-3 {
  aspect-ratio: auto !important;
  border-radius: 0 !important;
  overflow: visible !important;
  align-items: center !important;
  justify-content: flex-end !important;
}

.games-app-theme .quiz-rp-bg-wrap .rp-ov-circle-1 {
  left: 50% !important;
  top: 25.8% !important;
  width: 25.5% !important;
  height: 26.5% !important;
  transform: translateX(-50%) !important;
  z-index: 6 !important;
}

.games-app-theme .quiz-rp-bg-wrap .rp-ov-circle-2 {
  left: 14.7% !important;
  top: 40.4% !important;
  width: 20.5% !important;
  height: 20.2% !important;
  z-index: 5 !important;
}

.games-app-theme .quiz-rp-bg-wrap .rp-ov-circle-3 {
  right: 15.5% !important;
  top: 43.2% !important;
  width: 19.5% !important;
  height: 19.6% !important;
  z-index: 5 !important;
}

.games-app-theme .quiz-rp-bg-wrap .rp-ov-avatar,
.games-app-theme .quiz-rp-bg-wrap .rp-ov-avatar.showcase-avatar {
  width: 100% !important;
  height: 100% !important;
  border-radius: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 12px 12px rgba(0,0,0,0.42));
}

.games-app-theme .quiz-rp-bg-wrap .rp-ov-avatar .rp-avatar-media,
.games-app-theme .quiz-rp-bg-wrap .rp-ov-avatar .avatar-render,
.games-app-theme .quiz-rp-bg-wrap .rp-ov-avatar .avatar-render-base {
  width: 100% !important;
  height: 100% !important;
  border-radius: 0 !important;
  object-fit: contain !important;
  object-position: center bottom !important;
  overflow: visible !important;
  background: transparent !important;
}

.games-app-theme .quiz-rp-bg-wrap .rp-ov-circle-1 .avatar-render-base {
  transform: scale(1.44) translateY(-3%) !important;
}

.games-app-theme .quiz-rp-bg-wrap .rp-ov-circle-2 .avatar-render-base {
  transform: scale(1.40) translateY(-8%) !important;
}

.games-app-theme .quiz-rp-bg-wrap .rp-ov-circle-3 .avatar-render-base {
  transform: scale(1.40) translateY(1%) !important;
}

.games-app-theme .quiz-rp-bg-wrap .rp-ov-crown {
  top: -55% !important;
}

.games-app-theme .quiz-rp-bg-wrap .rp-ov-circle-1 .rp-ov-crown {
  top: -47% !important;
  left: 47% !important;
}

.games-app-theme .quiz-rp-bg-wrap .rp-ov-circle-2 .rp-ov-crown {
  top: -64% !important;
}

.games-app-theme .quiz-rp-bg-wrap .rp-ov-info-1 {
  top: 71.8% !important;
  width: 35% !important;
}

.games-app-theme .quiz-rp-bg-wrap .rp-ov-info-2 {
  left: 6.2% !important;
  top: 74.6% !important;
  width: 33.5% !important;
}

.games-app-theme .quiz-rp-bg-wrap .rp-ov-info-3 {
  right: 6.2% !important;
  top: 76.8% !important;
  width: 33.5% !important;
}

.games-app-theme .quiz-rp-bg-wrap .rp-ov-name {
  background: rgba(5,10,28,.76) !important;
  border-color: rgba(255,255,255,.16) !important;
  color: #fff !important;
}

[data-theme="light"] .games-app-theme .quiz-podium-arena .quiz-podium-head h2,
[data-theme="light"] .games-app-theme .quiz-podium-arena .quiz-podium-head h2 i,
[data-theme="light"] .games-app-theme .quiz-daily-ranking-list h3 {
  color: #fff !important;
  text-shadow: 0 8px 22px rgba(0,0,0,0.42) !important;
}

[data-theme="light"] .games-app-theme .quiz-podium-arena .quiz-podium-head p {
  color: rgba(226,232,240,0.78) !important;
}

[data-theme="light"] .games-app-theme .quiz-podium-arena .quiz-podium-chip {
  background: rgba(250,204,21,.16) !important;
  border-color: rgba(250,204,21,.28) !important;
  color: #fde047 !important;
}

@media (max-width: 600px) {
  .games-app-theme .quiz-rp-bg-wrap .rp-ov-circle-1 {
    top: 26.8% !important;
    width: 25.8% !important;
    height: 25.6% !important;
  }

  .games-app-theme .quiz-rp-bg-wrap .rp-ov-circle-2 {
    top: 41.6% !important;
    width: 20.8% !important;
    height: 19.2% !important;
  }

  .games-app-theme .quiz-rp-bg-wrap .rp-ov-circle-3 {
    top: 44.2% !important;
    width: 19.8% !important;
    height: 18.8% !important;
  }
}

/* Relacionar en el motor de tarjetas existente. */
.quiz-matching{grid-column:1/-1;min-width:0;width:100%}.quiz-match-row{display:grid;gap:10px;margin:14px 0;padding:14px;border:1px solid #94a3b8;border-radius:14px;text-align:left}.quiz-match-row span{font-weight:700}.quiz-match-select{width:100%;min-width:0;max-width:100%;padding:12px 8px;font:inherit;font-size:16px;border:2px solid #94a3b8;border-radius:10px;color:#172033;background:#fff}.quiz-match-row small{display:block}#night-login-toggle{width:100%;margin-bottom:12px}#night-login-note{font-size:.9rem;line-height:1.5;margin:12px 0}#night-login-note[hidden],#night-login-toggle[hidden]{display:none}

/* The student chooses one of three subjects before seeing access options. */
.games-app-theme #page-jugar .explorar-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.games-app-theme #page-jugar button.subject-mission-card {
  width: 100%;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding-bottom: 20px;
}
.games-app-theme #page-jugar button.subject-mission-card:focus-visible,
.subject-game-list-heading button:focus-visible,
.explorar-eval-card button:focus-visible,
.explorar-eval-card a:focus-visible {
  outline: 3px solid #fbbf24;
  outline-offset: 3px;
}
.subject-game-list-heading {
  margin: 4px 0 18px;
  padding: 18px 22px;
  border: 1px solid rgba(148,163,184,.25);
  border-radius: 18px;
  background: linear-gradient(115deg, rgba(37,99,235,.16), rgba(15,23,42,.48));
}
.subject-game-list-heading span { color: #fbbf24; font-size: .76rem; font-weight: 900; letter-spacing: .1em; }
.subject-game-list-heading p { margin: 7px 0 0; color: var(--text-mid); line-height: 1.45; }

/* The overlay follows the three rings and nameplates baked into the square art. */
.games-app-theme #page-jugar .game-podium-bg-showcase { container-type: inline-size; }
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-crown { display: none !important; }
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-circle-1 { left: 50% !important; top: 16% !important; width: 30% !important; height: 30% !important; }
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-circle-2 { left: 14.5% !important; top: 34.5% !important; width: 19.3% !important; height: 19.3% !important; }
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-circle-3 { left: 66.8% !important; right: auto !important; top: 41.8% !important; width: 18.3% !important; height: 18.3% !important; }
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-circle-1,
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-circle-2,
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-circle-3 { overflow: hidden !important; border-radius: 50%; }
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-avatar { overflow: hidden !important; }
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-circle-1 .avatar-render-base { transform: scale(1.5) !important; }
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-circle-2 .avatar-render-base,
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-circle-3 .avatar-render-base { transform: scale(1.38) !important; }
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-info-1 { left: 39.5% !important; top: 75.3% !important; width: 21% !important; height: 6.3% !important; transform: none !important; }
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-info-2 { left: 14% !important; top: 75.3% !important; width: 21% !important; height: 6.3% !important; }
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-info-3 { left: 65.2% !important; right: auto !important; top: 77.9% !important; width: 21% !important; height: 5.3% !important; }
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-name {
  min-height: 0; padding: 0 3px; border: 0; border-radius: 0; background: none;
  box-shadow: none; font-size: clamp(7px, 2.1cqw, 11px); line-height: 1.15;
}
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-score { flex-direction: row; gap: 3px; justify-content: center; min-height: 0; margin: 0; white-space: nowrap; }
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-score span { font-size: clamp(6px, 1.7cqw, 9px); line-height: 1; }

/* Give the runners-up the same full-figure treatment as first place. */
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-circle-2 {
  left: 12.2% !important;
  top: 32% !important;
  width: 24% !important;
  height: 24% !important;
}
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-circle-3 {
  left: 65.3% !important;
  top: 37% !important;
  width: 23% !important;
  height: 23% !important;
}
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-circle-2,
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-circle-3,
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-circle-2 .rp-ov-avatar,
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-circle-3 .rp-ov-avatar,
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-circle-2 .avatar-render,
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-circle-3 .avatar-render {
  overflow: visible !important;
}
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-circle-2 .avatar-render-base,
.games-app-theme #page-jugar .game-podium-bg-showcase .rp-ov-circle-3 .avatar-render-base {
  transform: scale(1.08) translateY(5%) !important;
}

@media (max-width: 768px) {
  .games-app-theme #page-jugar .explorar-grid { display: grid; grid-template-columns: 1fr; }
}

/* Rondas de práctica por tema. */
.game-round-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.game-round-play{display:flex;align-items:center;gap:10px;justify-content:center;min-width:135px;padding:12px 20px!important;border-radius:16px!important;font-weight:800!important;line-height:1.2}
.game-round-play small{display:block;font-size:.65rem;letter-spacing:.04em;margin-top:4px;opacity:.88}
.quiz-round-label{width:max-content;margin:0 auto 14px;padding:7px 17px;border-radius:999px;background:rgba(250,204,21,.12);border:1px solid rgba(250,204,21,.35);color:var(--text);font-size:.9rem;font-weight:800}
.quiz-round-label[hidden]{display:none}
@media(max-width:600px){.game-round-actions{width:100%;justify-content:stretch}.game-round-play{flex:1;min-width:110px}}

/* Topic filter: compact Arena toolbar with a clear subject and a quiet search field. */
.game-topic-filter{display:flex;align-items:center;justify-content:space-between;gap:28px;padding:22px 24px;margin:0 0 22px;border:1px solid var(--border);border-radius:20px;background:var(--bg-card);box-shadow:0 8px 24px rgba(0,0,0,.06)}
.game-filter-intro{display:flex;align-items:center;gap:15px;min-width:0}
.game-filter-emblem{display:grid;place-items:center;flex:0 0 48px;width:48px;height:48px;border:1px solid rgba(250,204,21,.2);border-radius:15px;background:linear-gradient(145deg,rgba(250,204,21,.14),rgba(250,204,21,.04));color:#eab308;font-size:1.2rem}
.game-filter-copy{min-width:0}
.game-filter-eyebrow{display:block;margin-bottom:5px;color:var(--text-mid);font-size:.61rem;font-weight:800;letter-spacing:.11em}
.game-filter-copy label{display:block;font-size:1.12rem;font-weight:800;letter-spacing:-.02em;line-height:1.3;color:var(--text);cursor:text}
.game-filter-copy p{margin:5px 0 0;color:var(--text-mid);font-size:.76rem;line-height:1.5}
.game-search-field{display:flex;align-items:center;gap:12px;flex:0 1 460px;min-width:220px;padding:0 17px;min-height:52px;border:1px solid var(--border);border-radius:14px;background:var(--bg-main,var(--bg));transition:border-color .18s,box-shadow .18s}
.game-search-field:focus-within{border-color:rgba(234,179,8,.65);box-shadow:0 0 0 3px rgba(234,179,8,.08)}
.game-search-field>svg{flex-shrink:0;color:var(--text-mid);font-size:.95rem;transition:color .18s}
.game-search-field:focus-within>svg{color:#eab308}
.game-search-field input{flex:1;min-width:0;border:0;outline:0;background:transparent;color:var(--text);font:inherit;font-size:.9rem;padding:15px 0}
.game-search-field input::placeholder{color:var(--text-mid);opacity:.8}
.game-search-field input::-webkit-search-cancel-button{display:none}
.game-search-field button{display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--text-mid);cursor:pointer;transition:background .18s,color .18s}
.game-search-field button:hover{background:rgba(148,163,184,.12);color:var(--text)}
.game-search-field button:focus-visible{outline:2px solid #eab308;outline-offset:2px}
.game-search-field button[hidden]{display:none}
@media(max-width:760px){.game-topic-filter{align-items:stretch;flex-direction:column;gap:17px;padding:18px;border-radius:18px}.game-search-field{flex:auto;min-width:0;min-height:50px}.game-filter-emblem{flex-basis:43px;width:43px;height:43px;border-radius:13px}.game-filter-copy label{font-size:1.03rem}.game-filter-copy p{font-size:.74rem}}

/* Keep the leaders accessible in both the podium and the complete ranking. */
#quiz-podium-showcase{scroll-margin-top:80px}
.quiz-podium-head .quiz-ranking-order{margin-top:8px;font-size:.75rem;color:#cbd5e1}
.quiz-ranking-notice{padding:12px 16px;border:1px solid rgba(250,204,21,.35);border-radius:12px;background:rgba(250,204,21,.08);color:var(--text);line-height:1.5}
.quiz-daily-ranking-list .podium-table-top-1{box-shadow:inset 3px 0 #facc15,0 8px 22px rgba(0,0,0,.18)}
.quiz-daily-ranking-list .podium-table-top-2{box-shadow:inset 3px 0 #cbd5e1,0 8px 22px rgba(0,0,0,.18)}
.quiz-daily-ranking-list .podium-table-top-3{box-shadow:inset 3px 0 #fb923c,0 8px 22px rgba(0,0,0,.18)}
.tr-rank-circle.tr-top-1{background:rgba(250,204,21,.18);border:1px solid #facc15;color:#fde047}
.tr-rank-circle.tr-top-2{background:rgba(203,213,225,.15);border:1px solid #cbd5e1;color:#e2e8f0}
.tr-rank-circle.tr-top-3{background:rgba(251,146,60,.15);border:1px solid #fb923c;color:#fdba74}
.total-ranking-table .player-score{white-space:nowrap;font-variant-numeric:tabular-nums}
.total-ranking-table .player-name{overflow-wrap:anywhere}
@media(max-width:600px){.quiz-daily-ranking-list{padding:14px 8px}.quiz-daily-ranking-list .total-ranking-table td{padding-left:6px;padding-right:6px}.quiz-daily-ranking-list .player-score{font-size:1rem}.quiz-daily-ranking-list .player-score span{font-size:.65rem}.quiz-daily-ranking-list .player-name{font-size:.8rem}.quiz-daily-ranking-list .podium-mini-avatar{flex-shrink:0}}

@media(max-width:600px){
 #quiz-podium .total-ranking-table,#quiz-podium .total-ranking-table tbody{display:block;width:100%}
 #quiz-podium .total-ranking-table tr{display:grid;grid-template-columns:30px minmax(0,1fr)85px;column-gap:8px;align-items:center;padding:12px 8px;margin-bottom:10px}
 #quiz-podium .total-ranking-table td{width:auto!important;padding:0!important;min-width:0}
 #quiz-podium .total-ranking-table td:nth-child(1){grid-column:1;grid-row:1 / 3}
 #quiz-podium .total-ranking-table td:nth-child(2){grid-column:2;grid-row:1 / 3}
 #quiz-podium .total-ranking-table td:nth-child(2)>div{gap:8px!important}
 #quiz-podium .total-ranking-table td:nth-child(3){grid-column:3;grid-row:1}
 #quiz-podium .total-ranking-table td:nth-child(4){grid-column:3;grid-row:2;justify-self:end;margin-top:4px}
 #quiz-podium .tr-rank-circle{width:28px;height:28px;font-size:.8rem}
 #quiz-podium .podium-mini-avatar{width:30px;height:36px}
 #quiz-podium .player-pct{font-size:.75rem;padding:3px 8px}
}
.quiz-result-top-link{display:inline-flex;align-items:center;gap:8px;justify-content:center;margin:4px auto 18px;padding:11px 18px;border:1px solid rgba(250,204,21,.4);border-radius:999px;background:rgba(250,204,21,.12);color:#fde047;font:800 .9rem Inter,sans-serif;cursor:pointer}
.quiz-result-top-link[hidden]{display:none}
