
:root{
  --bg:#f5fbff;
  --card:#ffffff;
  --text:#172554;
  --muted:#5b6b8a;
  --primary:#2563eb;
  --primary2:#7c3aed;
  --accent:#f59e0b;
  --pink:#ec4899;
  --green:#16a34a;
  --danger:#dc2626;
  --border:#d9e8ff;
  --shadow:0 22px 45px rgba(37,99,235,.12);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:"Noto Sans Sinhala","Inter",Arial,sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(251,191,36,.16), transparent 22%),
    radial-gradient(circle at 90% 8%, rgba(236,72,153,.14), transparent 20%),
    radial-gradient(circle at 15% 85%, rgba(34,197,94,.12), transparent 22%),
    linear-gradient(180deg,#eff8ff 0%,#f9fbff 100%);
  color:var(--text);
}
a{text-decoration:none}
.page-bg{
  position:fixed;inset:0;pointer-events:none;
  background:
    radial-gradient(circle at top left,rgba(37,99,235,.10),transparent 28%),
    radial-gradient(circle at top right,rgba(124,58,237,.10),transparent 22%),
    linear-gradient(transparent 0 96%, rgba(59,130,246,.05) 96% 100%);
}
.container{max-width:1200px;margin:0 auto;padding:0 20px}
.topbar{
  position:sticky;top:0;z-index:50;padding:14px 0;
  background:rgba(255,255,255,.78);backdrop-filter:blur(16px);
  border-bottom:1px solid rgba(217,232,255,.95)
}
.nav-shell{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}
.nav-actions{display:contents}
.brand{display:flex;align-items:center;gap:14px;color:var(--text)}
.brand strong{display:block;font-size:19px}
.brand small{display:block;color:var(--muted);font-size:12px}
.brand-badge{
  width:48px;height:48px;border-radius:16px;
  background:linear-gradient(135deg,var(--primary),var(--pink),var(--accent));
  display:grid;place-items:center;color:#fff;font-weight:900;font-size:22px;
  box-shadow:0 18px 30px rgba(124,58,237,.20)
}
.nav-links{display:flex;align-items:center;justify-content:center;gap:8px 10px;flex-wrap:wrap;flex:1 1 100%;width:100%;order:3;margin-top:10px}
.nav-links a{
  color:#29406d;padding:9px 12px;border-radius:14px;font-weight:700;font-size:14px;white-space:nowrap;
  transition:.2s ease;
}
.nav-links a:hover{background:#eef5ff;transform:translateY(-1px)}
.nav-links .nav-pill{
  background:linear-gradient(135deg,var(--primary),var(--primary2));
  color:#fff;box-shadow:0 10px 20px rgba(99,102,241,.18)
}

.profile-corner{
  display:inline-flex;align-items:center;gap:12px;padding:8px 10px 8px 14px;
  border-radius:999px;background:rgba(255,255,255,.92);border:1px solid #dbeafe;
  box-shadow:0 12px 24px rgba(37,99,235,.10);color:#1e3a8a;max-width:240px;order:2;flex-shrink:0
}
.profile-corner:hover{transform:translateY(-1px);background:#fff}
.profile-corner-text{display:flex;flex-direction:column;line-height:1.1;min-width:0}
.profile-corner-text strong{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:130px}
.profile-corner-text small{font-size:11px;color:#64748b}
.profile-corner-avatar{
  width:44px;height:44px;border-radius:999px;object-fit:cover;flex-shrink:0;
  border:3px solid #eef2ff;box-shadow:0 8px 18px rgba(124,58,237,.16)
}
.profile-corner-fallback{
  display:grid;place-items:center;background:linear-gradient(135deg,var(--primary),var(--primary2));
  color:#fff;font-weight:800
}
.profile-menu{position:relative;order:2;flex-shrink:0}
.profile-menu summary{list-style:none;cursor:pointer}
.profile-menu summary::-webkit-details-marker{display:none}
.profile-menu[open] .profile-corner{background:#fff;box-shadow:0 16px 30px rgba(37,99,235,.16)}
.profile-dropdown{
  position:absolute;top:calc(100% + 10px);right:0;min-width:240px;padding:12px;
  background:#fff;border:1px solid #dbeafe;border-radius:20px;
  box-shadow:0 22px 40px rgba(15,23,42,.16);z-index:60
}
.profile-dropdown:before{
  content:'';position:absolute;top:-8px;right:22px;width:16px;height:16px;
  background:#fff;border-left:1px solid #dbeafe;border-top:1px solid #dbeafe;transform:rotate(45deg)
}
.profile-dropdown-head{display:flex;align-items:center;gap:12px;padding:6px 6px 12px;border-bottom:1px solid #eaf2ff}
.profile-dropdown-head strong{display:block;font-size:14px;color:#1e3a8a}
.profile-dropdown-head small{display:block;font-size:12px;color:#64748b;margin-top:2px}
.profile-dropdown-avatar{
  width:44px;height:44px;border-radius:999px;object-fit:cover;display:grid;place-items:center;
  border:3px solid #eef2ff;box-shadow:0 8px 18px rgba(124,58,237,.12);flex-shrink:0
}
.profile-dropdown-links{display:grid;gap:6px;padding-top:10px}
.profile-dropdown-links a{
  display:flex;align-items:center;padding:10px 12px;border-radius:12px;
  color:#1e3a8a;font-weight:700;font-size:14px;transition:.18s ease
}
.profile-dropdown-links a:hover{background:#eef5ff}
.profile-dropdown-links .danger-link{color:#dc2626;background:#fff5f5}
.profile-dropdown-links .danger-link:hover{background:#fee2e2}
.main-shell{padding:28px 20px 40px}
.hero{display:grid;grid-template-columns:1.2fr .8fr;gap:22px;margin-bottom:22px}
.hero-card{padding:34px}
.hero h1{font-size:clamp(31px,4vw,50px);margin:0 0 12px;line-height:1.18}
.hero p{font-size:16px;color:var(--muted);line-height:1.8}
.hero-badges{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}
.chip{
  background:linear-gradient(135deg,#eaf2ff,#fff6db);
  color:#334155;padding:9px 13px;border-radius:999px;
  font-weight:800;font-size:13px;border:1px solid #dbeafe
}
.card,.question{
  background:rgba(255,255,255,.94);
  border:1px solid rgba(217,232,255,.98);
  border-radius:24px;padding:22px;box-shadow:var(--shadow);margin-bottom:20px
}
.glass{
  background:
    linear-gradient(180deg,rgba(255,255,255,.97),rgba(255,255,255,.90)),
    linear-gradient(135deg,rgba(251,191,36,.06),rgba(236,72,153,.05))
}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.stat-card{position:relative;overflow:hidden}
.stat-card:after{
  content:'';position:absolute;right:-25px;top:-25px;width:120px;height:120px;
  background:radial-gradient(circle,rgba(124,58,237,.10),transparent 62%)
}
.stats{font-size:34px;font-weight:900;margin-top:8px}
.muted{color:var(--muted)}
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  background:linear-gradient(135deg,var(--primary),var(--primary2));
  color:#fff;padding:12px 18px;border:none;border-radius:15px;text-decoration:none;
  cursor:pointer;font-weight:800;box-shadow:0 12px 22px rgba(99,102,241,.18)
}
.btn:hover{transform:translateY(-1px)}
.btn.secondary{
  background:#fff;color:#1e3a8a;border:1px solid #bfdbfe;box-shadow:none
}
.btn.danger{background:linear-gradient(135deg,#ef4444,#dc2626)}
.table-wrap{overflow:auto}
.table{width:100%;border-collapse:collapse;background:transparent}
.table th,.table td{
  padding:14px 12px;border-bottom:1px solid #e8eef7;text-align:left;vertical-align:top
}
.table th{
  font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:#64748b;
  background:linear-gradient(180deg,#f8fbff,#fdfdff)
}
.table tr:hover td{background:#fbfdff}
.form-group{margin-bottom:16px}
.form-control{
  width:100%;padding:13px 14px;border:1px solid #cbd5e1;border-radius:15px;
  outline:none;font-size:15px;background:#fff
}
.form-control:focus{
  border-color:#60a5fa;box-shadow:0 0 0 4px rgba(96,165,250,.16)
}
textarea.form-control{min-height:120px;resize:vertical}
.alert{padding:14px 16px;border-radius:16px;margin:0 0 16px;border:1px solid}
.alert.success{background:#f0fdf4;border-color:#bbf7d0;color:#166534}
.alert.error{background:#fef2f2;border-color:#fecaca;color:#991b1b}
.question h3{margin-top:0;line-height:1.6}
.option-row label{
  display:flex;align-items:flex-start;gap:12px;padding:12px 14px;border:1px solid #dbe5f4;
  border-radius:16px;margin:10px 0;background:#fff;cursor:pointer
}
.option-row label:hover{border-color:#93c5fd;background:#f8fbff}
.timer{
  font-size:24px;font-weight:900;color:var(--danger);background:#fff1f2;
  border:1px solid #fecdd3;padding:12px 16px;border-radius:16px
}
.row{display:flex;gap:14px;flex-wrap:wrap}
.w-50{width:calc(50% - 7px)} .w-33{width:calc(33.333% - 10px)}
.auth-card h2,.card h2{margin-top:0}
.footer-inner{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}
.site-footer{padding:20px 0 36px;color:#64748b}
.footer-inner p{margin:6px 0 0}
.footer-links{display:flex;gap:12px;flex-wrap:wrap}
.footer-links a{color:#475569}
.kpi{
  display:inline-flex;align-items:center;gap:8px;color:#6d28d9;font-weight:800;font-size:13px;
  background:linear-gradient(135deg,#f5edff,#fff7db);border-radius:999px;padding:8px 11px;
  border:1px solid #e9d5ff
}
.center-empty{text-align:center;padding:30px;color:#64748b}
.subject-pill{
  display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;
  background:#eefbf3;color:#166534;font-weight:800;font-size:12px
}
.notice-banner{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  background:linear-gradient(135deg,#dbeafe,#fdf4ff,#fef3c7);
  border:1px solid #dbeafe;border-radius:22px;padding:16px 18px;margin-bottom:18px
}
.notice-banner strong{font-size:15px}
.color-strip{
  height:8px;border-radius:999px;
  background:linear-gradient(90deg,var(--primary),var(--pink),var(--accent),#22c55e)
}
@media(max-width:1024px){
  .profile-corner-text strong{max-width:90px}
}
@media(max-width:860px){
  .hero{grid-template-columns:1fr}
  .nav-shell,.footer-inner{flex-direction:column;align-items:flex-start}
  .nav-links{justify-content:flex-start}
  .profile-menu{align-self:flex-end}
  .profile-dropdown{right:0;left:auto}
  .profile-corner{align-self:flex-end;max-width:100%;order:0}
  .w-50,.w-33{width:100%}
}

.notice-banner{background:linear-gradient(135deg,#fff7ed,#ffedd5);border:1px solid #fdba74;padding:18px 20px;border-radius:20px;margin-bottom:18px}
.gamify-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px;margin-bottom:18px}
.badge-list{display:flex;flex-wrap:wrap;gap:12px}
.badge-card{background:linear-gradient(135deg,#fef3c7,#fde68a);border:1px solid #fbbf24;border-radius:18px;padding:14px 16px;min-width:180px}
.badge-card strong{display:block;margin-bottom:4px}
.level-pill{display:inline-flex;align-items:center;gap:8px;background:linear-gradient(135deg,#ecfeff,#cffafe);border:1px solid #67e8f9;color:#155e75;padding:8px 12px;border-radius:999px;font-weight:700}
.medal{font-size:22px}

canvas{max-width:100%;background:#fff;border-radius:16px;padding:10px}

.badge-popup-wrap{display:flex;flex-direction:column;gap:10px;margin-bottom:16px}
.badge-popup{background:linear-gradient(135deg,#fef3c7,#fde68a);border:1px solid #f59e0b;color:#78350f;padding:14px 16px;border-radius:18px;font-weight:800;box-shadow:0 10px 20px rgba(245,158,11,.15);animation:popupfade .5s ease}
.xp-card{background:linear-gradient(135deg,#eff6ff,#dbeafe);border:1px solid #93c5fd;border-radius:18px;padding:16px}
.progress-track{width:100%;height:14px;background:#e5e7eb;border-radius:999px;overflow:hidden;margin-top:8px}
.progress-fill{height:100%;background:linear-gradient(90deg,#22c55e,#3b82f6);border-radius:999px}
.parent-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
@keyframes popupfade{from{transform:translateY(-8px);opacity:0}to{transform:translateY(0);opacity:1}}


.toggle-row{display:flex;gap:16px;align-items:center;flex-wrap:wrap}
.pill-radio{display:inline-flex;align-items:center;gap:8px;padding:12px 16px;border:1px solid #cbd5e1;border-radius:999px;background:#fff;cursor:pointer;font-weight:700}
.pill-radio input{margin:0}
.premium-box{background:#fff7ed;border:1px solid #fdba74;border-radius:16px;padding:16px;margin-top:12px}
.lock-tag{display:inline-block;padding:6px 10px;border-radius:999px;background:#fef3c7;color:#92400e;font-weight:700}
.free-tag{display:inline-block;padding:6px 10px;border-radius:999px;background:#dcfce7;color:#166534;font-weight:700}
.hidden{display:none}


.login-shell{display:grid;grid-template-columns:1.1fr .9fr;gap:22px;align-items:stretch}
.illustration-card{position:relative;overflow:hidden;min-height:560px;background:linear-gradient(135deg,#fef3c7 0%,#dbeafe 45%,#fde68a 100%)}
.illustration-wrap{position:relative;height:100%;display:flex;flex-direction:column;justify-content:space-between;padding:28px}
.hero-title{font-size:clamp(28px,4vw,44px);line-height:1.15;margin:8px 0 10px}
.hero-copy{color:#475569;line-height:1.7;font-size:16px;max-width:560px}
.mascot-scene{position:relative;display:flex;justify-content:center;align-items:flex-end;min-height:300px;padding-top:20px}
.blob{position:absolute;border-radius:999px;filter:blur(0.5px);opacity:.9}
.blob.one{width:180px;height:180px;background:#bfdbfe;left:15%;top:5%}
.blob.two{width:120px;height:120px;background:#fde68a;right:12%;top:12%}
.blob.three{width:160px;height:160px;background:#fecaca;right:20%;bottom:8%}
.student-figure{position:relative;width:220px;height:250px}
.face{position:absolute;top:38px;left:86px;width:58px;height:58px;background:#fde68a;border-radius:999px;border:3px solid #334155;z-index:4}
.hair{position:absolute;top:28px;left:80px;width:70px;height:38px;background:#1e293b;border-radius:40px 40px 22px 22px;z-index:5}
.body{position:absolute;top:92px;left:58px;width:118px;height:95px;background:#2563eb;border:3px solid #1e3a8a;border-radius:26px;z-index:3}
.shirt-collar{position:absolute;top:90px;left:94px;width:44px;height:28px;background:#fff;border-radius:0 0 18px 18px;z-index:4}
.arm.left,.arm.right{position:absolute;top:112px;width:24px;height:72px;background:#fde68a;border:3px solid #334155;border-radius:18px;z-index:2}
.arm.left{left:38px;transform:rotate(16deg)}
.arm.right{right:36px;transform:rotate(-10deg)}
.leg.left,.leg.right{position:absolute;top:178px;width:28px;height:76px;background:#0f172a;border-radius:20px;z-index:1}
.leg.left{left:82px}
.leg.right{left:118px}
.book{position:absolute;top:128px;left:124px;width:76px;height:54px;background:#fff;border:3px solid #0f172a;border-radius:10px;transform:rotate(-12deg);z-index:6;box-shadow:0 10px 20px rgba(15,23,42,.12)}
.book:after{content:'';position:absolute;left:35px;top:0;bottom:0;width:3px;background:#cbd5e1}
.desk{position:absolute;bottom:10px;left:22px;width:180px;height:24px;background:#8b5e34;border-radius:14px;z-index:0}
.star-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.star-badge{background:rgba(255,255,255,.85);border:1px solid rgba(255,255,255,.8);padding:9px 12px;border-radius:999px;font-weight:700;color:#1e3a8a}
.feature-points{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}
.feature-point{background:rgba(255,255,255,.82);border:1px solid rgba(255,255,255,.88);border-radius:16px;padding:12px 14px}
.feature-point strong{display:block;margin-bottom:4px}
.login-card-enhanced{padding:30px}
.login-card-enhanced h2{font-size:30px;margin-bottom:8px}
.login-subtext{color:#64748b;margin-bottom:18px}
.demo-box{background:#f8fafc;border:1px solid #e2e8f0;border-radius:16px;padding:14px 16px;margin-top:18px}
@media(max-width:960px){.login-shell{grid-template-columns:1fr}.illustration-card{min-height:420px}.feature-points{grid-template-columns:1fr 1fr}}
@media(max-width:640px){.feature-points{grid-template-columns:1fr}.student-figure{transform:scale(.9)}}


.image-preview{max-width:220px;max-height:180px;border:1px solid #dbe5f4;border-radius:14px;background:#fff;padding:6px;margin-top:8px}
.question-figure{max-width:100%;max-height:320px;border:1px solid #dbe5f4;border-radius:16px;background:#fff;padding:8px;margin:10px 0}
.option-media{display:flex;flex-direction:column;gap:8px}
.option-thumb{max-width:160px;max-height:130px;border:1px solid #dbe5f4;border-radius:12px;background:#fff;padding:6px}
.upload-help{font-size:13px;color:#64748b;margin-top:6px}


.option-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:12px}
.option-card{display:block;width:100%}
.option-card label{display:flex;align-items:stretch;gap:12px;padding:14px;border:1px solid #dbe5f4;border-radius:18px;background:#fff;cursor:pointer;height:100%}
.option-card label:hover{border-color:#93c5fd;background:#f8fbff}
.option-card input[type="radio"]{margin-top:6px}
.option-card .option-media{width:100%}
.option-card .option-letter{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:999px;background:#eaf1ff;color:#1d4ed8;font-weight:800;margin-bottom:6px}
.option-card .option-text{font-weight:600;color:#1e293b}
.option-thumb.landscape{width:100%;max-width:100%;height:140px;object-fit:contain;background:#fff}
.option-card.correct-answer label{border-color:#86efac;background:#f0fdf4}
.option-card.wrong-answer label{border-color:#fca5a5;background:#fef2f2}
@media(max-width:760px){.option-grid{grid-template-columns:1fr}.option-thumb.landscape{height:120px}}


.relax-card{background:linear-gradient(135deg,#ecfeff 0%,#e0f2fe 45%,#f0fdf4 100%);border:1px solid #bae6fd}
.relax-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.breathing-circle-wrap{display:flex;justify-content:center;align-items:center;padding:24px 0}
.breathing-circle{width:180px;height:180px;border-radius:999px;background:radial-gradient(circle at 30% 30%,#ffffff,#93c5fd);display:flex;align-items:center;justify-content:center;text-align:center;font-weight:800;color:#0f172a;box-shadow:0 20px 40px rgba(59,130,246,.18);transform:scale(1);transition:transform 4s ease-in-out}
.breathing-circle.inhale{transform:scale(1.28)}
.breathing-circle.exhale{transform:scale(0.92)}
.breathing-text{font-size:20px}
.tip-list{display:grid;gap:10px}
.tip-item{background:#fff;border:1px solid #dbeafe;border-radius:14px;padding:12px 14px}
.relax-actions{display:flex;gap:12px;flex-wrap:wrap}
.mood-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.mood-card{background:#fff;border:1px solid #dbeafe;border-radius:18px;padding:16px;text-align:center;font-weight:700}
.mood-card small{display:block;color:#64748b;font-weight:500;margin-top:6px}
@media(max-width:640px){.mood-grid{grid-template-columns:1fr}}


.chat-shell{display:grid;grid-template-columns:1.2fr .8fr;gap:18px}
.chat-box{background:#fff;border:1px solid #dbeafe;border-radius:20px;padding:18px}
.chat-messages{display:flex;flex-direction:column;gap:12px;max-height:520px;overflow:auto;padding-right:4px}
.chat-message{max-width:82%;padding:12px 14px;border-radius:18px;line-height:1.6}
.chat-message.user{align-self:flex-end;background:#4f46e5;color:#fff;border-bottom-right-radius:6px}
.chat-message.assistant{align-self:flex-start;background:#f8fafc;border:1px solid #dbeafe;color:#0f172a;border-bottom-left-radius:6px}
.chat-role{font-size:12px;font-weight:700;opacity:.75;margin-bottom:4px}
.chat-form-row{display:flex;gap:10px;align-items:flex-end;margin-top:14px}
.chat-form-row textarea{min-height:90px}
.chat-tip-card{background:linear-gradient(135deg,#ecfeff,#eef2ff);border:1px solid #c7d2fe;border-radius:18px;padding:16px}
.chat-chip-wrap{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.chat-chip{display:inline-flex;padding:8px 12px;border-radius:999px;background:#fff;border:1px solid #dbeafe;font-weight:700}
@media(max-width:900px){.chat-shell{grid-template-columns:1fr}}


.calm-card{background:linear-gradient(135deg,#f0fdf4 0%,#ecfeff 50%,#eef2ff 100%);border:1px solid #bfdbfe}
.mood-select-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:14px}
.mood-select-card{border:1px solid #dbeafe;border-radius:18px;padding:16px;background:#fff;cursor:pointer;text-align:center;font-weight:700}
.mood-select-card:hover{border-color:#93c5fd;background:#f8fbff}
.calm-tip-box{background:#fff;border:1px solid #dbeafe;border-radius:16px;padding:14px}
.no-stress-pill{display:inline-block;padding:8px 12px;border-radius:999px;background:#ecfeff;color:#155e75;font-weight:700;border:1px solid #a5f3fc}


.daily-iq-hero{background:linear-gradient(135deg,#fef9c3 0%,#dbeafe 50%,#dcfce7 100%);border:1px solid #bfdbfe}
.challenge-badge{display:inline-block;padding:8px 12px;border-radius:999px;background:#fff7ed;border:1px solid #fdba74;color:#9a3412;font-weight:800}
.fun-result{background:linear-gradient(135deg,#eff6ff,#f0fdf4);border:1px solid #bae6fd;border-radius:18px;padding:18px}


.brain-game-hero{background:linear-gradient(135deg,#ede9fe 0%,#dbeafe 45%,#dcfce7 100%);border:1px solid #c4b5fd}
.level-badge{display:inline-block;padding:8px 12px;border-radius:999px;background:#fff;border:1px solid #c7d2fe;color:#4338ca;font-weight:800}
.xp-box{background:#fff;border:1px solid #dbeafe;border-radius:18px;padding:14px}
.game-result-card{background:linear-gradient(135deg,#eff6ff,#f0fdf4);border:1px solid #bfdbfe;border-radius:20px;padding:20px}
.game-stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:14px}
.game-stat{background:#fff;border:1px solid #dbeafe;border-radius:16px;padding:14px;text-align:center}


.exams-table{table-layout:fixed;width:100%}
.exams-table th,.exams-table td{vertical-align:top}
.exams-table th:nth-child(1){width:28%}
.exams-table th:nth-child(2){width:8%}
.exams-table th:nth-child(3){width:9%}
.exams-table th:nth-child(4){width:7%}
.exams-table th:nth-child(5){width:14%}
.exams-table th:nth-child(6){width:11%}
.exams-table th:nth-child(7){width:11%}
.exams-table th:nth-child(8){width:12%}
.exams-table th:nth-child(9){width:10%}
.paper-cell{min-width:240px}
.paper-title{font-weight:700;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.paper-meta{margin-top:6px;font-size:12px;color:#64748b;display:flex;gap:6px;flex-wrap:wrap}
.center-cell{text-align:center;vertical-align:middle !important}
.weak-cell{font-size:13px;line-height:1.4}
.progress-cell{vertical-align:middle !important}
.progress-wrap{min-width:120px}
.progress-track{height:10px;background:#e5e7eb;border-radius:999px;overflow:hidden}
.progress-fill{height:10px;background:linear-gradient(90deg,#60a5fa,#22c55e)}
.progress-text{font-size:12px;color:#64748b;margin-top:4px}
.status-mastered{color:#7c3aed;font-weight:700}
.status-completed{color:green;font-weight:700}
.status-new{color:#f59e0b;font-weight:700}
@media (max-width: 1200px){
  .exams-table{table-layout:auto}
  .paper-title{-webkit-line-clamp:3}
}

.danger{background:#ef4444 !important;color:#fff !important;border-color:#ef4444 !important}

.status-completed{color:green;font-weight:700}.status-new{color:#f59e0b;font-weight:700}.danger{background:#ef4444 !important;color:#fff !important;border-color:#ef4444 !important}


.chat-layout{display:grid;grid-template-columns:320px 1fr;gap:18px}
.chat-sidebar-panel,.chat-main-panel{background:rgba(255,255,255,.94);border:1px solid rgba(217,232,255,.98);border-radius:24px;padding:20px;box-shadow:var(--shadow)}
.chat-student-link{display:block;padding:12px 14px;border:1px solid #dbeafe;border-radius:16px;margin-bottom:12px;color:var(--text);background:#fff}
.chat-student-link.active{background:#eef5ff;border-color:#93c5fd}
.chat-student-top{display:flex;justify-content:space-between;align-items:center;gap:10px}
.chat-unread-badge{display:inline-flex;min-width:28px;height:28px;padding:0 10px;align-items:center;justify-content:center;border-radius:999px;background:#ef4444;color:#fff;font-weight:800}
.chat-unread-mini{display:inline-flex;min-width:22px;height:22px;padding:0 8px;align-items:center;justify-content:center;border-radius:999px;background:#ef4444;color:#fff;font-size:12px;font-weight:800}
.chat-header{padding-bottom:12px;border-bottom:1px solid #e5e7eb;margin-bottom:14px}
.chat-scroll-box{max-height:480px;overflow:auto;display:flex;flex-direction:column;gap:12px;margin-bottom:16px;padding-right:4px}
.chat-bubble{max-width:78%;padding:12px 14px;border-radius:18px;line-height:1.5}
.chat-bubble-admin{margin-left:auto;background:linear-gradient(135deg,var(--primary),var(--primary2));color:#fff}
.chat-bubble-student{background:#f8fafc;border:1px solid #dbeafe}
.chat-meta{font-size:12px;opacity:.8;font-weight:700;margin-bottom:4px}
.chat-compose-box{display:flex;gap:12px;align-items:flex-end}
@media (max-width: 900px){
  .chat-layout{grid-template-columns:1fr}
  .chat-bubble{max-width:100%}
  .chat-compose-box{flex-direction:column;align-items:stretch}
}


.daily-reward-card{background:linear-gradient(135deg,rgba(251,191,36,.14),rgba(124,58,237,.08))}
.wallet-card{background:linear-gradient(135deg,rgba(34,197,94,.08),rgba(37,99,235,.06))}
.daily-kicker{font-size:13px;font-weight:800;letter-spacing:.04em;color:#475569;text-transform:uppercase}
.coins-pill{display:inline-flex;align-items:center;justify-content:center;padding:10px 16px;border-radius:999px;background:#fff7ed;border:1px solid #fdba74;color:#c2410c;font-weight:800}
.shop-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:18px}
.shop-card{text-align:center}
.shop-type{font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:#64748b;font-weight:800}
.shop-price{font-size:28px;font-weight:900;margin:12px 0;color:#c2410c}


.status-paused{color:#2563eb;font-weight:700}


.shop-image-wrap{display:flex;justify-content:center;margin:12px 0 14px}
.shop-image{width:90px;height:90px;object-fit:cover;border-radius:16px;border:1px solid #dbeafe;background:#fff;box-shadow:0 8px 20px rgba(37,99,235,.08)}


.analytics-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px;margin-bottom:18px}


.modern-exam-filter-bar{display:grid;grid-template-columns:repeat(4,minmax(180px,1fr)) auto;gap:12px;align-items:end;min-width:100%}
.modern-filter-actions{display:flex;gap:10px;align-items:end}
.modern-exam-cards-grid{display:grid;grid-template-columns:1fr;gap:18px}
.exam-modern-card{background:rgba(255,255,255,.96);border:1px solid rgba(217,232,255,.98);border-radius:28px;padding:22px;box-shadow:var(--shadow)}
.exam-status-paused{border-color:#93c5fd;background:linear-gradient(135deg,rgba(59,130,246,.06),rgba(255,255,255,.98))}
.exam-status-completed{border-color:#86efac;background:linear-gradient(135deg,rgba(34,197,94,.06),rgba(255,255,255,.98))}
.exam-status-mastered{border-color:#fcd34d;background:linear-gradient(135deg,rgba(251,191,36,.10),rgba(255,255,255,.98))}
.exam-modern-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;flex-wrap:wrap}
.exam-modern-main h3{margin:0 0 10px;font-size:28px;line-height:1.15}
.exam-modern-meta{display:flex;flex-wrap:wrap;gap:8px;color:#64748b}
.exam-modern-side{display:flex;flex-direction:column;align-items:flex-end;gap:12px;min-width:150px}
.modern-status-badge{display:inline-flex;align-items:center;justify-content:center;padding:8px 14px;border-radius:999px;font-weight:800}
.modern-status-badge.status-new{background:#fff7ed;color:#c2410c;border:1px solid #fdba74}
.modern-status-badge.status-paused{background:#eff6ff;color:#1d4ed8;border:1px solid #93c5fd}
.modern-status-badge.status-completed{background:#ecfdf5;color:#15803d;border:1px solid #86efac}
.modern-status-badge.status-mastered{background:#fffbeb;color:#a16207;border:1px solid #fcd34d}
.modern-exam-btn{min-width:124px;text-align:center}
.exam-modern-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:18px}
.exam-stat-box{background:#f8fbff;border:1px solid #dbeafe;border-radius:18px;padding:14px 16px}
.exam-stat-label{font-size:13px;color:#64748b;font-weight:800;margin-bottom:6px;text-transform:uppercase;letter-spacing:.03em}
.exam-stat-value{font-size:20px;font-weight:800;line-height:1.3;word-break:break-word}
.exam-progress-panel{margin-top:18px}
.exam-progress-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;font-weight:700;color:#475569}
.exam-modern-foot{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:16px;padding-top:16px;border-top:1px solid #e5e7eb}
.exam-access-tag{font-weight:800}
.exam-access-tag.free{color:#16a34a}
.exam-access-tag.paid{color:#b45309}
.exam-remaining-text{color:#64748b;font-weight:700}
@media (max-width: 1100px){
  .modern-exam-filter-bar{grid-template-columns:repeat(2,minmax(220px,1fr))}
  .exam-modern-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width: 700px){
  .modern-exam-filter-bar{grid-template-columns:1fr}
  .modern-filter-actions{flex-wrap:wrap}
  .exam-modern-main h3{font-size:24px}
  .exam-modern-stats{grid-template-columns:1fr}
  .exam-modern-side{align-items:stretch;width:100%}
  .modern-exam-btn{width:100%}
}


.profile-avatar-wrap{margin-bottom:18px}
.profile-avatar{
  width:110px;
  height:110px;
  border-radius:24px;
  object-fit:cover;
  border:1px solid #dbeafe;
  box-shadow:0 12px 30px rgba(15,23,42,.08)
}
.profile-avatar-fallback{
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,var(--primary),var(--primary2));
  color:#fff;
  font-size:40px;
  font-weight:800;
}


.camera-ai-card{background:linear-gradient(135deg,rgba(37,99,235,.06),rgba(255,255,255,.96));border:1px solid #bfdbfe}
.camera-consent-check{display:flex;align-items:flex-start;gap:10px;margin-top:12px;color:#334155;font-weight:700}
.camera-preview-shell{position:relative;width:280px;max-width:100%;aspect-ratio:4/3;border-radius:24px;overflow:hidden;background:#0f172a;border:1px solid #93c5fd}
#cameraPreview{width:100%;height:100%;object-fit:cover;background:#111827}
.camera-overlay-badge{position:absolute;top:12px;right:12px;background:rgba(15,23,42,.75);color:#fff;padding:7px 12px;border-radius:999px;font-size:12px;font-weight:800;border:1px solid rgba(255,255,255,.15)}
.camera-overlay-badge.live{background:rgba(22,163,74,.85)}
.camera-mood-status{margin-top:14px;padding:12px 14px;border-radius:16px;background:#eff6ff;color:#1e3a8a;font-weight:800}
.camera-support-tip{margin-top:10px;padding:14px 16px;border-radius:16px;background:#f8fafc;border:1px solid #dbeafe;color:#334155;line-height:1.7}


.battle-nav-link,
.battle-mobile-link{
    display:inline-flex;
    align-items:center;
    gap:8px;
}

.battle-live-badge{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-width:42px !important;
    height:22px !important;
    padding:0 10px !important;
    border-radius:999px !important;
    background:linear-gradient(135deg,#6d28d9,#8b5cf6) !important;
    color:#fff !important;
    font-size:11px !important;
    font-weight:800 !important;
    line-height:1 !important;
    box-shadow:0 6px 18px rgba(109,40,217,.28) !important;
    animation:battleSoftPulse 1.8s infinite !important;
}

.battle-upcoming-badge{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-width:22px !important;
    height:22px !important;
    padding:0 7px !important;
    border-radius:999px !important;
    background:linear-gradient(135deg,#38bdf8,#60a5fa) !important;
    color:#fff !important;
    font-size:11px !important;
    font-weight:800 !important;
    line-height:1 !important;
    box-shadow:0 6px 18px rgba(56,189,248,.22) !important;
}

@keyframes battleSoftPulse{
    0%{transform:scale(1);box-shadow:0 0 0 0 rgba(139,92,246,.28);}
    70%{transform:scale(1.05);box-shadow:0 0 0 10px rgba(139,92,246,0);}
    100%{transform:scale(1);box-shadow:0 0 0 0 rgba(139,92,246,0);}
}

@media (max-width:768px){
    .battle-mobile-link{
        width:100%;
        justify-content:space-between;
    }
}
