:root{
  --max: 1180px;
  --radius-xl: 32px;
  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 0 22px 50px rgba(17, 24, 39, .10);
  --shadow-soft: 0 12px 28px rgba(15, 23, 42, .08);
  --text: #102033;
  --muted: #5e6d7f;
  --line: #dce6f4;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --page-bg: #eef4ff;
  --page-banner: #2563eb;
  --page-banner-2: #89aefc;
  --page-glow: rgba(255,255,255,.24);
  --page-accent: #bfdbfe;
  --page-ink: #102033;
  --brand: #2557d6;
  --brand-2: #1d4ed8;
  --brand-soft: #eaf0ff;
  --success: #18a566;
  --error: #e24b4b;
  --warning: #d97706;
  --accent: #f5b52f;
  --dark: #0d1b2a;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;min-height:100%;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;color:var(--text);background:var(--page-bg);overflow-x:hidden;scroll-behavior:smooth;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}
body{background:radial-gradient(1200px 500px at 10% 0%, rgba(255,255,255,.8), rgba(255,255,255,0) 60%), var(--page-bg);transition:background .3s ease}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit}
img{display:block;max-width:100%}
.hidden{display:none !important}
.small{font-size:.92rem;color:var(--muted)}
.tiny-tag{display:inline-flex;align-items:center;gap:6px;background:rgba(37,87,214,.10);color:var(--brand);padding:4px 10px;border-radius:999px;font-size:.78rem;font-weight:800}

.container{width:min(100%,var(--max));margin:0 auto;padding:0 18px}
.shell{padding-top:92px}
.page-section{display:none;padding:0 0 34px;position:relative}
.page-section.active{display:block}
.content-stack{width:min(100%,var(--max));margin:0 auto;padding:0 18px 18px;display:grid;gap:24px;position:relative;z-index:1}
.content-stack.narrow{max-width:1040px}
.stack-vertical{display:flex;flex-direction:column;gap:18px;width:100%}
.content-stack .stack-vertical{display:flex;flex-direction:column;gap:18px;width:100%}

.topbar{
  position:fixed;inset:0 0 auto 0;z-index:50;
  background:rgba(248,250,255,.84);
  backdrop-filter:saturate(180%) blur(18px);
  border-bottom:1px solid rgba(220,230,244,.85);
  box-shadow:0 1px 0 rgba(255,255,255,.75) inset;
}
.topbar .wrap{min-height:84px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.brand{display:flex;align-items:center;gap:12px;font-weight:900;cursor:pointer;user-select:none;flex-shrink:0}
.brand small{display:block;color:var(--muted);font-weight:600;line-height:1.2}
.logo{width:44px;height:44px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(135deg,#ffe066,#ffbf1f);box-shadow:0 12px 26px rgba(245,181,47,.26), inset 0 0 0 3px rgba(255,255,255,.52)}
.logo.bee{position:relative;background:transparent}
.logo.bee::after{content:"";display:none}
.nav{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:nowrap;width:100%;min-width:0;overflow:visible}
.nav a,.nav button{border:0;background:transparent;padding:10px 14px;border-radius:999px;cursor:pointer;font-weight:800;color:var(--text);transition:.2s ease;white-space:nowrap}
.nav a:hover,.nav button:hover,.nav a.active{background:var(--brand-soft);color:var(--brand)}
.nav-links{display:flex;align-items:center;gap:8px;flex-wrap:nowrap;min-width:0;overflow:hidden;flex:1 1 auto}
.nav-actions{display:flex;align-items:center;gap:10px;margin-left:auto;flex:0 0 auto;overflow:visible}
.nav-more-wrap{position:relative;display:flex;align-items:center;flex:0 0 auto;overflow:visible;z-index:120}
.nav-chip,.navLoginBtn{border:0;padding:10px 14px;border-radius:999px;cursor:pointer;font-weight:800;transition:.2s ease;background:var(--brand-soft);color:var(--brand);display:inline-flex;align-items:center;gap:6px}
.nav-chip:hover,.navLoginBtn:hover{transform:translateY(-1px);box-shadow:var(--shadow-soft)}
.nav-more-menu{top:calc(100% + 10px);left:auto;right:0;min-width:230px;z-index:130;transform-origin:top right}
.nav-more-menu a{padding:10px 12px;border-radius:12px}
.profileWrap{position:relative;display:block}
.profileBtnLabel{white-space:nowrap}
.burger{display:none;border:0;background:var(--surface);box-shadow:var(--shadow-soft);border-radius:14px;width:44px;height:44px;font-size:1.2rem;cursor:pointer}
.avatarBtn{display:flex;align-items:center;gap:10px;border:0;background:rgba(37,87,214,.08);padding:8px 12px;border-radius:999px;font-weight:800;cursor:pointer}
.navLogout{border:0;background:rgba(15,23,42,.08);padding:10px 14px;border-radius:999px;cursor:pointer;font-weight:800;color:var(--text);transition:.2s ease}.navLogout:hover,.navLogout.active{background:var(--brand-soft);color:var(--brand)}
.avatar{width:36px;height:36px;border-radius:50%;background:linear-gradient(135deg,#dce9ff,#b9d1ff);display:grid;place-items:center;font-weight:900;color:#12306d;overflow:hidden;flex-shrink:0;box-shadow:inset 0 0 0 2px rgba(255,255,255,.6)}
.avatar img{width:100%;height:100%;object-fit:cover}
.dropdown{position:absolute;top:56px;right:0;min-width:220px;background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);padding:10px;display:none;z-index:60}
.dropdown.open{display:grid;gap:6px}
.dropdown a,.dropdown button{width:100%;text-align:left;padding:10px 12px;border:0;border-radius:12px;background:transparent;cursor:pointer;font-weight:700;display:flex;align-items:center;gap:10px}
.dropdown a:hover,.dropdown button:hover{background:var(--surface-soft)}
.nav-ic{flex-shrink:0;color:var(--brand);opacity:.85;transition:opacity .2s ease,transform .2s ease}
.dropdown a:hover .nav-ic,.dropdown button:hover .nav-ic{opacity:1;transform:translateX(2px)}

.badge{display:inline-flex;align-items:center;gap:8px;border-radius:999px;background:rgba(255,255,255,.18);color:#fff;padding:8px 14px;font-size:.92rem;font-weight:800;backdrop-filter:blur(10px);box-shadow:0 8px 20px rgba(255,255,255,.12)}
.badge.soft{background:var(--brand-soft);color:var(--brand)}
.banner-head h1{margin:.6rem 0 .6rem;font-size:clamp(1.9rem,3.2vw,2.7rem);font-weight:800;line-height:1.15;letter-spacing:-.025em}
.banner-head p{margin:0;max-width:800px;font-size:1.05rem;font-weight:500;line-height:1.65;opacity:.95;color:#ffffff}
.section-heading{display:flex;flex-direction:column;gap:8px}
.section-heading.compact h2,.section-heading.compact h3{margin:0}
.section-heading h2{margin:0;font-size:1.65rem;letter-spacing:-.02em}
.section-heading p{margin:0;color:var(--muted)}

.page-banner{
  position:relative;
  overflow:hidden;
  border-radius:0 0 30px 30px;
  background:var(--page-banner);
  color:#fff;
  box-shadow:0 24px 54px rgba(20,38,80,.2), 0 1px 0 rgba(255,255,255,.18) inset;
  border:0;
}
.page-banner::before,.page-banner::after{content:"";position:absolute;inset:auto;border-radius:50%;pointer-events:none;filter:blur(0px)}
.page-banner::before{width:460px;height:460px;right:-180px;top:-150px;background:radial-gradient(circle, rgba(255,255,255,.32), rgba(255,255,255,0) 65%)}
.page-banner::after{width:320px;height:320px;left:-120px;bottom:-140px;background:radial-gradient(circle, rgba(255,255,255,.20), rgba(255,255,255,0) 65%)}
.page-banner .banner-head{position:relative;z-index:1;width:min(100%,var(--max));margin:0 auto;padding:34px 18px 32px}
.page-banner .banner-head p{max-width:820px}
.page-banner.home-banner{margin:0 0 18px;width:100%}
.page-hero{width:100%;margin:0;padding:0 0 16px}

.hero-home{display:grid;gap:18px;align-items:start}
.hero-video-card{
  background:linear-gradient(180deg,#ffffff,#f8fbff);
  border:1px solid var(--line);
  border-radius:28px;
  box-shadow:var(--shadow);
  padding:18px;
  width:min(100%,var(--max));
  margin:0 auto;
}
.video-topline{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.video-topline strong{font-size:1.05rem}
.hero-cta-row{display:flex;flex-wrap:wrap;gap:12px;margin-top:14px}
.iframe-box{position:relative;overflow:hidden;border-radius:26px;background:#0f172a;box-shadow:0 18px 40px rgba(15,23,42,.18)}
.iframe-box::before{content:"";position:absolute;inset:0;background:linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,0));pointer-events:none;z-index:1}
.iframe-box.large{height:clamp(420px,70vh,760px)}
.iframe-box.medium{height:430px}
.flipframe-wrap{position:relative;overflow:hidden;border-radius:24px;background:#eff4ff;border:1px solid var(--line);min-height:520px}
.flipframe-wrap iframe,.iframe-box iframe{width:100%;height:100%;border:0;display:block;background:#0f172a}
.flipframe-wrap iframe{min-height:520px}
.iframe-fallback{position:absolute;inset:auto 18px 18px 18px;background:rgba(255,255,255,.88);backdrop-filter:blur(10px);padding:12px 14px;border-radius:14px;border:1px solid rgba(255,255,255,.55);box-shadow:var(--shadow-soft)}

.panel{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow-soft);
  padding:18px;
}
.panel h3{margin:0 0 8px;font-size:1.18rem;letter-spacing:-.02em}
.panel p{margin:.35rem 0 0;line-height:1.7;color:var(--muted)}
.panel-topline{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.grow-card{display:grid;gap:8px}
.grow-card p{margin:0}
.home-about-panel{display:grid;gap:14px}
.home-about-panel .about-copy{display:grid;gap:14px}
.home-about-panel p{margin:0;color:var(--text);line-height:1.85}

.mini-grid{display:grid;gap:16px}
.mini-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.mini-grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}
.info-card{background:var(--surface);border:1px solid var(--line);border-radius:24px;padding:18px;box-shadow:var(--shadow-soft);display:grid;gap:10px;min-height:156px;position:relative;overflow:hidden}
.info-card::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg, rgba(255,255,255,.24), transparent 40%);pointer-events:none}
.info-index{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;font-weight:900;color:#fff;background:var(--page-banner);box-shadow:0 12px 28px rgba(37,87,214,.24)}
.info-card h3{margin:0;font-size:1.08rem}
.info-card p{margin:0;color:var(--muted);line-height:1.68}
.info-card.accent-1 .info-index{background:#2563eb}
.info-card.accent-2 .info-index{background:#8b5cf6}
.info-card.accent-3 .info-index{background:#0f9d58}

.btn{border:0;border-radius:16px;padding:12px 16px;font-weight:900;cursor:pointer;transition:.2s ease;display:inline-flex;align-items:center;justify-content:center;gap:8px;line-height:1}
.btn:hover{transform:translateY(-1px)}
.btn.primary{background:var(--page-banner);color:#fff;box-shadow:0 12px 22px rgba(37,87,214,.22)}
.btn.soft{background:#eef4ff;color:#183a8f;border:1px solid rgba(37,87,214,.12)}
.btn.ghost{background:#fff;color:#183a8f;border:1px solid var(--line)}
.btn.danger{background:#ffe8e8;color:#a72828;border:1px solid rgba(226,75,75,.15)}

.flipbook-panel{display:grid;gap:14px}

.stack-vertical .panel,.stack-vertical .chapter-card,.stack-vertical .roadmap-item,.stack-vertical .faq-card{width:100%}
.video-card{display:grid;gap:14px}
.videos-stack{gap:18px}
.iframe-box.medium{height:390px}

.control-row{display:flex;flex-wrap:wrap;gap:12px;align-items:end}
.control-row.glass{background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.22);padding:16px;border-radius:24px;backdrop-filter:blur(10px);margin-top:18px;position:relative;z-index:1}
.control-row label{display:grid;gap:8px;min-width:180px;flex:1}
.control-row span{font-size:.85rem;font-weight:800;opacity:.95}
.control-row select,.control-row input,.prompt-field input,.prompt-field textarea,.prompt-field select,.form-stack input,.form-stack select,.form-stack textarea{width:100%;border:1px solid var(--line);border-radius:16px;background:#fff;padding:12px 14px;color:var(--text);outline:none;transition:.2s ease;box-shadow:0 1px 0 rgba(255,255,255,.6) inset}
.control-row select:focus,.control-row input:focus,.prompt-field input:focus,.prompt-field textarea:focus,.prompt-field select:focus,.form-stack input:focus,.form-stack select:focus,.form-stack textarea:focus{border-color:rgba(37,87,214,.35);box-shadow:0 0 0 4px rgba(37,87,214,.08)}

.chapter-card{background:var(--surface);border:1px solid var(--line);border-left:6px solid var(--subject-color, var(--brand));border-radius:24px;box-shadow:var(--shadow-soft);padding:18px;display:grid;gap:14px}
.chapter-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.chapter-card h3{margin:0;font-size:1.18rem;letter-spacing:-.02em}
.chapter-card p{margin:0;color:var(--muted);line-height:1.7}
.chapter-order{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:8px 12px;background:rgba(37,87,214,.08);color:#2145af;font-weight:900;font-size:.9rem}
.chapter-focus{margin:0;padding-left:18px;color:var(--muted);display:grid;gap:6px}
.chapter-actions{display:flex;flex-wrap:wrap;gap:10px}

.chapter-card .badge.soft{background:rgba(37,87,214,.08)}

.tool-card{display:grid;gap:16px}
.tool-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.prompt-field{display:grid;gap:7px}
.prompt-field span{font-size:.85rem;font-weight:800;color:#2c3e55}
.tool-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:end}
.tool-select{display:grid;gap:6px;min-width:140px}
.tool-select span{font-size:.8rem;font-weight:800;color:#2c3e55}
.tool-select select{width:100%;border:1px solid var(--line);border-radius:14px;padding:11px 12px;background:#fff}
.prompt-output{display:grid;gap:8px}
.prompt-output span{font-size:.85rem;font-weight:800;color:#2c3e55}
.prompt-output textarea{min-height:240px;resize:vertical;line-height:1.65}

.roadmap-list{display:grid;gap:14px}
.roadmap-item{background:var(--surface);border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow-soft);padding:16px;display:grid;grid-template-columns:72px minmax(0,1fr) auto;gap:16px;align-items:start}
.roadmap-index{width:56px;height:56px;border-radius:18px;display:grid;place-items:center;font-weight:900;font-size:1.25rem;background:var(--page-banner);color:#fff;box-shadow:0 12px 24px rgba(37,87,214,.22)}
.roadmap-main{display:grid;gap:10px}
.roadmap-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
.roadmap-head h3{margin:8px 0 0;font-size:1.15rem}
.score-pill{background:rgba(16,32,51,.06);border-radius:999px;padding:8px 12px;font-weight:800;color:#334155}
.note-box{background:#f7faff;border:1px dashed rgba(37,87,214,.16);padding:10px 12px;border-radius:14px;color:#3b4b68}
.roadmap-actions{display:flex;flex-direction:column;gap:10px;min-width:180px}

.auth-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.auth-card,.profile-card{display:grid;gap:14px}
.form-stack{display:grid;gap:12px}
.form-stack label{display:grid;gap:7px}
.form-stack span{font-size:.85rem;font-weight:800;color:#2d3f58}
.profile-head{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.avatar.big{width:84px;height:84px;border-radius:28px;font-size:1.6rem;background:linear-gradient(135deg,#dce9ff,#c2d6ff)}
.avatar.big img{width:100%;height:100%;object-fit:cover}
.profile-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.stat{background:#f8fbff;border:1px solid var(--line);border-radius:18px;padding:14px;text-align:center;display:grid;gap:6px}
.stat strong{font-size:1.35rem;color:#1d3f93}
.stat span{font-size:.85rem;color:var(--muted)}
.profile-actions{display:flex;flex-wrap:wrap;gap:10px}
.empty-profile{align-items:start}

.faq-card{background:var(--surface);border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow-soft);overflow:hidden;display:grid;gap:0}
.faq-question{width:100%;text-align:left;border:0;background:linear-gradient(135deg, rgba(37,87,214,.08), rgba(37,87,214,.03));padding:12px 14px;display:flex;align-items:flex-start;gap:12px;font-weight:800;font-size:.88rem;cursor:pointer;color:var(--text);line-height:1.45}
.faq-dot{width:13px;height:13px;border-radius:50%;background:var(--page-banner);box-shadow:0 0 0 4px rgba(37,87,214,.12)}
.faq-answer{padding:0 14px 14px}
.faq-answer-box{background:linear-gradient(180deg,#f8fbff,#eef4ff);border:1px solid rgba(37,87,214,.12);border-radius:18px;padding:18px 18px 16px;display:grid;gap:12px;box-shadow:var(--shadow-soft)}
.faq-answer-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.faq-group{display:inline-flex;align-items:center;width:max-content;background:rgba(37,87,214,.08);color:#1d4ed8;border-radius:999px;padding:6px 10px;font-size:.78rem;font-weight:800}.faq-answer-head strong{font-size:.82rem;letter-spacing:.02em;color:#1f3f84}
.faq-answer-box p{margin:0;line-height:1.85;color:#1f2f46;font-size:1.02rem;font-weight:500}
.faq-related{display:flex;flex-wrap:wrap;gap:8px}
.chip-btn,.quick-chip{border:1px solid rgba(37,87,214,.12);background:#fff;color:#20449d;border-radius:999px;padding:9px 12px;cursor:pointer;font-weight:800;transition:.2s ease}
.quick-chip{background:#fff;box-shadow:var(--shadow-soft);font-size:.9rem}
.chip-btn:hover,.quick-chip:hover{background:var(--brand-soft)}
.chatFab{position:fixed;right:18px;bottom:18px;width:66px;height:66px;border-radius:50%;border:0;background:linear-gradient(135deg,#ffdc67,#ffbe1a);box-shadow:0 16px 38px rgba(245,181,47,.3);font-size:1.35rem;cursor:pointer;z-index:60}
.chatPanel{position:fixed;right:18px;bottom:96px;width:min(560px,calc(100vw - 24px));max-height:min(84vh,820px);background:var(--surface);border:1px solid var(--line);border-radius:28px;box-shadow:var(--shadow);overflow:hidden;transform:translateY(20px) scale(.98);opacity:0;pointer-events:none;transition:.22s ease;z-index:59;display:grid;grid-template-rows:auto minmax(0,1fr) auto}
.chatPanel.open{transform:translateY(0) scale(1);opacity:1;pointer-events:auto}
.chatHead{padding:16px 16px 14px;background:linear-gradient(135deg,var(--page-banner),var(--page-banner-2));color:#fff;display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.closeX{width:42px;height:42px;border-radius:14px;border:0;background:rgba(255,255,255,.16);color:#fff;cursor:pointer;font-size:1.1rem;flex-shrink:0}
.chatBody{padding:14px;overflow:auto;display:grid;gap:12px}
.chat-answer-stage{display:grid;gap:12px;border:1px solid rgba(37,87,214,.12);background:linear-gradient(180deg,#f8fbff,#eef4ff);border-radius:24px;padding:18px;box-shadow:var(--shadow-soft)}
.chat-answer-stage h3{margin:0;font-size:1.15rem;line-height:1.4}
.chat-answer-stage p{margin:0;color:#1f2f46;line-height:1.85;font-size:1.01rem}
.faq-list{display:grid;gap:10px}
.faq-card{width:100%;border:1px solid rgba(37,87,214,.14);background:#fff;border-radius:18px;padding:12px 14px;display:grid;gap:6px;cursor:pointer;text-align:left;box-shadow:var(--shadow-soft);transition:.18s ease}
.faq-card:hover,.faq-card.active{background:var(--brand-soft);border-color:rgba(37,87,214,.24);transform:translateY(-1px)}
.faq-card-group{display:inline-flex;align-items:center;width:max-content;background:rgba(37,87,214,.10);color:#1d4ed8;border-radius:999px;padding:5px 10px;font-size:.75rem;font-weight:900}
.faq-card-title{font-weight:900;line-height:1.5;color:var(--text)}
.faq-card-cta{font-size:.82rem;color:var(--muted);font-weight:700}
.faq-answer-stage .faq-answer-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}
.faq-answer-stage .faq-group{background:rgba(37,87,214,.08);color:#1d4ed8}

.faq-card.open .faq-answer{display:block}
.faq-question span:last-child{line-height:1.45}

/* ==========================================
   SOLID, HIGH-CONTRAST TOAST NOTIFICATION SYSTEM (NEVER TRANSPARENT)
   ========================================== */
.toast-wrap {
  position: fixed;
  top: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(92vw, 480px);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  width: 100%;
  padding: 14px 18px;
  border-radius: 18px;
  color: #ffffff !important;
  background: #1e293b; /* Solid fallback */
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28), 0 4px 12px rgba(0, 0, 0, 0.16);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  display: flex;
  flex-direction: column;
  gap: 3px;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.25s ease, transform 0.25s ease;
  backdrop-filter: blur(12px);
}

.toast strong {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #ffffff !important;
}

.toast span {
  font-size: 0.90rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.95) !important;
}

.toast-success {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  border-color: rgba(52, 211, 153, 0.45) !important;
  box-shadow: 0 16px 36px rgba(5, 150, 105, 0.32), 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.toast-error {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
  border-color: rgba(248, 113, 113, 0.45) !important;
  box-shadow: 0 16px 36px rgba(220, 38, 38, 0.32), 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.toast-warning,
.toast-warn {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
  border-color: rgba(251, 191, 36, 0.45) !important;
  box-shadow: 0 16px 36px rgba(217, 119, 6, 0.32), 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.toast-info {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  border-color: rgba(96, 165, 250, 0.45) !important;
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.32), 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.toast.fade {
  opacity: 0 !important;
  transform: translateY(-12px) scale(0.96) !important;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.loadingOverlay{position:fixed;inset:0;background:rgba(8,15,27,.28);backdrop-filter:blur(6px);display:none;place-items:center;z-index:90}
.loadingOverlay.show{display:grid}
.spinner{width:56px;height:56px;border-radius:50%;border:6px solid rgba(255,255,255,.3);border-top-color:#fff;animation:spin .75s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

.modal{position:fixed;inset:0;background:rgba(16,32,51,.42);backdrop-filter:blur(8px);display:none;place-items:center;padding:18px;z-index:70}
.modal.open{display:grid}
.modalBox{width:min(1040px,100%);max-height:90vh;overflow:auto;background:var(--surface);border-radius:30px;padding:22px;border:1px solid var(--line);box-shadow:var(--shadow)}
.pageChoice{background:#f8fbff;border:1px solid var(--line);border-radius:22px;padding:18px;display:grid;gap:10px;box-shadow:var(--shadow-soft)}
.pageChoice h4{margin:0;font-size:1.05rem}
.pageChoice p{margin:0;color:var(--muted);line-height:1.65}
.pageChoice .btn{justify-self:start}

.quiz-overlay{position:fixed;inset:0;background:linear-gradient(180deg,#f7fbff,#edf5ff);display:none;z-index:85;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden}
.quiz-overlay.open{display:grid}
.quiz-top{position:sticky;top:0;z-index:20;background:rgba(255,255,255,.94);backdrop-filter:blur(16px);border-bottom:1px solid rgba(226,232,240,.9);padding:14px 24px;display:flex;align-items:center;justify-content:space-between;gap:16px;box-shadow:0 4px 16px rgba(0,0,0,0.04)}
.quiz-top-info{display:flex;flex-direction:column;gap:4px}
.stats{display:flex;align-items:center;gap:10px;margin-left:auto;flex-wrap:wrap;justify-content:flex-end}
.timer{min-width:96px;padding:10px 16px;border-radius:12px;background:linear-gradient(135deg,#1d4ed8,#2563eb);color:#fff;text-align:center;font-weight:900;font-size:1.05rem;letter-spacing:1px;box-shadow:0 4px 12px rgba(37,87,214,.25)}
.timer.danger{background:linear-gradient(135deg,#dc2626,#ea580c)}
.timer.paused{background:linear-gradient(135deg,#64748b,#475569)}
.quiz-main{min-height:0;overflow:auto;padding:18px}
.quiz-shell{width:min(100%,var(--max));margin:0 auto;background:rgba(255,255,255,.75);backdrop-filter:blur(10px);border:1px solid rgba(220,230,244,.8);border-radius:30px;box-shadow:var(--shadow);padding:18px}
.quiz-shell .inner{display:grid;gap:16px}
.quiz-footer{padding:14px 18px;display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;background:rgba(255,255,255,.7);border-top:1px solid var(--line)}
.quiz-meta-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.meta-box{background:#fff;border:1px solid var(--line);border-radius:20px;padding:14px;display:grid;gap:6px;box-shadow:var(--shadow-soft)}
.meta-box strong{font-size:1.05rem}
.meta-box span{font-size:.86rem;color:var(--muted)}
.quiz-questions{display:grid;gap:14px}
.quiz-q{background:#fff;border:1px solid var(--line);border-radius:24px;padding:16px;box-shadow:var(--shadow-soft);display:grid;gap:14px}
.quiz-q-head{display:flex;gap:14px;align-items:flex-start}
.quiz-number{width:44px;height:44px;border-radius:14px;display:grid;place-items:center;background:var(--page-banner);color:#fff;font-weight:900;flex-shrink:0}
.quiz-topic{font-size:.82rem;font-weight:800;color:#4b5563;text-transform:uppercase;letter-spacing:.04em}
.quiz-stem{margin-top:5px;font-size:1.02rem;line-height:1.8;color:#102033}
.quiz-options{display:grid;gap:10px}
.quiz-option{border:1px solid var(--line);background:#f8fbff;padding:12px 14px;border-radius:16px;display:flex;align-items:flex-start;gap:10px;cursor:pointer;text-align:left;transition:.2s ease}
.quiz-option:hover{transform:translateY(-1px);border-color:rgba(37,87,214,.25)}
.quiz-option.selected{background:rgba(37,87,214,.08);border-color:rgba(37,87,214,.3)}
.quiz-radio{width:18px;height:18px;border-radius:50%;border:2px solid rgba(37,87,214,.28);margin-top:2px;flex-shrink:0;display:inline-block;background:#fff}
.quiz-option.selected .quiz-radio{background:var(--page-banner);border-color:var(--page-banner)}
.quiz-explain{padding:12px 14px;background:#f7fbff;border:1px dashed rgba(37,87,214,.18);border-radius:16px;color:#334155}
.quiz-action-row{display:flex;flex-wrap:wrap;gap:10px}
.quiz-result{display:grid;gap:16px}
.result-hero{border-radius:28px;padding:22px;color:#fff;box-shadow:var(--shadow)}
.result-hero.good{background:linear-gradient(135deg,#0f9d58,#1ea06f)}
.result-hero.mid{background:linear-gradient(135deg,#2563eb,#5a79ef)}
.result-hero.bad{background:linear-gradient(135deg,#d97706,#f59e0b)}
.result-hero h2{margin:.4rem 0;font-size:2rem}
.result-hero p{margin:0;max-width:760px;line-height:1.7}
.weak-list{margin:0;padding-left:20px;display:grid;gap:8px;color:var(--muted)}
.review-stack{display:grid;gap:12px}
.review-item{border-radius:20px;padding:14px;border:1px solid var(--line);background:#fff}
.review-item.wrong{border-left:5px solid #e24b4b}
.review-item.missed{border-left:5px solid #d97706}
.review-head{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}
.review-item p{margin:.3rem 0;line-height:1.6}

.footer{margin-top:28px;background:linear-gradient(180deg,#0f172a,#0b1220);color:#d3def0;padding:46px 0 24px;position:relative;overflow:hidden}
.footer::before{content:"";position:absolute;inset:0;background:radial-gradient(600px 220px at 18% 0%, rgba(89,129,255,.18), rgba(0,0,0,0) 70%), radial-gradient(600px 220px at 82% 0%, rgba(255,193,7,.12), rgba(0,0,0,0) 70%)}
.footer .container{position:relative;z-index:1}
.footer-grid{display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr;gap:24px;align-items:start}
.footer-col h4{margin:0 0 14px;color:#fff;font-size:1.02rem}
.footer-col p,.footer-col li{color:#9eb1ce;line-height:1.8}
.footer-col ul{list-style:none;padding:0;margin:0;display:grid;gap:8px}
.footer-col a:hover{color:#fff}
.footer-brand{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.footer-brand .logo{width:42px;height:42px;border-radius:14px}
.footer-bottom{margin-top:26px;padding-top:18px;border-top:1px solid rgba(255,255,255,.1);display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;color:#91a4c0;font-size:.95rem}
.chip{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;background:rgba(255,255,255,.08);color:#d8e4f7;font-weight:800;font-size:.82rem}

body.quiz-open{overflow:hidden}

@media (max-width: 1080px){
  .mini-grid.three,.mini-grid.four,.auth-grid,.footer-grid,.quiz-meta-grid,.tool-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .roadmap-item{grid-template-columns:64px minmax(0,1fr)}
  .roadmap-actions{grid-column:1 / -1;flex-direction:row;flex-wrap:wrap}
}

@media (max-width: 960px){
  .burger{display:inline-grid;place-items:center}
  .nav{
    display:none;
    position:absolute;
    top:84px;
    right:18px;
    left:18px;
    background:rgba(255,255,255,.98);
    backdrop-filter:blur(20px);
    border:1px solid var(--line);
    border-radius:24px;
    padding:16px;
    box-shadow:0 20px 40px rgba(15, 23, 42, 0.15);
    flex-direction:column;
    align-items:stretch;
    gap:12px;
    z-index:100;
  }
  .nav.open{display:flex}
  .nav-links{
    flex-direction:column;
    align-items:stretch;
    width:100%;
    gap:6px;
  }
  .nav-links a{
    padding:12px 16px;
    border-radius:14px;
    font-size:0.95rem;
    display:flex;
  }
  .nav-actions{
    flex-direction:column;
    align-items:stretch;
    width:100%;
    margin-left:0;
    gap:8px;
    border-top:1px solid var(--line);
    padding-top:10px;
  }
  .nav-more-wrap{width:100%}
  .nav-chip{width:100%;justify-content:center;padding:12px 16px;border-radius:14px}
  .nav-more-menu{position:static;box-shadow:none;border:1px solid var(--line);border-radius:16px;margin-top:6px;width:100%}
  .profileWrap{width:100%}
  .avatarBtn{width:100%;max-width:100%;justify-content:flex-start;padding:10px 14px;border-radius:14px}
  .avatarBtn #navUserName{max-width:none}
  .profileWrap .dropdown{position:static;box-shadow:none;border:1px solid var(--line);border-radius:16px;margin-top:6px;width:100%}
  .topbar .wrap{gap:10px}
  .brand small{display:none}
  .mini-grid.three,.mini-grid.four,.auth-grid,.footer-grid,.quiz-meta-grid,.tool-grid{grid-template-columns:1fr}
  .roadmap-item{grid-template-columns:56px minmax(0,1fr)}
  .profile-stats{grid-template-columns:1fr}
  .control-row label{min-width:0}
  .chatPanel{right:10px;left:10px;width:auto;bottom:82px}
  .quiz-top{align-items:flex-start}
  .stats{width:100%}
  .shell{padding-top:88px}
}

@media (max-width: 680px){
  .page-banner .banner-head{padding:24px 18px}
  .hero-video-card,.panel,.chapter-card,.roadmap-item,.quiz-shell,.info-card,.faq-answer-box{border-radius:20px}
  .iframe-box.large{height:clamp(320px,54vh,580px)}
  .iframe-box.medium,.flipframe-wrap{min-height:320px;height:auto}
  .video-topline,.hero-cta-row,.chapter-actions,.quiz-action-row,.profile-actions,.tool-actions{gap:8px}
  .btn{padding:11px 14px;border-radius:14px}
  .banner-head h1{font-size:clamp(1.9rem,9vw,3rem)}
  .chatFab{width:58px;height:58px;right:12px;bottom:12px}
  .toast-wrap{top:92px;width:calc(100vw - 20px)}
  .footer-bottom{flex-direction:column}
  .quiz-main{padding:12px}
  .quiz-overlay{grid-template-rows:auto minmax(0,1fr) auto}
}

/* Stage 3 additions */
.avatarBtn{
  min-width:auto;
  max-width:240px;
  justify-content:flex-start;
  box-shadow:0 6px 16px rgba(37,87,214,.08);
}
.avatarBtn #navUserName{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  max-width:140px;
  display:inline-block;
}
.avatarBtn .avatar{width:36px;height:36px;font-size:.95rem;border:2px solid rgba(255,255,255,.8);box-shadow:0 6px 14px rgba(37,87,214,.12)}
.avatarBtn:hover{transform:translateY(-1px);background:rgba(37,87,214,.12)}

.lesson-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.lesson-pill{width:100%;display:grid;gap:6px;text-align:left;border:1px solid rgba(37,87,214,.16);background:linear-gradient(180deg,#f8fbff,#eef4ff);color:var(--text);padding:12px 14px;border-radius:18px;cursor:pointer;box-shadow:0 8px 18px rgba(37,87,214,.06);transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease}
.lesson-pill:hover{transform:translateY(-1px);box-shadow:0 12px 24px rgba(37,87,214,.12);border-color:rgba(37,87,214,.30)}
.lesson-pill strong{font-size:.98rem;line-height:1.3}
.lesson-pill small{color:var(--muted);line-height:1.45;font-size:.86rem}
.stage3-card{gap:16px}
.quiz-lesson-tag{display:inline-flex;align-items:center;padding:3px 10px;border-radius:999px;background:rgba(37,87,214,.12);color:var(--brand);font-weight:800;font-size:.82rem;margin-right:8px}
.roadmap-note.small{opacity:.92}

@media (max-width: 1060px){
  .lesson-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}

@media (max-width: 720px){
  .lesson-grid{grid-template-columns:1fr;}
}


/* Stage 4: auth modal and polish */
.auth-modal .modalBox{width:min(980px,100%);border-radius:32px;padding:24px;background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,250,255,.98));box-shadow:0 30px 70px rgba(9,21,44,.20)}
.auth-modal .modalBox{max-height:min(88vh,860px);overflow:auto}
.auth-modal .closeX{background:rgba(15,23,42,.08);color:var(--text);box-shadow:0 6px 18px rgba(15,23,42,.08)}
.auth-modal .closeX:hover{background:rgba(37,87,214,.10);color:var(--brand)}
.auth-modal .auth-tabs{margin-top:14px}
.auth-modal .auth-body{margin-top:0}
.auth-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0 16px}
.auth-tab{border:1px solid var(--line);background:#fff;color:var(--text);padding:10px 14px;border-radius:999px;cursor:pointer;font-weight:800;transition:.2s ease}
.auth-tab.active,.auth-tab:hover{background:var(--brand-soft);color:var(--brand);border-color:rgba(37,87,214,.18)}
.auth-body{display:grid;gap:16px}
.auth-grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.auth-grid-1{display:grid;grid-template-columns:1fr;gap:16px}
.auth-note{display:none}
.auth-note p{margin:0;color:#334155;line-height:1.8}
.auth-form-card{background:#fff;border:1px solid var(--line);border-radius:24px;padding:18px;box-shadow:var(--shadow-soft);display:grid;gap:12px}
.auth-form-card h3{margin:0}
.auth-form-card .btn{width:100%}
.auth-form-card .form-stack{gap:10px}
.auth-footnote{margin-top:6px;color:var(--muted);font-size:.92rem;line-height:1.6}
.auth-form-card label span{color:#2d3f58}
.auth-hero{display:grid;gap:10px}
.auth-hero .badge{width:max-content}
.auth-hero h3{margin:0;font-size:1.1rem}
.auth-hero p{margin:0;color:var(--muted);line-height:1.7}
.auth-mini{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.auth-mini .mini{background:#fff;border:1px solid var(--line);border-radius:18px;padding:12px;box-shadow:var(--shadow-soft);display:grid;gap:4px}
.auth-mini .mini strong{font-size:.95rem}
.auth-mini .mini span{font-size:.84rem;color:var(--muted);line-height:1.5}
.quiz-context{display:inline-flex;align-items:center;padding:3px 10px;border-radius:999px;background:rgba(124,58,237,.12);color:#6d28d9;font-size:.78rem;font-weight:800;margin-right:8px;vertical-align:middle}
.nav .profileWrap{display:block}
.profileBtnLabel{white-space:nowrap}
@media (max-width: 960px){
  .auth-grid-2,.auth-mini{grid-template-columns:1fr}
}


.nav-links{display:flex;align-items:center;gap:8px;flex-wrap:nowrap;min-width:0;overflow:hidden;flex:1 1 auto}
.nav-actions{display:flex;align-items:center;gap:10px;margin-left:auto;flex:0 0 auto;overflow:visible}
.nav-more-wrap{position:relative;display:flex;align-items:center;flex:0 0 auto;overflow:visible;z-index:120}
.nav-chip,.navLoginBtn{border:0;padding:10px 14px;border-radius:999px;cursor:pointer;font-weight:800;transition:.2s ease;background:var(--brand-soft);color:var(--brand);display:inline-flex;align-items:center;gap:6px}
.nav-chip:hover,.navLoginBtn:hover{transform:translateY(-1px);box-shadow:var(--shadow-soft)}
.nav-more-menu{top:52px;left:0;right:auto;min-width:230px}
.profileBtnLabel{white-space:nowrap}
.video-block{display:grid;gap:14px}
.video-block-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}
.video-block-head h3{margin:.35rem 0 .35rem;font-size:1.18rem}
.video-block-head p{margin:0;color:var(--muted);line-height:1.7;max-width:760px}
.video-block .iframe-box{margin:0}
.video-block.compact .iframe-box.medium{height:380px}
.featured-video{margin-top:18px}
.video-mini-note{padding:10px 12px;border-radius:14px;background:#f4f8ff;border:1px solid var(--line);color:#33507e;font-weight:600;line-height:1.6}



/* Stage 5 hotfix v5 */
.topbar,
.topbar .wrap,
.nav,
.nav-actions,
.nav-more-wrap {
  overflow: visible;
}

.nav-more-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: auto;
  z-index: 130;
  min-width: 240px;
  box-shadow: var(--shadow);
}

.nav-more-menu.open {
  display: grid;
}

.auth-modal .modalBox {
  max-height: min(88vh, 860px);
  overflow: auto;
}

.auth-modal .closeX {
  background: rgba(15, 23, 42, .08);
  color: var(--text);
  box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
}

.auth-modal .closeX:hover {
  background: rgba(37, 87, 214, .10);
  color: var(--brand);
}

.chatPanel .chatBody {
  gap: 14px;
}

.chatPanel .faq-answer-stage {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(37, 87, 214, .12);
  background: linear-gradient(180deg, #f8fbff, #eef4ff);
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.chatPanel .faq-answer-stage h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.4;
}

.chatPanel .faq-answer-stage p {
  margin: 0;
  color: #1f2f46;
  line-height: 1.85;
  font-size: 1.01rem;
}

.chatPanel .faq-list {
  display: grid;
  gap: 10px;
}

.chatPanel .faq-card {
  width: 100%;
  border: 1px solid rgba(37, 87, 214, .14);
  background: #fff;
  border-radius: 18px;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
  cursor: pointer;
  text-align: left;
  box-shadow: var(--shadow-soft);
  transition: .18s ease;
}

.chatPanel .faq-card:hover,
.chatPanel .faq-card.active {
  background: var(--brand-soft);
  border-color: rgba(37, 87, 214, .24);
  transform: translateY(-1px);
}

.chatPanel .faq-card-group {
  display: inline-flex;
  align-items: center;
  width: max-content;
  background: rgba(37, 87, 214, .10);
  color: #1d4ed8;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: .75rem;
  font-weight: 900;
}

.chatPanel .faq-card-title {
  font-weight: 900;
  line-height: 1.5;
  color: var(--text);
}

.chatPanel .faq-card-cta {
  font-size: .82rem;
  color: var(--muted);
  font-weight: 700;
}

.chapter-video,
.roadmap-video {
  background: linear-gradient(180deg, #f8fbff, #eef4ff);
  border: 1px solid rgba(37, 87, 214, .12);
  border-radius: 18px;
  padding: 14px 16px;
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.chapter-video.placeholder p,
.roadmap-video p {
  margin: 0;
  color: #1f2f46;
  line-height: 1.75;
}


/* =========================
   Stage 6: cá nhân hoá, check-in và lịch sử hoạt động
   ========================= */
.profile-layout{display:grid;grid-template-columns:minmax(0,1.06fr) minmax(0,.94fr);gap:18px;align-items:start}
.personal-dashboard,.guest-dashboard,.profile-summary-card{position:relative;overflow:hidden}
.personal-dashboard::before,.guest-dashboard::before,.profile-summary-card::before{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(255,255,255,.32),transparent 38%);pointer-events:none}
.dashboard-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.dashboard-grid.compact{grid-template-columns:repeat(3,minmax(0,1fr))}
.dashboard-metric{background:#f8fbff;border:1px solid var(--line);border-radius:18px;padding:14px;display:grid;gap:6px;min-height:86px;box-shadow:0 10px 20px rgba(15,23,42,.05)}
.dashboard-metric small{font-size:.8rem;color:var(--muted);font-weight:700}
.dashboard-metric strong{font-size:1.1rem;line-height:1.2}
.completion-pill{min-width:92px;border-radius:22px;background:rgba(37,87,214,.08);border:1px solid rgba(37,87,214,.10);padding:12px 14px;display:grid;gap:4px;text-align:center;align-self:flex-start}
.completion-pill strong{font-size:1.5rem;color:var(--brand)}
.completion-pill span{font-size:.8rem;color:var(--muted);font-weight:700}
.completion-bar{width:100%;height:14px;background:#e9f1ff;border-radius:999px;overflow:hidden;border:1px solid rgba(37,87,214,.08);margin:14px 0 12px}
.completion-bar span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,var(--page-banner),var(--page-banner-2));box-shadow:0 0 20px rgba(37,87,214,.18)}
.mission-card{background:linear-gradient(135deg, rgba(37,87,214,.10), rgba(255,255,255,.88));border:1px solid rgba(37,87,214,.12);border-radius:24px;padding:18px;display:flex;gap:16px;justify-content:space-between;align-items:flex-start;box-shadow:var(--shadow-soft)}
.mission-card h4{margin:10px 0 8px;font-size:1.18rem;letter-spacing:-.02em}
.mission-card p{margin:0;color:var(--muted);line-height:1.7}
.mission-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:flex-end;min-width:220px}
.compact-cards .info-card{min-height:140px}
.checkin-calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px;margin-top:12px}
.calendar-day{background:#f8fbff;border:1px solid var(--line);border-radius:18px;padding:12px 8px;min-height:88px;display:grid;align-content:center;justify-items:center;gap:6px;text-align:center;box-shadow:0 10px 20px rgba(15,23,42,.04)}
.calendar-day small{font-size:.78rem;color:var(--muted);font-weight:700}
.calendar-day strong{font-size:1.22rem}
.calendar-day span{font-size:.82rem;color:var(--muted);font-weight:700}
.calendar-day.checked{background:linear-gradient(180deg, rgba(24,165,102,.12), rgba(24,165,102,.04));border-color:rgba(24,165,102,.18)}
.calendar-day.today{border-color:rgba(37,87,214,.32);box-shadow:0 0 0 3px rgba(37,87,214,.08)}
.calendar-day.checked span{color:var(--success)}
.checkin-empty{background:#f8fbff;border:1px dashed var(--line);border-radius:20px;padding:18px;color:var(--muted);display:grid;gap:6px}
.activity-timeline{display:grid;gap:12px;margin-top:12px}
.activity-item{display:grid;grid-template-columns:16px minmax(0,1fr);gap:12px;align-items:start}
.activity-dot{width:12px;height:12px;border-radius:50%;background:var(--page-banner);margin-top:6px;box-shadow:0 0 0 6px rgba(37,87,214,.08)}
.activity-main{background:#f8fbff;border:1px solid var(--line);border-radius:18px;padding:14px 16px;display:grid;gap:6px;box-shadow:0 10px 20px rgba(15,23,42,.04)}
.activity-head{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;align-items:center}
.activity-head strong{font-size:.98rem}
.activity-head span{font-size:.82rem;color:var(--muted);font-weight:700}
.activity-main p{margin:0;color:var(--muted);line-height:1.6}
.profile-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.profile-form-grid .profile-avatar-input{grid-column:1/-1}
.profile-form-grid button{grid-column:1/-1}
.profile-card.empty-profile{display:grid;gap:12px;align-items:start}
.profile-card.empty-profile .profile-actions{display:flex;flex-wrap:wrap;gap:10px}
.settings-links .panel{display:grid;gap:12px}
.guest-dashboard{display:grid;gap:14px}
.guest-dashboard .mission-actions{justify-content:flex-start}
.page-banner-profile .banner-head,.page-banner-settings .banner-head{padding-bottom:24px}
@media (max-width: 1100px){
  .profile-layout{grid-template-columns:1fr}
  .dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dashboard-grid.compact{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width: 760px){
  .dashboard-grid,.dashboard-grid.compact,.profile-form-grid{grid-template-columns:1fr}
  .mission-card{flex-direction:column}
  .mission-actions{justify-content:flex-start;min-width:0}
  .checkin-calendar{grid-template-columns:repeat(4,minmax(0,1fr))}
  .activity-item{grid-template-columns:12px minmax(0,1fr)}
}
@media (max-width: 520px){
  .checkin-calendar{grid-template-columns:repeat(2,minmax(0,1fr))}
}


/* Stage 7 adaptive learning */
.chip-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}
.lesson-list{display:grid;gap:12px}
.chapter-card-emphasis{position:relative}
.chapter-top-emphasis{
  display:flex;
  gap:14px;
  align-items:flex-start;
  justify-content:space-between;
  padding:16px 16px 14px;
  border:1px solid rgba(37,87,214,.12);
  border-radius:20px;
  background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(239,245,255,.98));
  box-shadow:0 14px 28px rgba(37,87,214,.08);
}
.chapter-copy{display:grid;gap:8px;min-width:0}
.chapter-badge{font-size:.84rem}
.chapter-top-emphasis h3{margin:0;font-size:1.28rem;line-height:1.3;color:var(--text)}
.chapter-summary{margin:0;color:#41506a;line-height:1.72;font-weight:500}
.chapter-order{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:10px 14px;background:linear-gradient(135deg,rgba(37,87,214,.14),rgba(37,87,214,.08));color:#173e9a;font-weight:900;font-size:.98rem;white-space:nowrap;box-shadow:inset 0 0 0 1px rgba(37,87,214,.10)}
.chapter-focus{margin:0;padding-left:18px;color:var(--text);display:grid;gap:6px;font-weight:600}
.chapter-focus li{line-height:1.65}
.chapter-card .badge.soft{background:rgba(37,87,214,.12);color:#1d4ed8;font-weight:800}
.lesson-card{background:linear-gradient(180deg,#ffffff,#f7fbff);border:1px solid var(--line);border-radius:22px;padding:14px;display:grid;gap:12px;box-shadow:var(--shadow-soft)}
.lesson-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.lesson-label{font-weight:900;font-size:1.06rem;line-height:1.45;color:var(--text)}
.lesson-summary{color:#3e4b61 !important;font-weight:600}
.lesson-badge{padding:7px 11px;border-radius:999px;background:rgba(37,87,214,.12);color:#173e9a;font-weight:900;font-size:.8rem;white-space:nowrap;box-shadow:inset 0 0 0 1px rgba(37,87,214,.08)}
.lesson-focus{display:flex;flex-wrap:wrap;gap:8px}
.lesson-focus .chip{font-weight:700}
.lesson-actions{display:flex;flex-wrap:wrap;gap:10px}
.quiz-lesson-tag{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;margin-right:8px;background:rgba(37,87,214,.1);color:#1d4ed8;font-weight:900;font-size:.72rem}
.quiz-open .quiz-overlay{background:linear-gradient(180deg,rgba(245,248,255,.96),rgba(235,243,255,.98))}
.quiz-open .quiz-shell{background:linear-gradient(180deg,#ffffff,#f8fbff)}
.quiz-open .quiz-q{background:#fff}
.quiz-open .quiz-stem,.quiz-open .quiz-topic{color:#18263b}
.quiz-open .quiz-option{background:#fff;color:#17324f}
.quiz-open .timer{background:linear-gradient(135deg,#0f766e,#2563eb);box-shadow:0 14px 30px rgba(15,118,110,.18)}


/* =========================
   Stage 8: bug sweep + chat/auth polish
   ========================= */
body.modal-open{overflow:hidden}
.nav-more-wrap:focus-within .nav-more-menu,
.nav-more-wrap:hover .nav-more-menu{display:grid}
.nav-more-menu{z-index:150}
.nav-more-menu button{width:100%;text-align:left}

.chatPanel{
  width:min(620px,calc(100vw - 24px));
}
.chatPanel .chatBody{
  gap:16px;
}
.chatPanel .chat-intro{
  display:grid;
  gap:10px;
  border:1px solid rgba(37,87,214,.12);
  background:linear-gradient(180deg,#ffffff,#f6f9ff);
  border-radius:24px;
  padding:18px;
  box-shadow:var(--shadow-soft);
}
.chatPanel .chat-intro h3{
  margin:0;
  font-size:1.12rem;
}
.chatPanel .chat-intro p{
  margin:0;
  color:#30435d;
  line-height:1.75;
}
.chatPanel .faq-answer-stage{
  display:grid;
  gap:12px;
  border:1px solid rgba(37,87,214,.14);
  background:linear-gradient(180deg,#f8fbff,#eef4ff);
  border-radius:24px;
  padding:20px;
  box-shadow:var(--shadow-soft);
}
.chatPanel .faq-answer-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.chatPanel .faq-answer-stage h3{
  margin:0;
  font-size:1.25rem;
  line-height:1.45;
}
.chatPanel .faq-answer-stage p{
  margin:0;
  color:#1f2f46;
  line-height:1.95;
  font-size:1.02rem;
}
.chatPanel .faq-related{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.chatPanel .chip-btn{
  border:1px solid rgba(37,87,214,.14);
  background:#fff;
  color:#1b3f9a;
  padding:8px 12px;
  border-radius:999px;
  font-weight:800;
  cursor:pointer;
}
.chatPanel .faq-list{
  display:grid;
  gap:12px;
}
.chatPanel .faq-card{
  width:100%;
  border:1px solid rgba(37,87,214,.14);
  background:#fff;
  border-radius:18px;
  padding:14px 16px;
  display:grid;
  gap:8px;
  cursor:pointer;
  text-align:left;
  box-shadow:var(--shadow-soft);
  transition:.18s ease;
}
.chatPanel .faq-card:hover,
.chatPanel .faq-card.active{
  background:var(--brand-soft);
  border-color:rgba(37,87,214,.24);
  transform:translateY(-1px);
}
.chatPanel .faq-card-group{
  display:inline-flex;
  align-items:center;
  width:max-content;
  background:rgba(37,87,214,.10);
  color:#1d4ed8;
  border-radius:999px;
  padding:5px 10px;
  font-size:.75rem;
  font-weight:900;
}
.chatPanel .faq-card-title{
  font-weight:900;
  line-height:1.6;
  color:var(--text);
  font-size:1rem;
}
.chatPanel .faq-card-cta{
  font-size:.84rem;
  color:var(--muted);
  font-weight:700;
}

/* Stage 9 enhancements */
.roadmap-list .roadmap-note{color:#344862;line-height:1.7}
.roadmap-list .roadmap-video{background:#f8fbff;border:1px solid rgba(37,87,214,.10);border-radius:18px;padding:14px}
.roadmap-list .roadmap-video .small{color:#1f3f84;font-weight:900}
.roadmap-list .roadmap-video p{margin:6px 0 0;color:#4a5d7d;line-height:1.65}
.quiz-result .panel{padding:18px}
.quiz-result .panel h3{margin-top:0}
.review-item{border:1px solid rgba(37,87,214,.12);background:#fff;border-radius:18px;padding:14px;display:grid;gap:8px;box-shadow:var(--shadow-soft)}
.review-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.review-item p{margin:0;line-height:1.7}
.quiz-action-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}

.auth-modal .auth-body{
  margin-top:12px;
}
.auth-modal .auth-form-card{
  border:1px solid rgba(37,87,214,.12);
  border-radius:24px;
  background:linear-gradient(180deg,#ffffff,#f8fbff);
  box-shadow:var(--shadow-soft);
  padding:18px;
  display:grid;
  gap:14px;
}
.auth-modal .auth-hero{
  display:grid;
  gap:8px;
}
.auth-modal .auth-hero h3{
  margin:0;
  font-size:1.28rem;
}
.auth-modal .auth-hero p{
  margin:0;
  color:var(--muted);
  line-height:1.7;
}
.auth-modal .auth-footnote{
  font-size:.9rem;
  color:var(--muted);
  line-height:1.6;
}

.quiz-overlay{
  background:linear-gradient(180deg,#f8fbff,#ecf3ff);
}
.quiz-open .quiz-overlay{
  background:linear-gradient(180deg,rgba(246,250,255,.98),rgba(236,244,255,.98));
}
.quiz-open .quiz-shell{
  background:linear-gradient(180deg,#ffffff,#f8fbff);
}


/* Stage 8 recovery patch: legacy chatbot replaced with Scholar AI */
.legacy-chatbot{display:none !important}


/* Stage 9 recovery patch: lesson detail modal */
.lesson-modal-box{max-width:min(920px, calc(100vw - 24px));}
.lesson-detail-shell{display:grid;gap:16px;}
.lesson-detail-grid{display:grid;gap:12px;}
.lesson-detail-head{display:grid;gap:8px;}
.lesson-detail-focus-title{font-size:1rem;font-weight:900;color:var(--text);letter-spacing:-.01em}
.lesson-detail-title{margin:0;font-size:1.45rem;line-height:1.25;}
.lesson-detail-desc{margin:0;color:var(--muted);line-height:1.75;}
.lesson-detail-meta{display:flex;flex-wrap:wrap;gap:8px;}
.lesson-detail-actions{display:flex;flex-wrap:wrap;gap:10px;}
#lessonModal .closeX{background:linear-gradient(135deg,#ef4444,#dc2626);color:#fff;box-shadow:0 12px 24px rgba(239,68,68,.28);}
#lessonModal .closeX:hover{background:linear-gradient(135deg,#dc2626,#b91c1c);color:#fff;transform:translateY(-1px);}
.page-banner-improve .banner-head{max-width:100%}
.page-banner-improve .banner-head .badge{background:rgba(255,255,255,.22);color:#fff;font-weight:900}
.page-banner-improve .banner-head h1{font-size:clamp(2rem,4.4vw,3.55rem);line-height:1.08;letter-spacing:-.03em}
.page-banner-improve .banner-head p{max-width:960px;font-weight:600;line-height:1.78}



/* ===== Stage 11: Prompt Studio refinements ===== */
.prompt-studio-note{
  display:grid;
  gap:16px;
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(249,252,255,.98));
  border:1px solid rgba(37,87,214,.10);
}
.prompt-studio-note h3{
  margin:2px 0 0;
}
.prompt-studio-note p{margin:0;line-height:1.7;color:var(--muted)}


/* Stage 13: Prompt Studio + ChatGPT enhancements */
.prompt-workbench{display:grid;gap:16px}
.prompt-workbench-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.prompt-workbench-grid .wide{grid-column:1 / -1}
.prompt-workbench .tool-actions{align-items:center}
.prompt-workbench .chip-row{justify-content:flex-end}
.prompt-sample-card{display:grid;gap:12px}
.prompt-sample-card textarea.prompt-sample-text{min-height:220px;resize:vertical;line-height:1.6}
.chatgpt-workflow-stack{display:grid;gap:14px}
.workflow-step{display:grid;grid-template-columns:64px minmax(0,1fr);gap:14px;align-items:start;background:var(--surface);border:1px solid var(--line);border-radius:24px;padding:16px;box-shadow:var(--shadow-soft)}
.workflow-step .step-index{width:54px;height:54px;border-radius:18px;display:grid;place-items:center;font-weight:900;font-size:1.1rem;color:#fff;background:var(--page-banner);box-shadow:0 12px 24px rgba(37,87,214,.22)}
.workflow-step h3{margin:0 0 6px;font-size:1.06rem}
.workflow-step p{margin:0;color:var(--muted);line-height:1.7}
.cookbook-stack{gap:16px}


.chatgpt-article-body {
  display: grid;
  gap: 0.85rem;
}

.chatgpt-article-body p {
  margin: 0;
}

.chatgpt-article-body ul,
.chatgpt-article-body ol {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.45rem;
}

.chatgpt-flow-diagram {
  display: grid;
  gap: 0.35rem;
  text-align: center;
  padding: 0.75rem 0.9rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.06);
}

.chatgpt-flow-arrow {
  font-weight: 700;
  opacity: 0.9;
}

.chatgpt-scroll-cta {
  display: flex;
  justify-content: center;
  padding: 0.25rem 0 0.35rem;
}

.chatgpt-scroll-btn {
  position: relative;
  animation: chatgptPulse 1.9s ease-in-out infinite;
}

@keyframes chatgptPulse {
  0%, 100% { transform: translateY(0); box-shadow: inherit; }
  50% { transform: translateY(-1px); filter: brightness(1.05); }
}

.brand-mark{width:44px;height:44px;object-fit:contain;display:block;flex-shrink:0}
.brand-mark-sm{width:42px;height:42px;border-radius:14px}


/* Layout updates for chapter and roadmap video panels — Balanced proportions */
.content-stack.narrow{
  max-width:1180px;
  width:min(100%,1180px);
}
.chapter-card{
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(320px,400px);
  gap:24px;
  align-items:start;
  background:var(--surface);
  border:1px solid var(--line);
  border-left:6px solid var(--subject-color, var(--brand));
  border-radius:28px;
  box-shadow:var(--shadow-soft);
  padding:24px;
  box-sizing:border-box;
  overflow:hidden;
}
.chapter-main{
  display:flex;
  flex-direction:column;
  gap:16px;
  min-width:0;
}
.chapter-video{
  background:linear-gradient(180deg,#f8fbff,#edf4ff);
  border:1px solid rgba(37,87,214,.14);
  border-radius:22px;
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:10px;
  align-self:start;
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
  box-shadow:0 4px 16px rgba(37,87,214,.04);
}
.chapter-video .iframe-box,
.chapter-video .iframe-box.medium{
  width:100% !important;
  max-width:100% !important;
  aspect-ratio:16/9 !important;
  height:auto !important;
  min-height:0 !important;
  border-radius:14px;
  overflow:hidden;
  background:#0f172a;
  box-shadow:0 8px 24px rgba(15,23,42,.12);
  margin:0;
}
.chapter-video iframe{
  width:100% !important;
  height:100% !important;
  border:0;
  display:block;
}
.chapter-video.placeholder{
  min-height:180px;
}
.roadmap-item{
  grid-template-columns:72px minmax(0,1fr) minmax(300px,360px);
  align-items:start;
}
.roadmap-main{
  display:grid;
  gap:10px;
  min-width:0;
}
.roadmap-note{
  background:#f7faff;
  border:1px dashed rgba(37,87,214,.16);
  padding:10px 12px;
  border-radius:14px;
  color:#3b4b68;
}
.roadmap-video{
  margin-top:0;
  background:linear-gradient(180deg,#f8fbff,#eef4ff);
  border:1px solid rgba(37,87,214,.12);
  border-radius:20px;
  padding:14px;
  display:grid;
  gap:8px;
}
.roadmap-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  min-width:0;
}
.roadmap-actions .btn{
  min-width:fit-content;
}
.lesson-detail-notes{
  display:grid;
  gap:8px;
}
.lesson-detail-notes p{
  margin:0;
}
@media (max-width: 1024px){
  .chapter-card,
  .roadmap-item{
    grid-template-columns:1fr;
    gap:20px;
    padding:18px;
  }
  .chapter-video,
  .roadmap-video{
    width:100%;
  }
}

/* =========================================================================
   PREMIUM LOGIN REDESIGN — split illustration + form (final, authoritative)
   Everything below is scoped to .auth-modal / its new classes and is safe
   to sit after older auth-* fragments above: equal-or-higher specificity +
   later source order means these rules win wherever they overlap.
   ========================================================================= */

.auth-modal .modalBox,
.auth-modal .auth-modal-box{
  font-family:'Plus Jakarta Sans', Inter, system-ui, sans-serif;
  width:min(1080px, 100%);
  height:clamp(480px, 92vh, 800px);
  max-height:clamp(480px, 92vh, 800px);
  padding:0;
  border:0;
  border-radius:32px;
  overflow:hidden;
  box-shadow:0 40px 90px rgba(9,16,34,.34), 0 4px 14px rgba(9,16,34,.10);
  position:relative;
  background:var(--surface);
}
@keyframes authModalIn{
  from{ opacity:0; transform:translateY(10px) scale(.98); }
  to{ opacity:1; transform:translateY(0) scale(1); }
}
.auth-modal.open .modalBox{ animation:authModalIn .32s cubic-bezier(.16,1,.3,1); }

/* =========================================================================
   AI SCHOLAR — ULTRA-MODERN AUTHENTICATION MODAL (NEXT-GEN UI/UX)
   ========================================================================= */

#authModal .modalBox,
#authModal .auth-modal-box {
  width: min(940px, 94vw);
  max-width: 940px;
  height: min(650px, 92vh);
  max-height: 650px;
  border-radius: 28px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 32px 80px -16px rgba(15, 23, 42, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  background: #ffffff;
  position: relative;
  animation: authModalPop 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes authModalPop {
  0% { opacity: 0; transform: scale(0.94) translateY(16px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.authCloseBtn {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 30;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(226, 232, 240, 0.8);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #475569;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.authCloseBtn:hover {
  background: #f1f5f9;
  color: #0f172a;
  transform: rotate(90deg) scale(1.06);
}

#authModal .auth-body {
  margin: 0;
  padding: 0;
  display: block;
  height: 100%;
}

.auth-shell {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  height: 100%;
  min-height: 0;
}

/* ---------------- LEFT PANEL: MODERN HERO SHOWCASE ---------------- */
.auth-illustration {
  position: relative;
  overflow: hidden;
  height: 100%;
  color: #ffffff;
  padding: 40px 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(145deg, #091224 0%, #0f2347 45%, #1e3a8a 100%);
}

.auth-illustration::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 20% 15%, rgba(59, 130, 246, 0.35) 0%, transparent 50%),
    radial-gradient(circle at 85% 75%, rgba(245, 158, 11, 0.2) 0%, transparent 45%),
    radial-gradient(rgba(255, 255, 255, 0.12) 1.2px, transparent 1.2px);
  background-size: 100% 100%, 100% 100%, 24px 24px;
  pointer-events: none;
}

.auth-illust-top {
  position: relative;
  z-index: 2;
}

.auth-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.auth-brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: #ffffff;
  padding: 6px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25), 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.auth-brand-word {
  font-weight: 800;
  font-size: 1.28rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 30%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-illust-tagline {
  margin: 0;
  color: rgba(224, 231, 255, 0.85);
  font-size: 0.92rem;
  line-height: 1.55;
  font-weight: 500;
}

/* Interactive Centerpiece Glass Card */
.auth-illust-scene {
  position: relative;
  z-index: 2;
  margin: 18px 0;
  display: grid;
  place-items: center;
}

.illust-card-main {
  width: 100%;
  max-width: 290px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  display: grid;
  gap: 14px;
  transform: translateY(-2px);
  transition: transform 0.3s ease;
}

.illust-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.illust-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(245, 158, 11, 0.35);
}

.illust-card-head-text strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
}

.illust-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: #86efac;
  font-weight: 600;
}

.illust-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
  display: inline-block;
  animation: authBeacon 2s infinite ease-in-out;
}

@keyframes authBeacon {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.illust-bars {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 60px;
  padding: 4px 0;
}

.illust-bars span {
  flex: 1;
  height: var(--h);
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #60a5fa, #2563eb);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
  transition: height 0.4s ease;
}

.illust-bars span:last-child {
  background: linear-gradient(180deg, #fbbf24, #d97706);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.illust-card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 10px;
}

.illust-card-foot svg {
  color: #fbbf24;
}

/* Floating feature badges */
.illust-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #f8fafc;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}

.illust-chip svg { color: #38bdf8; }
.illust-chip-shield { top: -6px; right: -4px; transform: rotate(-3deg); }
.illust-chip-ai { bottom: 12px; left: -10px; transform: rotate(3deg); }
.illust-chip-quiz { bottom: -12px; right: 8px; transform: rotate(-2deg); }

.auth-trust-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.auth-trust-list li {
  display: flex;
  gap: 12px;
  align-items: center;
}

.auth-trust-list li > svg {
  flex-shrink: 0;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 5px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.auth-trust-list strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: #ffffff;
}

.auth-trust-list span {
  display: block;
  font-size: 0.76rem;
  color: rgba(226, 232, 240, 0.72);
  line-height: 1.4;
}

/* ---------------- RIGHT PANEL: CRISP & CLEAN FORM ---------------- */
.auth-form-panel {
  background: #ffffff;
  overflow-y: auto;
  height: 100%;
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
}

.auth-form-inner {
  max-width: 380px;
  width: 100%;
  margin: auto;
  display: grid;
  gap: 16px;
}

/* Modern Sliding Segmented Control Tabs */
.auth-tabs-modern {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  gap: 4px;
}

.auth-tabs-modern .auth-tab {
  flex: 1;
  padding: 9px 8px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  font-weight: 700;
  font-size: 0.84rem;
  color: #64748b;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-tabs-modern .auth-tab:hover {
  color: #1e293b;
}

.auth-tabs-modern .auth-tab.active {
  background: #ffffff;
  color: #1d4ed8;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.06);
}

/* Header typography */
.auth-head h2 {
  margin: 0 0 6px;
  font-size: 1.44rem;
  letter-spacing: -0.02em;
  color: #0f172a;
  font-weight: 800;
}

.auth-head p {
  margin: 0;
  color: #64748b;
  line-height: 1.55;
  font-size: 0.88rem;
}

/* Google OAuth Button */
.auth-social-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  border-radius: 14px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 0.88rem;
  color: #334155;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.03);
  transition: all 0.2s ease;
}

.auth-social-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.auth-google-mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #94a3b8;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

/* Form & Input Groups */
.auth-form {
  display: grid;
  gap: 12px;
}

.auth-field {
  display: grid;
  gap: 5px;
}

.auth-field-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
}

.auth-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid #e2e8f0;
  border-radius: 13px;
  background: #f8fafc;
  padding: 0 12px;
  transition: all 0.2s ease;
  position: relative;
}

.auth-input-wrap:focus-within {
  border-color: #3b82f6;
  background: #ffffff;
  box-shadow: 0 0 0 3.5px rgba(59, 130, 246, 0.14);
}

.auth-input-icon {
  color: #94a3b8;
  display: flex;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.auth-input-wrap:focus-within .auth-input-icon {
  color: #2563eb;
}

.auth-input-wrap input,
.auth-input-wrap select {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 10px 2px;
  font: inherit;
  font-size: 0.88rem;
  color: #0f172a;
  outline: none;
  min-width: 0;
}

.auth-input-wrap select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 20px;
}

.auth-input-wrap:has(select)::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.auth-eye-btn {
  border: 0;
  background: transparent;
  padding: 6px;
  margin: 0 -4px 0 0;
  display: flex;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 8px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.auth-eye-btn:hover {
  color: #1e293b;
  background: rgba(15, 23, 42, 0.05);
}

.auth-field.is-invalid .auth-input-wrap {
  border-color: #ef4444;
  background: #fff5f5;
  box-shadow: 0 0 0 3.5px rgba(239, 68, 68, 0.12);
}

.auth-field.is-invalid .auth-input-icon {
  color: #ef4444;
}

.auth-field-msg {
  font-size: 0.74rem;
  color: #dc2626;
  font-weight: 600;
  margin-top: 1px;
}

.auth-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #475569;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.auth-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
  cursor: pointer;
  border-radius: 4px;
}

.auth-link,
.auth-switch-link {
  display: inline;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
  color: #2563eb;
  font-weight: 700;
  font-size: 0.82rem;
  transition: color 0.15s ease;
}

.auth-link:hover,
.auth-switch-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.auth-switch-link {
  font-weight: 800;
  font-size: 0.86rem;
}

/* Primary Action Buttons */
.auth-submit-btn {
  width: 100%;
  border: 0;
  cursor: pointer;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 800;
  font-size: 0.94rem;
  color: #ffffff;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #4f46e5 100%);
  box-shadow: 0 14px 28px -6px rgba(37, 99, 235, 0.42);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.auth-submit-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: 0.5s;
}

.auth-submit-btn:hover::after {
  left: 100%;
}

.auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -6px rgba(37, 99, 235, 0.5);
}

.auth-submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 8px 16px -4px rgba(37, 99, 235, 0.4);
}

.auth-submit-btn .auth-ic-arrow {
  transition: transform 0.2s ease;
}

.auth-submit-btn:hover .auth-ic-arrow {
  transform: translateX(4px);
}

.auth-submit-btn.soft {
  background: linear-gradient(135deg, #334155, #1e293b);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.25);
}

.auth-security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 4px 0 0;
  font-size: 0.74rem;
  color: #64748b;
  line-height: 1.4;
  text-align: center;
}

.auth-security-note svg {
  flex-shrink: 0;
  color: #10b981;
}

.auth-switch {
  margin: 4px 0 0;
  text-align: center;
  font-size: 0.86rem;
  color: #64748b;
}

/* ---------------- RESPONSIVE BREAKPOINTS ---------------- */
@media (max-width: 900px) {
  #authModal .modalBox,
  #authModal .auth-modal-box {
    height: auto;
    max-height: 94vh;
    border-radius: 24px;
  }
  #authModal .auth-body {
    height: auto;
    overflow-y: auto;
    max-height: 94vh;
  }
  .auth-shell {
    grid-template-columns: 1fr;
    height: auto;
  }
  .auth-illustration {
    height: auto;
    padding: 28px 24px 22px;
    gap: 16px;
  }
  .auth-illust-scene {
    display: none;
  }
  .auth-illust-tagline {
    max-width: none;
  }
  .auth-trust-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
  }
  .auth-trust-list li {
    flex: 1 1 140px;
  }
  .auth-trust-list li span {
    display: none;
  }
  .auth-form-panel {
    height: auto;
    overflow-y: visible;
    padding: 28px 24px 32px;
  }
  .auth-form-inner {
    max-width: none;
  }
}

@media (max-width: 520px) {
  .auth-field-grid {
    grid-template-columns: 1fr;
  }
  .auth-form-panel {
    padding: 22px 18px 26px;
  }
  .auth-illustration {
    padding: 22px 18px 16px;
  }
  .authCloseBtn {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
  }
}


/* =========================================================================
   PROMPT TOOL v2 — Giao diện Prompt Engineering 4 bước tối ưu
   ========================================================================= */
.prompt-studio{ display:grid; gap:26px; }

/* ---- Stepper bar ---- */
.prompt-stepper-bar{
  display:flex; align-items:center; justify-content:space-between;
  background:#fff; border:1px solid var(--line); border-radius:20px;
  padding:16px 24px; box-shadow:var(--shadow-soft); margin-bottom:4px;
}
.prompt-stepper-item{
  display:flex; align-items:center; gap:10px; opacity:0.6; transition:.2s ease;
}
.prompt-stepper-item.completed{ opacity:1; }
.prompt-stepper-circle{
  width:30px; height:30px; border-radius:50%; display:grid; place-items:center;
  background:#f1f5f9; color:#64748b; font-weight:800; font-size:0.85rem;
  border:2px solid #cbd5e1; transition:.2s ease;
}
.prompt-stepper-item.completed .prompt-stepper-circle{
  background:var(--brand, #4f46e5); color:#fff; border-color:var(--brand, #4f46e5);
  box-shadow:0 4px 12px rgba(79,70,229,0.35);
}
.prompt-stepper-text{ font-size:0.88rem; font-weight:700; color:#334155; }
.prompt-stepper-divider{
  flex:1; height:2px; background:#e2e8f0; margin:0 14px; transition:.2s ease;
}
.prompt-stepper-divider.active{ background:var(--brand, #4f46e5); }

/* ---- Step containers ---- */
.prompt-step{
  background:#fff; border:1px solid var(--line); border-radius:24px;
  padding:28px 30px; box-shadow:var(--shadow-soft); display:grid; gap:20px;
  animation:promptStepIn .35s ease both; position:relative;
}
@keyframes promptStepIn{ from{ opacity:0; transform:translateY(10px);} to{ opacity:1; transform:translateY(0);} }

.prompt-step-head{ display:flex; align-items:flex-start; gap:16px; border-bottom:1px solid #f1f5f9; padding-bottom:16px; }
.prompt-step-num{
  flex-shrink:0; width:38px; height:38px; border-radius:14px; display:grid; place-items:center;
  background:linear-gradient(135deg, var(--cat,var(--brand)), color-mix(in srgb, var(--cat,var(--brand)) 70%, #000 12%));
  color:#fff; font-weight:900; font-size:1.05rem; box-shadow:0 8px 20px color-mix(in srgb, var(--cat,var(--brand)) 40%, transparent);
}
.prompt-step-head h3{ margin:0 0 4px; font-size:1.18rem; font-weight:800; letter-spacing:-.01em; color:#1e293b; }
.prompt-step-head p{ margin:0; color:var(--muted); font-size:.92rem; line-height:1.55; }

/* ---- Step 1: Category Picker ---- */
.prompt-cat-nav{ display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:14px; }
.prompt-cat-pill{
  display:flex; align-items:flex-start; gap:12px; text-align:left; cursor:pointer;
  border:1.5px solid var(--line); border-radius:20px; padding:16px; background:#fff;
  transition:.2s cubic-bezier(.16,1,.3,1); position:relative;
}
.prompt-cat-pill:hover{
  border-color:var(--cat); transform:translateY(-3px);
  box-shadow:0 12px 24px color-mix(in srgb, var(--cat) 18%, transparent);
}
.prompt-cat-pill.active{
  border-color:var(--cat); background:var(--cat-soft);
  box-shadow:0 12px 28px color-mix(in srgb, var(--cat) 24%, transparent);
}
.prompt-cat-pill-icon{
  flex-shrink:0; width:42px; height:42px; border-radius:14px; display:grid; place-items:center;
  background:var(--cat-soft); color:var(--cat); transition:.2s ease;
}
.prompt-cat-pill.active .prompt-cat-pill-icon{
  background:var(--cat); color:#fff; box-shadow:0 6px 16px color-mix(in srgb, var(--cat) 40%, transparent);
}
.prompt-cat-pill-text{ display:grid; gap:3px; min-width:0; flex:1; }
.prompt-cat-head{ display:flex; align-items:center; justify-content:space-between; gap:6px; }
.prompt-cat-head strong{ font-size:.95rem; font-weight:800; color:var(--text); }
.prompt-cat-count{
  font-size:.7rem; font-weight:800; padding:2px 8px; border-radius:999px;
  background:#f1f5f9; color:#64748b;
}
.prompt-cat-pill.active .prompt-cat-count{
  background:color-mix(in srgb, var(--cat) 20%, #fff); color:var(--cat);
}
.prompt-cat-pill-text small{ font-size:.78rem; color:var(--muted); line-height:1.45; }
.prompt-cat-pill.active .prompt-cat-pill-text strong{ color:color-mix(in srgb, var(--cat) 80%, #000 10%); }

/* ---- Step 2: Template Cards ---- */
.prompt-template-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:16px; }
.prompt-template-card{
  text-align:left; cursor:pointer; display:grid; gap:10px; align-content:start;
  border:1.5px solid var(--line); border-radius:20px; padding:18px 18px 16px; background:#fff;
  position:relative; overflow:hidden; transition:.2s cubic-bezier(.16,1,.3,1);
}
.prompt-template-card::before{
  content:""; position:absolute; inset:0 0 auto 0; height:4px; background:var(--cat); opacity:.45;
}
.prompt-template-card:hover{
  transform:translateY(-4px); box-shadow:0 16px 30px color-mix(in srgb, var(--cat) 16%, transparent);
  border-color:color-mix(in srgb, var(--cat) 50%, var(--line));
}
.prompt-template-card.active{
  border-color:var(--cat); background:var(--cat-soft);
  box-shadow:0 16px 34px color-mix(in srgb, var(--cat) 25%, transparent);
}
.prompt-template-card.active::before{ opacity:1; }
.prompt-template-top{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.prompt-template-type{
  font-size:.7rem; font-weight:800; text-transform:uppercase; letter-spacing:.04em;
  color:var(--cat); background:var(--cat-soft); padding:3px 10px; border-radius:999px;
}
.prompt-template-check{
  font-size:.75rem; font-weight:800; color:var(--cat); opacity:0.85;
}
.prompt-template-card.active .prompt-template-check{
  background:var(--cat); color:#fff; padding:2px 8px; border-radius:999px; opacity:1;
}
.prompt-template-card h4{ margin:0; font-size:1.02rem; font-weight:800; color:var(--text); line-height:1.35; }
.prompt-template-card p{ margin:0; font-size:.86rem; color:var(--muted); line-height:1.5; }
.prompt-template-cta{
  margin-top:6px; display:inline-flex; align-items:center; gap:5px; font-size:.84rem; font-weight:800;
  color:var(--cat);
}
.prompt-template-card.active .prompt-template-cta{ color:color-mix(in srgb, var(--cat) 80%, #000 15%); }

/* ---- Step 3: Custom Fields & Goal Banner ---- */
.prompt-goal-banner{
  display:flex; align-items:flex-start; gap:12px; margin:0; padding:14px 18px; border-radius:16px;
  background:var(--cat-soft); border:1px solid color-mix(in srgb, var(--cat) 25%, transparent);
}
.prompt-goal-icon{ font-size:1.25rem; line-height:1; }
.prompt-goal-banner strong{ display:block; font-size:.88rem; color:var(--cat); margin-bottom:2px; }
.prompt-goal-banner p{ margin:0; font-size:.88rem; color:#334155; line-height:1.5; }

.prompt-fields{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.prompt-fields .prompt-field:has(textarea){ grid-column:1 / -1; }
.prompt-field{ display:grid; gap:8px; }
.prompt-field-label{ display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; }
.prompt-field-label span{ font-size:.88rem; font-weight:800; color:#1e293b; }
.prompt-field-tag{ font-size:.75rem; color:var(--muted); background:#f1f5f9; padding:2px 8px; border-radius:6px; }

.prompt-field input,
.prompt-field textarea{
  border:1.5px solid #cbd5e1; border-radius:14px; padding:12px 14px; font-size:.92rem;
  background:#fff; transition:.18s ease; font-family:inherit; color:#1e293b;
}
.prompt-field input:focus,
.prompt-field textarea:focus{
  border-color:var(--brand, #4f46e5); outline:none;
  box-shadow:0 0 0 3px rgba(79,70,229,0.15);
}

.prompt-step3-actions{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.prompt-generate-btn{
  justify-self:start; display:inline-flex; align-items:center; gap:9px;
  border:none; border-radius:999px; padding:14px 28px; font-size:1rem; font-weight:800; color:#fff;
  cursor:pointer; background:linear-gradient(135deg, var(--cat,var(--brand)), color-mix(in srgb, var(--cat,var(--brand)) 65%, #000 18%));
  box-shadow:0 14px 28px color-mix(in srgb, var(--cat,var(--brand)) 38%, transparent);
  transition:.2s cubic-bezier(.16,1,.3,1);
}
.prompt-generate-btn svg{ flex-shrink:0; }
.prompt-generate-btn:hover{
  transform:translateY(-2px) scale(1.02);
  box-shadow:0 18px 36px color-mix(in srgb, var(--cat,var(--brand)) 48%, transparent);
}
.prompt-generate-btn:active{ transform:translateY(0); }

/* ---- Step 4: Result Card & Anatomy ---- */
.prompt-step-result{ position:relative; }
.prompt-result-empty{
  display:grid; justify-items:center; text-align:center; gap:10px; padding:40px 20px;
  border:2px dashed color-mix(in srgb, var(--cat) 45%, #cbd5e1); border-radius:24px;
  background:var(--cat-soft); color:color-mix(in srgb, var(--cat) 70%, #000 12%);
}
.prompt-result-empty-icon{
  width:58px; height:58px; border-radius:18px; display:grid; place-items:center;
  background:#fff; color:var(--cat); box-shadow:0 8px 20px color-mix(in srgb, var(--cat) 20%, transparent);
}
.prompt-result-empty h4{ margin:4px 0 0; font-size:1.05rem; font-weight:800; color:var(--text); }
.prompt-result-empty p{ margin:0; max-width:480px; font-size:.9rem; color:var(--muted); line-height:1.6; }
.prompt-result-empty strong{ color:color-mix(in srgb, var(--cat) 75%, #000 10%); }

.prompt-result-ready{
  display:grid; gap:18px; padding:24px 26px; border-radius:24px;
  background:#fff; border:1.5px solid var(--cat); border-left-width:6px;
  box-shadow:0 18px 38px color-mix(in srgb, var(--cat) 18%, transparent);
  animation:promptStepIn .3s ease both;
}
.prompt-result-head{ display:flex; align-items:flex-start; gap:14px; }
.prompt-result-check{
  flex-shrink:0; width:32px; height:32px; border-radius:50%; display:grid; place-items:center;
  background:var(--cat); color:#fff; box-shadow:0 6px 16px color-mix(in srgb, var(--cat) 35%, transparent);
}
.prompt-result-head strong{ display:block; font-size:1.08rem; font-weight:800; color:var(--text); }
.prompt-result-head span{ display:block; font-size:.88rem; color:var(--muted); margin-top:2px; }

.prompt-result-stale-note{
  margin:0; padding:10px 14px; border-radius:14px; font-size:.85rem; font-weight:700;
  color:#92400e; background:#fff7e6; border:1px solid #fde3b0;
}

.prompt-anatomy{
  display:grid; gap:0; border-left:3px solid var(--cat-soft-strong,var(--cat-soft));
  padding-left:18px; margin-left:6px;
}
.prompt-anatomy-row{ position:relative; padding:12px 0; }
.prompt-anatomy-row + .prompt-anatomy-row{ border-top:1px dashed var(--line); }
.prompt-anatomy-row::before{
  content:""; position:absolute; left:-23.5px; top:18px; width:10px; height:10px; border-radius:50%;
  background:var(--cat); box-shadow:0 0 0 3px #fff, 0 0 0 5px var(--cat-soft-strong,var(--cat-soft));
}
.prompt-anatomy-label{
  display:inline-block; font-size:.74rem; font-weight:900; text-transform:uppercase; letter-spacing:.04em;
  color:var(--cat); background:var(--cat-soft); padding:4px 12px; border-radius:999px; margin-bottom:8px;
}
.prompt-anatomy-content{ margin:0; font-size:.95rem; line-height:1.7; color:var(--text); }

.prompt-raw-toggle{ font-size:.88rem; border-top:1px solid #f1f5f9; padding-top:10px; }
.prompt-raw-toggle summary{ cursor:pointer; font-weight:700; color:var(--muted); padding:6px 0; }
.prompt-raw-toggle summary:hover{ color:var(--cat); }
.prompt-raw-toggle textarea{
  margin-top:10px; width:100%; min-height:160px; resize:vertical; line-height:1.65;
  font-family:'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,monospace; font-size:.85rem;
  border:1.5px solid #cbd5e1; border-radius:14px; padding:14px; background:#f8fafc;
}

.prompt-copy-btn{
  display:inline-flex; align-items:center; gap:8px;
  background:linear-gradient(135deg, var(--cat,var(--brand)), color-mix(in srgb, var(--cat,var(--brand)) 65%, #000 18%));
  border:none; padding:12px 22px; border-radius:12px; font-weight:800; color:#fff; cursor:pointer;
}
.prompt-copy-btn.copied{ background:linear-gradient(135deg,#10b981,#059669); }

.prompt-socratic-btn{
  display:inline-flex; align-items:center; gap:8px;
  background:linear-gradient(135deg, #6366f1, #8b5cf6); border:none;
  padding:12px 22px; border-radius:12px; font-weight:800; color:#fff; cursor:pointer;
  box-shadow:0 8px 20px rgba(99,102,241,0.3); transition:.2s ease;
}
.prompt-socratic-btn:hover{ transform:translateY(-2px); box-shadow:0 12px 26px rgba(99,102,241,0.4); }

@media (max-width: 860px){
  .prompt-stepper-bar{ display:none; }
  .prompt-step{ padding:20px; border-radius:20px; }
  .prompt-fields{ grid-template-columns:1fr; }
  .prompt-cat-nav{ grid-template-columns:1fr 1fr; }
  .prompt-template-grid{ grid-template-columns:1fr; }
  .prompt-generate-btn{ width:100%; justify-content:center; }
  .prompt-step3-actions{ flex-direction:column; width:100%; }
  .prompt-step3-actions button{ width:100%; justify-content:center; }
}
@media (max-width: 520px){
  .prompt-cat-nav{ grid-template-columns:1fr; }
}


/* =========================================================================
   QUIZ RESULT SUMMARY — score ring, weak-area breakdown, jump-to-wrong list
   ========================================================================= */
.quiz-result-panel{
  background:#fff; border:1px solid var(--line); border-radius:24px;
  padding:22px; margin-bottom:18px; box-shadow:var(--shadow-soft);
  display:grid; gap:16px; border-left:6px solid var(--muted);
}
.quiz-result-panel.is-great{ border-left-color:var(--success); }
.quiz-result-panel.is-ok{ border-left-color:var(--warning); }
.quiz-result-panel.is-weak{ border-left-color:var(--error); }

.quiz-result-head{ display:flex; align-items:center; gap:18px; flex-wrap:wrap; }
.quiz-score-ring{
  width:78px; height:78px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:baseline; justify-content:center; gap:2px;
  background:var(--brand-soft); color:var(--brand); border:3px solid currentColor;
}
.quiz-result-panel.is-great .quiz-score-ring{ background:rgba(24,165,102,.10); color:var(--success); }
.quiz-result-panel.is-ok .quiz-score-ring{ background:rgba(217,119,6,.10); color:var(--warning); }
.quiz-result-panel.is-weak .quiz-score-ring{ background:rgba(226,75,75,.10); color:var(--error); }
.quiz-score-ring strong{ font-size:1.5rem; font-weight:800; }
.quiz-score-ring span{ font-size:.82rem; font-weight:700; opacity:.75; }

.quiz-result-text{ flex:1; min-width:220px; display:grid; gap:6px; }
.quiz-result-text h3{ margin:0; font-size:1.15rem; }
.quiz-result-text p{ margin:0; color:var(--muted); }
.quiz-result-stats{ display:flex; gap:14px; flex-wrap:wrap; font-size:.86rem; font-weight:700; color:var(--text); margin-top:4px; }

.quiz-result-suggestion{
  background:var(--surface-soft); border-radius:16px; padding:14px 16px; display:grid; gap:8px;
}
.quiz-result-suggestion strong{ font-size:.9rem; }
.quiz-result-suggestion p{ margin:0; color:var(--muted); font-size:.92rem; line-height:1.6; }
.quiz-weak-list{ list-style:none; margin:0; padding:0; display:grid; gap:6px; }
.quiz-weak-list li{ display:flex; justify-content:space-between; gap:10px; font-size:.86rem; background:#fff; border:1px solid var(--line); border-radius:10px; padding:8px 12px; }
.quiz-weak-list li span{ color:var(--error); font-weight:700; flex-shrink:0; }
.quiz-weak-empty{ margin:0; color:var(--success); font-size:.9rem; font-weight:600; }

.quiz-wrong-jump{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:.84rem; color:var(--muted); }
.quiz-jump-chip{
  display:inline-flex; align-items:center; justify-content:center;
  min-width:30px; height:30px; padding:0 8px; border-radius:9px;
  background:rgba(226,75,75,.10); color:var(--error); font-weight:800; font-size:.8rem;
  text-decoration:none; border:1px solid rgba(226,75,75,.18);
}
.quiz-jump-chip:hover{ background:rgba(226,75,75,.18); }

@media (max-width: 640px){
  .quiz-result-head{ flex-direction:column; align-items:flex-start; }
}




/* =========================================================================
   SETTINGS PAGE v2 — thẻ cài đặt rõ ràng hơn + khối "Thông báo học tập" mới
   ========================================================================= */
.settings-layout{ align-items:start; }
.settings-card{
  border-radius:24px; transition:box-shadow .18s ease, transform .18s ease;
}
.settings-card-notif{ --notif:#d97706; --notif-soft:rgba(217,119,6,.10); border-top:4px solid var(--notif); }

.settings-status-pill{
  display:inline-flex; align-items:center; gap:5px; margin-left:9px; vertical-align:middle;
  font-size:.68rem; font-weight:800; text-transform:uppercase; letter-spacing:.03em;
  padding:3px 10px; border-radius:999px; position:relative; top:-2px;
}
.settings-status-pill::before{ content:""; width:6px; height:6px; border-radius:50%; background:currentColor; }
.settings-status-success{ color:#0f8f52; background:rgba(15,143,82,.12); }
.settings-status-info{ color:#2557d6; background:rgba(37,87,214,.10); }
.settings-status-danger{ color:#c0392b; background:rgba(192,57,43,.10); }
.settings-status-muted{ color:#6b7280; background:rgba(107,114,128,.12); }

.settings-notif-state{ display:grid; gap:14px; }
.settings-notif-state > p{ margin:0; color:var(--muted); line-height:1.65; font-size:.92rem; }

.settings-notif-cta{
  justify-self:start; display:inline-flex; align-items:center; gap:9px;
  background:linear-gradient(135deg,#d97706,#b45309); border:none; box-shadow:0 14px 26px rgba(217,119,6,.32);
}
.settings-notif-cta:hover{ transform:translateY(-2px); box-shadow:0 18px 32px rgba(217,119,6,.4); }

.settings-notif-denied p, .settings-notif-unsupported p{
  background:#fff4f2; border:1px solid #fbd6ce; border-radius:14px; padding:12px 14px; color:#9a3412; font-size:.88rem;
}
.settings-notif-unsupported p{ background:#f4f5f7; border-color:var(--line); color:#4b5563; }

.settings-toggle-row{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:12px 14px; background:var(--notif-soft); border-radius:14px;
}
.settings-toggle-row > span:first-child{ font-weight:800; font-size:.92rem; color:var(--text); }
.settings-switch{ position:relative; display:inline-block; width:44px; height:25px; flex-shrink:0; }
.settings-switch input{ opacity:0; width:0; height:0; position:absolute; }
.settings-switch-track{
  position:absolute; inset:0; background:#d3d8e0; border-radius:999px; cursor:pointer; transition:.18s ease;
}
.settings-switch-track::before{
  content:""; position:absolute; width:19px; height:19px; left:3px; top:3px; background:#fff; border-radius:50%;
  box-shadow:0 2px 5px rgba(0,0,0,.2); transition:.18s ease;
}
.settings-switch input:checked + .settings-switch-track{ background:var(--notif); }
.settings-switch input:checked + .settings-switch-track::before{ transform:translateX(19px); }

.settings-notif-grid{ display:grid; grid-template-columns:1fr 1fr; gap:16px; transition:opacity .18s ease; }
.settings-notif-grid.is-disabled{ opacity:.45; pointer-events:none; }
.settings-field{ display:grid; gap:7px; }
.settings-field > span{ font-size:.82rem; font-weight:800; color:#2c3e55; }
.settings-field input[type="time"]{ max-width:160px; }

.settings-day-row{ display:flex; gap:6px; flex-wrap:wrap; }
.settings-day-chip{
  width:38px; height:34px; border-radius:10px; border:1.5px solid var(--line); background:#fff;
  font-size:.78rem; font-weight:800; color:var(--muted); cursor:pointer; transition:.15s ease;
}
.settings-day-chip:hover{ border-color:var(--notif); }
.settings-day-chip.active{ background:var(--notif); border-color:var(--notif); color:#fff; box-shadow:0 6px 14px rgba(217,119,6,.3); }

.settings-notif-footer{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; border-top:1px dashed var(--line); padding-top:14px; }
.settings-notif-note{ margin:0; font-size:.78rem; color:var(--muted); font-style:italic; flex:1; min-width:200px; }

.settings-stat-grid{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.settings-stat{
  display:grid; justify-items:center; text-align:center; gap:3px; padding:14px 8px;
  background:var(--surface-soft); border-radius:16px; border:1px solid var(--line);
}
.settings-stat-icon{ font-size:1.15rem; }
.settings-stat strong{ font-size:1.15rem; letter-spacing:-.01em; color:var(--text); }
.settings-stat small{ font-size:.72rem; color:var(--muted); font-weight:700; }

@media (max-width: 860px){
  .settings-notif-grid{ grid-template-columns:1fr; }
  .settings-stat-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px){
  .settings-layout{ grid-template-columns:1fr; }
}

/* =========================================================================
   AI SCHOLAR NATIONAL EDITION — PHÂN HỆ MỚI (LEADERBOARD, DIAGNOSTIC, SOCRATIC, ADMIN)
   ========================================================================= */

/* 1. LEADERBOARD */
.page-banner-leaderboard{ --page-banner:#f59e0b; --page-banner-2:#fde68a; --page-banner-bg:#fffbeb; }
.leaderboard-podium{
  display:grid; grid-template-columns:repeat(3, 1fr); gap:16px; align-items:end; margin:24px 0;
}
.podium-card{
  background:var(--surface); border:1px solid var(--line); border-radius:24px; padding:20px 14px;
  text-align:center; display:grid; gap:8px; box-shadow:var(--shadow-soft); position:relative;
}
.podium-card.rank-1{
  order:2; border-color:#f59e0b; background:linear-gradient(180deg,#fffdf5,#ffffff); transform:scale(1.05); z-index:2;
  box-shadow:0 18px 36px rgba(245,158,11,.18);
}
.podium-card.rank-2{ order:1; }
.podium-card.rank-3{ order:3; }
.podium-crown{ font-size:1.8rem; line-height:1; }
.podium-avatar{
  width:64px; height:64px; border-radius:50%; margin:0 auto; display:grid; place-items:center;
  font-size:1.5rem; font-weight:800; background:#fef3c7; color:#b45309; border:3px solid #f59e0b;
}
.podium-card.rank-2 .podium-avatar{ border-color:#94a3b8; background:#f1f5f9; color:#475569; }
.podium-card.rank-3 .podium-avatar{ border-color:#d97706; background:#fff7ed; color:#c2410c; }
.podium-xp{ font-size:1.25rem; font-weight:900; color:var(--text); letter-spacing:-.02em; }
.podium-rank-tag{
  display:inline-block; font-size:.72rem; font-weight:800; text-transform:uppercase;
  padding:3px 8px; border-radius:999px; background:rgba(245,158,11,.15); color:#b45309;
}

.leaderboard-table{ width:100%; border-collapse:collapse; text-align:left; }
.leaderboard-table th{ padding:12px 14px; font-size:.82rem; color:var(--muted); text-transform:uppercase; border-bottom:1px solid var(--line); }
.leaderboard-table td{ padding:14px; border-bottom:1px solid var(--line); vertical-align:middle; }
.leaderboard-table tr.is-me{ background:rgba(37,87,214,.06); font-weight:800; }
.leaderboard-table tr:hover td{ background:rgba(0,0,0,.015); }
.rank-badge{
  width:32px; height:32px; border-radius:10px; display:inline-grid; place-items:center;
  font-weight:900; font-size:.9rem; background:#f3f4f6; color:#4b5563;
}
.rank-badge.top-1{ background:#fef3c7; color:#b45309; }
.rank-badge.top-2{ background:#f1f5f9; color:#475569; }
.rank-badge.top-3{ background:#ffedd5; color:#c2410c; }
.user-cell{ display:flex; align-items:center; gap:10px; }
.user-cell-avatar{ width:36px; height:36px; border-radius:50%; display:grid; place-items:center; background:#e0e7ff; color:#3730a3; font-weight:800; font-size:.85rem; }
.system-tag{ font-size:.65rem; padding:2px 6px; border-radius:6px; background:#e5e7eb; color:#6b7280; font-weight:700; }

.sticky-my-rank{
  position:sticky; bottom:20px; background:linear-gradient(135deg,#1e3a8a,#2563eb); color:#fff;
  border-radius:20px; padding:14px 20px; display:flex; align-items:center; justify-content:space-between;
  box-shadow:0 14px 30px rgba(37,99,235,.35); z-index:10;
}

/* 2. DIAGNOSTIC & ADAPTIVE ROADMAP */
.page-banner-diagnostic{ --page-banner:#8b5cf6; --page-banner-2:#ddd6fe; --page-banner-bg:#f5f3ff; }
.diag-report-grid{ display:grid; grid-template-columns:repeat(3, 1fr); gap:16px; margin:20px 0; }
.diag-topic-card{
  background:var(--surface); border:1px solid var(--line); border-radius:20px; padding:18px; display:grid; gap:10px;
}
.diag-topic-card.strong{ border-top:4px solid #10b981; }
.diag-topic-card.moderate{ border-top:4px solid #f59e0b; }
.diag-topic-card.weak{ border-top:4px solid #ef4444; }
.diag-topic-card h4{ margin:0; display:flex; align-items:center; gap:8px; font-size:1.02rem; }
.diag-chip-list{ display:flex; flex-wrap:wrap; gap:6px; }
.diag-chip{
  padding:5px 10px; border-radius:8px; font-size:.82rem; font-weight:700;
}
.diag-chip.green{ background:#ecfdf5; color:#065f46; border:1px solid #a7f3d0; }
.diag-chip.amber{ background:#fffbeb; color:#92400e; border:1px solid #fde68a; }
.diag-chip.red{ background:#fef2f2; color:#991b1b; border:1px solid #fecaca; }

/* 3. SOCRATIC AI TUTOR DRAWER */
.socratic-drawer{
  position:fixed; bottom:90px; right:24px; width:400px; max-width:calc(100vw - 32px); height:600px; max-height:calc(100vh - 120px);
  background:var(--surface); border:1px solid var(--line); border-radius:24px; box-shadow:0 24px 48px rgba(15,23,42,.22);
  display:flex; flex-direction:column; z-index:900; overflow:hidden; transition:.25s cubic-bezier(.16,1,.3,1);
  transform:scale(.92) translateY(20px); opacity:0; pointer-events:none;
}
.socratic-drawer.open{ transform:scale(1) translateY(0); opacity:1; pointer-events:auto; }
.socratic-header{
  background:linear-gradient(135deg,#4338ca,#6366f1); color:#fff; padding:16px 18px;
  display:flex; align-items:center; justify-content:space-between;
}
.socratic-body{ flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:12px; }
.socratic-msg{
  max-width:85%; padding:12px 15px; border-radius:18px; font-size:.9rem; line-height:1.6;
}
.socratic-msg.user{ align-self:flex-end; background:#4f46e5; color:#fff; border-bottom-right-radius:4px; }
.socratic-msg.assistant{ align-self:flex-start; background:#f1f5f9; color:var(--text); border-bottom-left-radius:4px; border:1px solid var(--line); }
.socratic-pills{ display:flex; gap:6px; flex-wrap:wrap; padding:10px 16px; background:#f8fafc; border-top:1px solid var(--line); }
.socratic-pill{
  font-size:.76rem; font-weight:700; padding:4px 10px; border-radius:999px; background:#fff; border:1px solid var(--line);
  color:#4338ca; cursor:pointer; transition:.15s ease;
}
.socratic-pill:hover{ background:#e0e7ff; border-color:#c7d2fe; }
.socratic-input-bar{ display:flex; gap:8px; padding:12px 16px; border-top:1px solid var(--line); background:#fff; }
.socratic-input-bar input{ flex:1; border:1px solid var(--line); border-radius:14px; padding:10px 14px; font-size:.9rem; outline:none; }
.socratic-input-bar button{ border-radius:14px; padding:10px 16px; font-weight:800; background:#4f46e5; color:#fff; border:none; cursor:pointer; }

/* 4. ADMIN DASHBOARD */
.page-banner-admin{ --page-banner:#0f172a; --page-banner-2:#334155; --page-banner-bg:#f8fafc; }
.admin-nav-tabs{ display:flex; gap:8px; flex-wrap:wrap; border-bottom:2px solid var(--line); padding-bottom:12px; margin-bottom:20px; }
.admin-tab-btn{
  padding:10px 16px; border-radius:12px; font-weight:800; font-size:.88rem; background:transparent; border:1px solid transparent;
  color:var(--muted); cursor:pointer; transition:.18s ease;
}
.admin-tab-btn.active{ background:var(--brand); color:#fff; box-shadow:0 8px 18px rgba(37,87,214,.24); }
.admin-stat-grid{ display:grid; grid-template-columns:repeat(4, 1fr); gap:16px; margin-bottom:24px; }
.admin-stat-card{
  background:var(--surface); border:1px solid var(--line); border-radius:20px; padding:18px; display:grid; gap:4px;
}
.admin-stat-card strong{ font-size:1.8rem; font-weight:900; color:var(--text); letter-spacing:-.03em; }
.admin-key-grid{ display:grid; grid-template-columns:repeat(2, 1fr); gap:12px; }
.admin-key-card{
  background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:14px; display:flex; align-items:center; justify-content:space-between;
}
.key-status-dot{ width:10px; height:10px; border-radius:50%; display:inline-block; margin-right:6px; }
.key-status-dot.ready{ background:#10b981; box-shadow:0 0 8px rgba(16,185,129,.5); }
.key-status-dot.cooldown{ background:#f59e0b; box-shadow:0 0 8px rgba(245,158,11,.5); }
.key-status-dot.empty{ background:#9ca3af; }

.admin-table-wrap{ overflow-x:auto; background:var(--surface); border:1px solid var(--line); border-radius:20px; }
.admin-data-table{ width:100%; border-collapse:collapse; font-size:.88rem; }
.admin-data-table th{ padding:12px 14px; background:#f8fafc; color:#64748b; font-weight:800; border-bottom:1px solid var(--line); white-space:nowrap; }
.admin-data-table td{ padding:12px 14px; border-bottom:1px solid var(--line); vertical-align:middle; }

.admin-pwd-cell { display:flex; align-items:center; gap:6px; }
.admin-pwd-text { font-family:Consolas, Monaco, monospace; font-size:.85rem; font-weight:700; background:#f1f5f9; padding:4px 8px; border-radius:8px; color:#0f172a; border:1px solid #e2e8f0; }
.admin-pwd-toggle { border:none; background:transparent; cursor:pointer; padding:4px 6px; border-radius:6px; font-size:.9rem; transition:.15s ease; }
.admin-pwd-toggle:hover { background:#e2e8f0; }

.auth-provider-badge { display:inline-flex; align-items:center; gap:4px; padding:3px 8px; border-radius:20px; font-size:.75rem; font-weight:700; }
.auth-provider-badge.google { background:#fef2f2; color:#b91c1c; border:1px solid #fecaca; }
.auth-provider-badge.password { background:#e0e7ff; color:#3730a3; border:1px solid #c7d2fe; }

.admin-audit-feed { display:grid; gap:12px; }
.audit-card { background:#fff; border:1px solid var(--line); border-radius:14px; padding:14px 16px; display:flex; align-items:center; justify-content:space-between; gap:12px; transition:.15s ease; }
.audit-card:hover { border-color:#94a3b8; box-shadow:0 4px 12px rgba(0,0,0,0.04); }
.audit-card-left { display:flex; align-items:center; gap:12px; }
.audit-avatar { width:38px; height:38px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:.9rem; background:#2563eb; color:#fff; background-size:cover; background-position:center; flex-shrink:0; }
.audit-meta { display:grid; gap:2px; }
.audit-meta strong { font-size:.92rem; color:#0f172a; }
.audit-meta small { color:#64748b; font-size:.78rem; }
.audit-badge { font-size:.75rem; font-weight:700; padding:4px 10px; border-radius:20px; display:inline-flex; align-items:center; gap:4px; }
.audit-badge.google { background:#fef2f2; color:#dc2626; border:1px solid #fecaca; }
.audit-badge.password { background:#eff6ff; color:#2563eb; border:1px solid #bfdbfe; }
.audit-badge.register { background:#f0fdf4; color:#16a34a; border:1px solid #bbf7d0; }
.audit-time { font-size:.78rem; color:#94a3b8; font-weight:600; text-align:right; white-space:nowrap; }

@media (max-width: 860px){
  .leaderboard-podium{ grid-template-columns:1fr; }
  .podium-card.rank-1{ order:1; transform:none; }
  .podium-card.rank-2{ order:2; }
  .podium-card.rank-3{ order:3; }
  .diag-report-grid{ grid-template-columns:1fr; }
  .admin-stat-grid{ grid-template-columns:repeat(2, 1fr); }
  .admin-key-grid{ grid-template-columns:1fr; }
  .audit-card{ flex-direction:column; align-items:flex-start; }
}

/* 5. AUTHENTICATION & SPINNER STYLES */
.auth-btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: authSpin 0.7s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes authSpin {
  to { transform: rotate(360deg); }
}

.auth-field.is-invalid .auth-input-wrap {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.auth-field-msg {
  display: block;
  font-size: 0.78rem;
  color: #dc2626;
  font-weight: 600;
  margin-top: 4px;
}



/* =========================================================================
   ONBOARDING MODAL & PERSONALIZATION FLOW
   ========================================================================= */
#onboardingModal .modalBox,
#onboardingModal .onboarding-modal-box {
  width: min(620px, 94vw);
  max-width: 620px;
  border-radius: 28px;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 30px 70px -15px rgba(15, 23, 42, 0.45);
  animation: authModalPop 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.onboarding-header {
  padding: 32px 32px 20px;
  background: linear-gradient(135deg, #091224 0%, #1e3a8a 100%);
  color: #ffffff;
  position: relative;
}

.onboarding-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 10px;
}

.onboarding-header h2 {
  margin: 0 0 6px;
  font-size: 1.42rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.onboarding-header p {
  margin: 0;
  color: rgba(224, 231, 255, 0.85);
  font-size: 0.88rem;
  line-height: 1.5;
}

.onboarding-form {
  padding: 28px 32px 32px;
  display: grid;
  gap: 16px;
  background: #ffffff;
}

.onboarding-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.onboarding-field {
  display: grid;
  gap: 6px;
}

.onboarding-field label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  display: flex;
  justify-content: space-between;
}

.onboarding-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  padding: 0 14px;
  transition: all 0.2s ease;
}

.onboarding-input-wrap:focus-within {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.12);
}

.onboarding-input-wrap input,
.onboarding-input-wrap select {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 11px 2px;
  font: inherit;
  font-size: 0.9rem;
  color: #0f172a;
  outline: none;
}

.onboarding-submit-btn {
  width: 100%;
  border: 0;
  cursor: pointer;
  border-radius: 14px;
  padding: 13px 20px;
  font-weight: 800;
  font-size: 0.96rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  box-shadow: 0 14px 28px -6px rgba(37, 99, 235, 0.45);
  transition: all 0.2s ease;
  margin-top: 4px;
}

.onboarding-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -6px rgba(37, 99, 235, 0.55);
}

/* =========================================================================
   QUEST HUB (HỆ THỐNG NHIỆM VỤ CÀY ĐIỂM)
   ========================================================================= */
.quest-hub-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
  margin-bottom: 24px;
}

.quest-hub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.quest-hub-title-group h3 {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.quest-hub-title-group p {
  margin: 0;
  color: #64748b;
  font-size: 0.85rem;
}

.quest-hub-stats-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 8px 16px;
  border-radius: 14px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #1e293b;
}

.quest-hub-stats-badge strong {
  color: #2563eb;
}

.quest-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.quest-item {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.quest-item:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.quest-item.is-completed {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.quest-item.is-claimed {
  background: #f8fafc;
  border-color: #e2e8f0;
  opacity: 0.85;
}

.quest-item-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.quest-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.quest-item.is-completed .quest-icon-badge {
  background: #dcfce7;
  border-color: #86efac;
}

.quest-item-info {
  flex: 1;
}

.quest-item-info strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}

.quest-item-info p {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.4;
}

.quest-reward-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #b45309;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 8px;
  flex-shrink: 0;
}

.quest-progress-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  position: relative;
}

.quest-progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  transition: width 0.3s ease;
}

.quest-item.is-completed .quest-progress-bar-fill {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

.quest-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.quest-progress-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #64748b;
}

.quest-action-btn {
  padding: 6px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.78rem;
  border: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.quest-action-btn.do-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #2563eb;
}

.quest-action-btn.do-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.quest-action-btn.claim-btn {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
  animation: authPulse 1.8s infinite ease-in-out;
}

.quest-action-btn.claim-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.45);
}

.quest-action-btn.done-btn {
  background: #e2e8f0;
  color: #64748b;
  cursor: default;
}

/* =========================================================================
   TOP 100 NATIONAL LEADERBOARD - PREMIUM GAMIFICATION UI
   ========================================================================= */
.leaderboard-hero-banner {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 45%, #4f46e5 100%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 26px;
  padding: 32px 34px;
  color: #ffffff;
  margin-bottom: 24px;
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.28);
  position: relative;
  overflow: hidden;
}

.leaderboard-hero-banner::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.leaderboard-hero-banner::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: 25%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.28) 0%, rgba(167, 139, 250, 0) 70%);
  pointer-events: none;
}

.leaderboard-hero-banner .badge-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-pulse-dot {
  width: 9px;
  height: 9px;
  background: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 10px #34d399;
  animation: pulseLive 1.5s infinite;
}

@keyframes pulseLive {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px #34d399; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.leaderboard-hero-banner h1 {
  font-size: 2.05rem;
  font-weight: 900;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.leaderboard-hero-banner p {
  color: rgba(255, 255, 255, 0.95);
  max-width: 720px;
  font-size: 0.96rem;
  line-height: 1.55;
  margin: 0;
  font-weight: 500;
}

.leaderboard-tabs-bar {
  display: flex;
  gap: 10px;
  background: #f1f5f9;
  padding: 6px;
  border-radius: 18px;
  margin-bottom: 24px;
  border: 1px solid #e2e8f0;
  overflow-x: auto;
}

.leaderboard-tab-btn {
  flex: 1;
  min-width: 140px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 0;
  background: transparent;
  font-weight: 800;
  font-size: 0.88rem;
  color: #64748b;
  text-align: center;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.leaderboard-tab-btn:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.6);
}

.leaderboard-tab-btn.active {
  background: #ffffff;
  color: #1d4ed8;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

/* PODIUM SECTION */
.leaderboard-podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 20px;
  align-items: flex-end;
  margin: 20px 0 32px;
}

.podium-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 24px 18px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.04);
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.podium-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 35px rgba(0,0,0,0.08);
}

.podium-card.rank-1 {
  order: 2;
  background: linear-gradient(180deg, #fffdf5 0%, #ffffff 100%);
  border: 2px solid #f59e0b;
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.22);
  padding: 34px 22px 28px;
  z-index: 2;
}

.podium-card.rank-2 {
  order: 1;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border: 2px solid #94a3b8;
  box-shadow: 0 12px 28px rgba(100, 116, 139, 0.12);
}

.podium-card.rank-3 {
  order: 3;
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
  border: 2px solid #fb923c;
  box-shadow: 0 12px 28px rgba(251, 146, 60, 0.12);
}

.podium-crown-tag {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  color: #ffffff;
  font-weight: 900;
  font-size: 0.78rem;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.podium-card.rank-1 .podium-crown-tag {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.45);
}

.podium-card.rank-2 .podium-crown-tag {
  background: linear-gradient(135deg, #64748b, #475569);
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.35);
}

.podium-card.rank-3 .podium-crown-tag {
  background: linear-gradient(135deg, #ea580c, #c2410c);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.35);
}

.podium-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.3rem;
  color: #ffffff;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
  margin-top: 6px;
  background-size: cover;
  background-position: center;
}

.podium-card.rank-1 .podium-avatar {
  width: 78px;
  height: 78px;
  font-size: 1.6rem;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.45);
}

.podium-name {
  font-size: 1.08rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 4px;
}

.podium-card.rank-1 .podium-name {
  font-size: 1.25rem;
  color: #78350f;
}

.podium-school-tag {
  font-size: 0.76rem;
  color: #64748b;
  font-weight: 600;
}

.podium-card.rank-1 .podium-school-tag {
  color: #92400e;
  font-weight: 700;
}

.podium-xp-box {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  font-weight: 900;
  font-size: 1.15rem;
  padding: 5px 16px;
  border-radius: 20px;
  margin-top: 4px;
}

.podium-card.rank-1 .podium-xp-box {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  font-size: 1.35rem;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.2);
}

.podium-streak-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: #ea580c;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* LEADERBOARD TABLE */
.leaderboard-table-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.leaderboard-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
}

.leaderboard-table td {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.leaderboard-row {
  transition: all 0.15s ease;
}

.leaderboard-row:hover td {
  background: #f8fafc;
}

.leaderboard-row.is-me td {
  background: #eff6ff !important;
}

.leaderboard-row.is-me {
  border-left: 4px solid #2563eb;
}

.rank-badge {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.92rem;
  background: #f1f5f9;
  color: #475569;
}

.rank-badge.top-1 {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

.rank-badge.top-2 {
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  color: #334155;
  box-shadow: 0 4px 10px rgba(100, 116, 139, 0.2);
}

.rank-badge.top-3 {
  background: linear-gradient(135deg, #ffedd5, #fed7aa);
  color: #9a3412;
  box-shadow: 0 4px 10px rgba(234, 88, 12, 0.25);
}

.rank-badge.top-10 {
  background: #e0e7ff;
  color: #3730a3;
  font-weight: 800;
}

.lb-user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lb-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}

.lb-user-name-box {
  display: grid;
  gap: 2px;
}

.lb-user-name-box strong {
  font-size: 0.94rem;
  color: #0f172a;
}

.lb-user-name-box small {
  font-size: 0.76rem;
  color: #64748b;
}

.lb-xp-cell {
  display: grid;
  gap: 4px;
}

.lb-xp-cell strong {
  font-weight: 900;
  color: #1d4ed8;
  font-size: 0.98rem;
}

.lb-xp-bar-bg {
  width: 100px;
  height: 5px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.lb-xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  border-radius: 4px;
}

/* STICKY USER BAR */
.leaderboard-sticky-bar {
  position: sticky;
  bottom: 16px;
  z-index: 40;
  margin-top: 24px;
  background: linear-gradient(135deg, #091224 0%, #1e3a8a 100%);
  color: #ffffff;
  border-radius: 22px;
  padding: 16px 24px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.leaderboard-sticky-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.leaderboard-sticky-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-weight: 900;
  font-size: 0.95rem;
  padding: 6px 14px;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.leaderboard-sticky-text strong {
  display: block;
  font-size: 0.96rem;
  font-weight: 800;
}

.leaderboard-sticky-text span {
  font-size: 0.82rem;
  color: rgba(224, 231, 255, 0.9);
}

.leaderboard-sticky-btn {
  padding: 10px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.88rem;
  border: 0;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  transition: all 0.2s ease;
}

.leaderboard-sticky-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

@media (max-width: 860px) {
  .leaderboard-podium { grid-template-columns: 1fr; }
  .podium-card.rank-1 { order: 1; }
  .podium-card.rank-2 { order: 2; }
  .podium-card.rank-3 { order: 3; }
  .leaderboard-sticky-bar { flex-direction: column; align-items: flex-start; }
}

.leaderboard-sticky-btn {
  background: #ffffff;
  color: #1d4ed8;
  font-weight: 800;
  font-size: 0.86rem;
  padding: 9px 18px;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.leaderboard-sticky-btn:hover {
  background: #f8fafc;
  transform: translateY(-1px);
}

/* =========================================================================
   ROADMAP ADAPTIVE QUIZ & LEVEL SYSTEM STYLING
   ========================================================================= */
.roadmap-adaptive-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #f0f7ff, #e0eeff);
  border: 1.5px solid #bae0ff;
  border-radius: 18px;
  padding: 14px 18px;
  margin-bottom: 18px;
  box-shadow: 0 4px 16px rgba(37, 87, 214, 0.08);
}
.roadmap-adaptive-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}
.roadmap-adaptive-info {
  display: grid;
  gap: 3px;
  flex: 1;
}
.roadmap-adaptive-info strong {
  font-size: 0.95rem;
  color: #1e3a8a;
}
.roadmap-adaptive-info span {
  font-size: 0.84rem;
  color: #475569;
}
.roadmap-adaptive-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  margin-left: 6px;
}
.roadmap-adaptive-badge.easy { background: #d1fae5; color: #065f46; }
.roadmap-adaptive-badge.medium { background: #fef08a; color: #854d0e; }
.roadmap-adaptive-badge.hard { background: #fee2e2; color: #991b1b; }

.roadmap-adaptive-quiz-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1.5px solid transparent;
  min-width: 220px;
  box-shadow: 0 4px 14px rgba(37, 87, 214, 0.15);
}
.roadmap-adaptive-quiz-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 87, 214, 0.22);
}
.roadmap-adaptive-quiz-btn .btn-main-title {
  font-size: 0.96rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}
.roadmap-adaptive-quiz-btn .btn-sub-title {
  font-size: 0.74rem;
  opacity: 0.9;
  margin-top: 2px;
  font-weight: 500;
}
.roadmap-adaptive-quiz-btn.easy {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
}
.roadmap-adaptive-quiz-btn.medium {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #ffffff;
}
.roadmap-adaptive-quiz-btn.hard {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #ffffff;
}

.roadmap-level-pills-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.pill-btn {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}
.pill-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
  transform: translateY(-1px);
}
.pill-btn.active {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.15);
}

.roadmap-level-container {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  background: rgba(241, 245, 249, 0.7);
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 12px 14px;
  border-radius: 16px;
  width: 100%;
}
.roadmap-level-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}
.roadmap-level-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 8px;
}
.btn-level {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  line-height: 1.3;
}
.btn-level:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}
.btn-level .level-score {
  font-size: 0.74rem;
  opacity: 0.88;
  margin-bottom: 2px;
}
.btn-level .level-text {
  font-size: 0.88rem;
  font-weight: 800;
}
.btn-level.easy {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}
.btn-level.easy:hover {
  background: #d1fae5;
  border-color: #34d399;
}
.btn-level.medium {
  background: #fefce8;
  color: #854d0e;
  border-color: #fde047;
}
.btn-level.medium:hover {
  background: #fef08a;
  border-color: #eab308;
}
.btn-level.hard {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}
.btn-level.hard:hover {
  background: #fee2e2;
  border-color: #f87171;
}

/* =========================================================================
   INTERACTIVE YOUTUBE VIDEO POSTER CARD (Anti-Error / 100% Reliable Play)
   ========================================================================= */
.video-poster-card {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.16);
  display: block;
  text-decoration: none;
  cursor: pointer;
}
.video-poster-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
  opacity: 0.93;
}
.video-poster-card:hover img {
  transform: scale(1.05);
  opacity: 1;
}
.video-poster-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.78) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  transition: background 0.3s ease;
}
.video-poster-card:hover .video-poster-overlay {
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.2) 40%, rgba(0,0,0,0.86) 100%);
}
.video-play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #ff0000;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(255, 0, 0, 0.5);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}
.video-poster-card:hover .video-play-btn {
  transform: scale(1.18);
  box-shadow: 0 8px 28px rgba(255, 0, 0, 0.7);
}
.video-play-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all 0.25s ease;
  letter-spacing: 0.2px;
}
.video-poster-card:hover .video-play-label {
  background: #2563eb;
  border-color: #2563eb;
  transform: translateY(-2px);
}

/* =========================================================================
   SCHOLAR AI CHATBOT — Ultimate Modern EdTech Experience v18.0
   ========================================================================= */
.scholar-chat-widget-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

/* Floating Callout Invite */
.scholar-chat-callout {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 8px 14px 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(147, 197, 253, 0.6);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.18), 0 2px 8px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  animation: calloutFloatAnim 3s ease-in-out infinite;
  user-select: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.scholar-chat-callout:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 36px rgba(37, 99, 235, 0.25);
  border-color: rgba(99, 102, 241, 0.8);
}

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

.callout-sparkle {
  font-size: 1.15rem;
  line-height: 1;
  animation: sparkleTwinkle 2s ease-in-out infinite;
}

@keyframes sparkleTwinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(1.2) rotate(15deg); opacity: 0.8; }
}

.callout-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.callout-text strong {
  font-size: 0.82rem;
  color: #1e3a8a;
  font-weight: 800;
  line-height: 1.2;
}

.callout-text span {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}

.callout-dismiss {
  border: none;
  background: rgba(148, 163, 184, 0.15);
  color: #64748b;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.65rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  margin-left: 2px;
  transition: background 0.2s, color 0.2s;
}

.callout-dismiss:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #dc2626;
}

/* Floating Action Button (FAB) */
.scholarChatFab {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 50%, #7c3aed 100%);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 32px rgba(79, 70, 229, 0.45), 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  outline: none;
}

.scholarChatFab:hover {
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 16px 42px rgba(79, 70, 229, 0.6), 0 0 24px rgba(124, 58, 237, 0.4);
}

.scholar-fab-radar {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(99, 102, 241, 0.6);
  animation: fabRadarPulse 2.4s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;
  pointer-events: none;
}

@keyframes fabRadarPulse {
  0% { transform: scale(0.95); opacity: 0.9; }
  70% { transform: scale(1.45); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}

.scholar-fab-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.scholarChatFab:hover .scholar-fab-icon-wrap {
  transform: rotate(8deg) scale(1.05);
}

.scholarChatBadge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
  padding: 3px 6px;
  border-radius: 999px;
  letter-spacing: 0.4px;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.45);
  border: 1.5px solid #fff;
}

/* Chat Panel Window */
.scholarChatPanel {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 400px;
  max-width: calc(100vw - 32px);
  height: 620px;
  max-height: calc(100vh - 120px);
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2), 0 4px 16px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  z-index: 8999;
  overflow: hidden;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: bottom right;
}

.scholarChatPanel[aria-hidden="true"] {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.92) translateY(20px);
}

.scholarChatPanel[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
}

/* Header */
.scholarChatHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(135deg, #1e40af 0%, #4338ca 60%, #6d28d9 100%);
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(30, 58, 138, 0.25);
}

.scholarChatHeaderLeft {
  display: flex;
  align-items: center;
  gap: 12px;
}

.scholarChatAvatar {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.scholarChatHeaderMeta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.scholarChatNameRow {
  display: flex;
  align-items: center;
  gap: 6px;
}

.scholarChatName {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.scholar-ai-version-tag {
  background: rgba(255, 255, 255, 0.22);
  color: #fef08a;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(254, 240, 138, 0.4);
}

.scholarChatStatus {
  font-size: 0.74rem;
  opacity: 0.92;
  display: flex;
  align-items: center;
  gap: 6px;
}

.scholarOnlineDot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: scholarPulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

.scholarChatHeaderActions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.scholarChatHeaderBtn,
.scholarChatClose {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}

.scholarChatHeaderBtn:hover,
.scholarChatClose:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

/* Chat Messages */
.scholarChatMessages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #f8fafc;
  scroll-behavior: smooth;
}

.scholarMsg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 92%;
}

.scholarMsg.user {
  flex-direction: row-reverse;
  align-self: flex-end;
  max-width: 86%;
}

.scholarMsgAvatar {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.scholarMsg.user .scholarMsgAvatar {
  background: linear-gradient(135deg, #0f172a, #334155);
}

.scholarMsgBubble {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px 18px 18px 6px;
  padding: 12px 16px;
  font-size: 0.88rem;
  color: #1e293b;
  line-height: 1.65;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  word-break: break-word;
}

.scholarMsg.user .scholarMsgBubble {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #fff;
  border-radius: 18px 18px 6px 18px;
  border: none;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}

/* Welcome Card in Chat */
.scholar-welcome-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.welcome-badge {
  display: inline-block;
  align-self: flex-start;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
}

.scholar-welcome-card h4 {
  margin: 2px 0 0;
  font-size: 0.98rem;
  color: #0f172a;
}

.scholar-welcome-card p {
  margin: 0;
  font-size: 0.86rem;
  color: #475569;
}

/* Suggestions */
.scholarChatSuggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px 14px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.scholarSuggBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.scholarSuggBtn svg {
  color: #2563eb;
  flex-shrink: 0;
}

.scholarSuggBtn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
  transform: translateY(-1px);
}

/* Input Area */
.scholarChatInputArea {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.scholarImgBtn {
  cursor: pointer;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #f1f5f9;
  transition: all 0.2s;
  flex-shrink: 0;
}

.scholarImgBtn:hover {
  background: #eff6ff;
  color: #2563eb;
}

.scholarChatInput {
  flex: 1;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 9px 15px;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  color: #1e293b;
  background: #f8fafc;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-width: 0;
}

.scholarChatInput:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.scholarSendBtn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s, box-shadow 0.2s;
}

.scholarSendBtn:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.scholarSendBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.scholarImgPreviewBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  background: #eff6ff;
  border-top: 1px solid #bfdbfe;
  font-size: 0.78rem;
  color: #1d4ed8;
  font-weight: 600;
}

.img-preview-info {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scholarImgClear {
  background: none;
  border: none;
  cursor: pointer;
  color: #ef4444;
  font-size: 0.8rem;
  padding: 0;
  font-weight: 700;
}

.scholar-chat-footer-note {
  padding: 4px 14px 6px;
  background: #ffffff;
  text-align: center;
  font-size: 0.68rem;
  color: #94a3b8;
  border-top: 1px solid #f8fafc;
}

@media (max-width: 480px) {
  .scholarChatPanel {
    bottom: 0;
    right: 0;
    width: 100vw;
    max-width: 100vw;
    border-radius: 20px 20px 0 0;
    height: 85vh;
    max-height: 85vh;
  }
  .scholar-chat-widget-wrap {
    bottom: 16px;
    right: 16px;
  }
}


/* =========================================================================
   CHATGPT 4o 100% AUTHENTIC SANDBOX PLAYGROUND — v17.9
   ========================================================================= */
.cg-sandbox-anchor {
  margin-top: 36px;
  scroll-margin-top: 80px;
}

.cg-sandbox-wrapper {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  height: 720px;
  max-height: 85vh;
  overflow: hidden;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #0d0d0d;
}

/* Header */
.cg-sandbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
  flex-shrink: 0;
}

.cg-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cg-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(16, 163, 127, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cg-model-picker-wrap {
  position: relative;
}

.cg-model-select {
  appearance: none;
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 6px 32px 6px 12px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #111827;
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.cg-model-select:hover, .cg-model-select:focus {
  border-color: #10a37f;
  box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.12);
}

.cg-live-tag {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.cg-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cg-hdr-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
}

.cg-hdr-btn:hover {
  background: #f3f4f6;
  color: #111827;
}

.cg-hdr-btn.icon-only {
  padding: 6px 8px;
}

/* Messages Area */
.cg-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
}

/* Welcome Screen */
.cg-welcome-view {
  max-width: 680px;
  margin: auto;
  text-align: center;
  padding: 24px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cg-welcome-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(16, 163, 127, 0.12);
}

.cg-welcome-view h2 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0d0d0d;
  margin: 0 0 8px;
}

.cg-welcome-sub {
  color: #6b7280;
  font-size: 0.92rem;
  margin: 0 0 28px;
  max-width: 520px;
  line-height: 1.6;
}

.cg-sugg-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
}

.cg-sugg-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cg-sugg-card:hover {
  background: #f9fafb;
  border-color: #10a37f;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.cg-sugg-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #111827;
}

.cg-sugg-desc {
  font-size: 0.76rem;
  color: #6b7280;
  line-height: 1.4;
}

/* Chat Feed */
.cg-chat-feed {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
}

.cg-msg-row {
  display: flex;
  gap: 14px;
  width: 100%;
}

.cg-msg-row.user {
  justify-content: flex-end;
}

.cg-user-bubble {
  background: #f4f4f4;
  color: #0d0d0d;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 0.92rem;
  line-height: 1.65;
  max-width: 80%;
  word-break: break-word;
}

.cg-msg-row.assistant {
  justify-content: flex-start;
  align-items: flex-start;
}

.cg-avatar-ai {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #10a37f;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.cg-ai-content {
  flex: 1;
  font-size: 0.935rem;
  line-height: 1.75;
  color: #0d0d0d;
  word-break: break-word;
}

.cg-ai-content h2, .cg-ai-content h3, .cg-ai-content h4 {
  color: #111827;
  margin: 16px 0 8px;
  font-weight: 800;
}

.cg-ai-content ul, .cg-ai-content ol {
  margin: 8px 0;
  padding-left: 22px;
}

.cg-ai-content li {
  margin-bottom: 4px;
}

.cg-ai-content strong {
  font-weight: 700;
  color: #000;
}

/* Markdown Tables */
.cg-ai-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 14px 0;
  font-size: 0.86rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.cg-ai-content th, .cg-ai-content td {
  border: 1px solid #e5e7eb;
  padding: 8px 12px;
  text-align: left;
}

.cg-ai-content th {
  background: #f9fafb;
  font-weight: 700;
  color: #111827;
}

/* Code Blocks */
.cg-code-block {
  background: #1e1e1e;
  border-radius: 10px;
  margin: 12px 0;
  overflow: hidden;
  color: #d4d4d4;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}

.cg-code-header {
  background: #2d2d2d;
  padding: 6px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: #9e9e9e;
}

.cg-copy-code-btn {
  background: transparent;
  border: none;
  color: #b0b0b0;
  font-size: 0.76rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 4px;
  transition: all 0.15s;
}

.cg-copy-code-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.cg-code-body {
  padding: 12px 16px;
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.55;
  overflow-x: auto;
}

.cg-code-body code {
  font-family: inherit;
  background: transparent !important;
  padding: 0 !important;
  color: inherit !important;
}

/* Inline Code */
.cg-ai-content :not(pre) > code {
  background: #f3f4f6;
  color: #c026d3;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.85em;
  font-family: monospace;
}

/* Assistant Action Toolbar */
.cg-msg-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.cg-action-btn {
  background: transparent;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  transition: all 0.15s;
}

.cg-action-btn:hover {
  background: #f3f4f6;
  color: #111827;
}

.cg-action-btn.copied {
  color: #10a37f;
}

/* Typing Pulse */
.cg-typing-row {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 0;
}

.cg-typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10a37f;
  animation: cgTypingDot 1.4s infinite ease-in-out;
}

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

@keyframes cgTypingDot {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.4; }
  40% { transform: scale(1.25); opacity: 1; }
}

/* Bottom Input Area */
.cg-input-wrapper {
  padding: 12px 20px 16px;
  background: #ffffff;
  border-top: 1px solid #f3f4f6;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.cg-input-box {
  width: 100%;
  max-width: 780px;
  background: #f4f4f4;
  border: 1.5px solid transparent;
  border-radius: 26px;
  padding: 8px 12px 8px 16px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.cg-input-box:focus-within {
  background: #ffffff;
  border-color: #d1d5db;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}

.cg-tool-btn {
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
  margin-bottom: 2px;
}

.cg-tool-btn:hover {
  background: #e5e7eb;
  color: #111827;
}

.cg-textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.92rem;
  font-family: inherit;
  color: #0d0d0d;
  resize: none;
  max-height: 160px;
  min-height: 24px;
  line-height: 1.5;
  padding: 6px 0;
}

.cg-textarea::placeholder {
  color: #8e8e8e;
}

.cg-input-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-bottom: 2px;
}

.cg-tool-pill {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.cg-tool-pill:hover, .cg-tool-pill.active {
  background: #f0fdf4;
  border-color: #10a37f;
  color: #10a37f;
}

.cg-send-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #0d0d0d;
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.cg-send-btn:hover:not(:disabled) {
  background: #10a37f;
  transform: scale(1.08);
}

.cg-send-btn:disabled {
  background: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
}

.cg-disclaimer {
  font-size: 0.72rem;
  color: #9ca3af;
  margin-top: 8px;
  text-align: center;
}

@media (max-width: 640px) {
  .cg-sugg-grid { grid-template-columns: 1fr; }
  .cg-tool-pill span { display: none; }
  .cg-sandbox-wrapper { height: 620px; }
}

/* =========================================================================
   LIVE ACTIVE USERS BADGE (HOME HERO)
   ========================================================================= */
.banner-badges-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}

.live-active-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.38);
  color: #ecfdf5;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.14);
  user-select: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.live-active-badge:hover {
  border-color: rgba(52, 211, 153, 0.65);
  transform: translateY(-1px);
}

.live-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #10b981;
  position: relative;
  display: inline-block;
  box-shadow: 0 0 10px #10b981;
  flex-shrink: 0;
}

.live-status-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid #34d399;
  animation: liveDotPulse 2s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

@keyframes liveDotPulse {
  0% {
    transform: scale(0.9);
    opacity: 1;
  }
  70% {
    transform: scale(2.2);
    opacity: 0;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

.live-active-badge strong {
  font-weight: 800;
  color: #6ee7b7;
  display: inline-block;
  letter-spacing: -0.01em;
}

.live-count-bump {
  animation: countBumpAnim 0.5s ease-out;
}

@keyframes countBumpAnim {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.22);
    color: #a7f3d0;
  }
  100% {
    transform: scale(1);
  }
}

@media (max-width: 640px) {
  .banner-badges-row {
    gap: 8px;
  }
  .live-active-badge {
    padding: 5px 12px;
    font-size: 0.82rem;
  }
}

/* =========================================================================
   TOPBAR LIVE BADGE (PERSISTENT ON ALL PAGES)
   ========================================================================= */
.brand-group {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.topbar-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #065f46;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  user-select: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08);
}

.topbar-live-badge:hover {
  background: rgba(16, 185, 129, 0.20);
  border-color: rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
}

.topbar-live-badge strong {
  font-weight: 800;
  color: #047857;
}

@media (max-width: 1080px) {
  .topbar-live-badge {
    padding: 5px 10px;
    font-size: 0.80rem;
    gap: 6px;
  }
}

@media (max-width: 768px) {
  .brand-group {
    gap: 10px;
  }
  .topbar-live-badge {
    padding: 4px 9px;
    font-size: 0.76rem;
  }
  .topbar-live-badge .live-unit-text {
    display: none;
  }
}

@media (max-width: 480px) {
  .topbar-live-badge {
    padding: 4px 8px;
    font-size: 0.72rem;
  }
  .topbar-live-badge .live-status-dot {
    width: 7px;
    height: 7px;
  }
}

/* =========================================================================
   CONTACT & SUPPORT HUB REDESIGN
   ========================================================================= */
.contact-main-layout {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
  align-items: start;
}

.contact-panel-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.contact-panel-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.contact-panel-icon.hotline {
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
}

.contact-panel-head h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
}

.contact-input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.contact-field-label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
}

.contact-field-label .req {
  color: #ef4444;
}

.contact-field input,
.contact-field select,
.contact-field textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  transition: all 0.2s ease;
  outline: none;
  box-sizing: border-box;
}

.contact-field textarea {
  resize: vertical;
  min-height: 110px;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.contact-submit-btn {
  width: 100%;
  padding: 13px 20px;
  font-size: 0.98rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 14px;
  cursor: pointer;
  margin-top: 6px;
}

/* Right Column: Channels */
.channel-card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.channel-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(248, 250, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.channel-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.channel-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.channel-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}

.channel-info strong {
  font-size: 0.92rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-info span {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.channel-actions .btn.small {
  padding: 6px 12px;
  font-size: 0.82rem;
  border-radius: 999px;
}

.ai-quick-assist-card {
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(37, 87, 214, 0.08), rgba(99, 102, 241, 0.12));
  border: 1px solid rgba(37, 87, 214, 0.22);
}

.ai-assist-badge {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 6px;
}

.ai-quick-assist-card p {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.5;
}

/* FAQ Accordion */
.faq-section {
  margin-top: 24px;
}

.faq-head {
  margin-bottom: 20px;
}

.faq-head h2 {
  margin: 8px 0 4px;
  font-size: 1.45rem;
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item.active {
  border-color: var(--brand);
  box-shadow: 0 4px 16px rgba(37, 87, 214, 0.08);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text);
  cursor: pointer;
  transition: color 0.2s ease;
}

.faq-item.active .faq-question {
  color: var(--brand);
}

.faq-toggle-icon {
  font-size: 1.1rem;
  transition: transform 0.25s ease;
  color: var(--muted);
  flex-shrink: 0;
}

.faq-item.active .faq-toggle-icon {
  transform: rotate(180deg);
  color: var(--brand);
}

.faq-answer {
  display: none;
  padding: 0 20px 18px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  display: block;
}

.faq-answer p {
  margin: 0;
}

/* Developer Info Card */
.developer-info-card {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(248, 250, 255, 0.95), rgba(240, 245, 255, 0.95));
}

.dev-info-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dev-avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  font-weight: 900;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
  flex-shrink: 0;
}

.dev-info-left h3 {
  margin: 0 0 3px;
  font-size: 1.05rem;
}

.dev-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 860px) {
  .contact-main-layout {
    grid-template-columns: 1fr;
  }
  .contact-input-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================================
   CHATGPT KNOWLEDGE & THEORY HUB — REFINED EDITORIAL HANDBOOK
   ========================================================================= */
.chatgpt-handbook-wrap {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

.handbook-chapter {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 32px 36px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.02);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

@media (max-width: 768px) {
  .handbook-chapter {
    padding: 22px 18px;
    border-radius: 16px;
    gap: 18px;
  }
}

.chapter-header {
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chapter-tag {
  align-self: flex-start;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  padding: 4px 12px;
  border-radius: 999px;
}

.chapter-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .chapter-header h2 {
    font-size: 1.35rem;
  }
}

.chapter-header p {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1.6;
}

/* Article Flow */
.handbook-article-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.handbook-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.handbook-section h3 {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 750;
  color: #0f172a;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.35;
}

.section-num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #2563eb;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
}

.handbook-section p {
  margin: 0;
  font-size: 1rem;
  font-weight: 450;
  line-height: 1.75;
  color: #334155;
}

.handbook-callout {
  background: #f8fafc;
  border-left: 4px solid #2563eb;
  border-radius: 0 12px 12px 0;
  padding: 14px 18px;
  font-size: 0.96rem;
  font-weight: 480;
  color: #1e293b;
  line-height: 1.7;
  border-top: 1px solid #f1f5f9;
  border-right: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
}

.handbook-callout strong {
  color: #1d4ed8;
  font-weight: 800;
}

/* Framework Flow (Vertical Stepper) */
.framework-stepper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-left: 2px solid #dbeafe;
  padding-left: 22px;
  margin-left: 8px;
}

.framework-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.framework-step::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #2563eb;
}

.step-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-level {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 2px 8px;
  border-radius: 999px;
}

.framework-step h4 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 750;
  color: #0f172a;
}

.framework-step p {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 450;
  line-height: 1.7;
  color: #475569;
}

/* Tactics List */
.tactics-numbered-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tactic-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #f1f5f9;
  transition: border-color 0.2s;
}

.tactic-row:hover {
  border-color: #cbd5e1;
}

.tactic-row-num {
  font-size: 1rem;
  font-weight: 800;
  color: #2563eb;
  background: #eff6ff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.tactic-row-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tactic-row-content h4 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 750;
  color: #0f172a;
}

.tactic-row-content p {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 450;
  line-height: 1.6;
  color: #475569;
}

/* Clean Matrix Table */
.handbook-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.handbook-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.94rem;
}

.handbook-table th {
  background: #f8fafc;
  padding: 12px 16px;
  font-weight: 800;
  font-size: 0.94rem;
  color: #0f172a;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.handbook-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  font-weight: 450;
  line-height: 1.6;
}

.handbook-table tr:last-child td {
  border-bottom: none;
}

.handbook-table td strong {
  color: #0f172a;
  font-weight: 750;
}

/* Side by Side Ethics Comparison */
.ethics-dual-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 6px;
}

@media (max-width: 768px) {
  .ethics-dual-layout {
    grid-template-columns: 1fr;
  }
}

.ethics-box {
  padding: 18px 20px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ethics-box.good {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.ethics-box.bad {
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.ethics-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.98rem;
  font-weight: 800;
}

.ethics-box.good .ethics-title { color: #059669; }
.ethics-box.bad .ethics-title { color: #dc2626; }

.ethics-box ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 450;
  line-height: 1.6;
  color: #334155;
}

/* =========================================================================
   INTERACTIVE PROMPT SIMULATOR & AI MINI-QUIZ
   ========================================================================= */
.interactive-prompt-sim {
  background: #ffffff;
  border: 1.5px solid #dce6f4;
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.sim-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.sim-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sim-tab-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sim-tab-btn.active, .sim-tab-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.sim-level-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.sim-level-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
}

.sim-level-btns {
  display: flex;
  gap: 6px;
}

.sim-lvl-btn {
  border: none;
  background: transparent;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  color: #64748b;
}

.sim-lvl-btn.active {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.sim-display-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 768px) {
  .sim-display-grid {
    grid-template-columns: 1fr;
  }
}

.sim-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sim-box-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  font-weight: 800;
  color: #0f172a;
}

.sim-rating-badge {
  font-size: 0.76rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
}

.sim-rating-badge.rating-high {
  background: #dcfce7;
  color: #15803d;
}

.sim-rating-badge.rating-low {
  background: #fee2e2;
  color: #b91c1c;
}

.sim-text-content {
  font-size: 0.94rem;
  line-height: 1.65;
  color: #334155;
  white-space: pre-line;
  min-height: 80px;
}

.sim-feedback {
  background: #ffffff;
  border-left: 3px solid #2563eb;
  padding: 8px 12px;
  border-radius: 0 8px 8px 0;
  font-size: 0.86rem;
  color: #475569;
}

.sim-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Interactive Mini-Quiz */
.interactive-ai-quiz {
  background: #ffffff;
  border: 1.5px solid #dce6f4;
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 14px;
}

.quiz-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
}

.quiz-xp-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3);
}

.quiz-question-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px;
  background: #f8fafc;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
}

.quiz-q-title {
  font-size: 1rem;
  font-weight: 750;
  color: #0f172a;
  line-height: 1.5;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quiz-opt-btn {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
  text-align: left;
  font-size: 0.92rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.quiz-opt-btn:hover:not(:disabled) {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.quiz-opt-btn.correct {
  background: #f0fdf4 !important;
  border-color: #22c55e !important;
  color: #15803d !important;
  font-weight: 700;
}

.quiz-opt-btn.wrong {
  background: #fef2f2 !important;
  border-color: #ef4444 !important;
  color: #b91c1c !important;
  text-decoration: line-through;
}

.quiz-explain {
  display: none;
  background: #eff6ff;
  border-left: 3px solid #2563eb;
  padding: 10px 14px;
  border-radius: 0 10px 10px 0;
  font-size: 0.88rem;
  color: #1e3a8a;
  line-height: 1.55;
}

.quiz-explain.show {
  display: block;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.action-try-prompt-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
  margin-top: 6px;
  transition: all 0.2s ease;
}

.action-try-prompt-btn:hover {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
  transform: translateY(-1px);
}

.handbook-video-highlight {
  margin-top: 14px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.video-highlight-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.video-highlight-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.98rem;
  font-weight: 750;
  color: #0f172a;
}

/* ==========================================
   AVATAR LIBRARY MODAL & PICKER
   ========================================== */
.avatar-modal-box {
  max-width: 660px;
  width: 92%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 24px;
  border-radius: 24px;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15);
}

.avatar-modal-head {
  margin-bottom: 14px;
}

.avatar-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  padding-right: 4px;
}

.avatar-cat-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.avatar-cat-bar::-webkit-scrollbar {
  display: none;
}

.avatar-cat-btn {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1.5px solid var(--border, #e2e8f0);
  background: var(--bg-card, #ffffff);
  color: var(--text, #1e293b);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.avatar-cat-btn:hover {
  border-color: var(--brand, #2563eb);
  color: var(--brand, #2563eb);
}

.avatar-cat-btn.active {
  background: var(--brand, #2563eb);
  color: #ffffff;
  border-color: var(--brand, #2563eb);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: 12px;
  max-height: 330px;
  overflow-y: auto;
  padding: 6px 4px;
}

.avatar-pick-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border-radius: 16px;
  padding: 8px 4px;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  background: rgba(0, 0, 0, 0.02);
}

.avatar-pick-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.4);
  background: rgba(37, 99, 235, 0.04);
}

.avatar-pick-card.is-selected {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22);
}

.avatar-pick-img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border, #e2e8f0);
  background: #ffffff;
  transition: transform 0.2s ease;
}

.avatar-pick-card:hover .avatar-pick-img {
  transform: scale(1.05);
}

.avatar-pick-card.is-selected .avatar-pick-img {
  border-color: #2563eb;
}

.avatar-pick-check {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 18px;
  height: 18px;
  background: #2563eb;
  color: #fff;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.avatar-pick-card.is-selected .avatar-pick-check {
  display: flex;
}

.avatar-pick-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-muted, #64748b);
  line-height: 1.2;
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border, #e2e8f0);
  flex-wrap: wrap;
}

.avatar-preview-current {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-preview-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid #2563eb;
  background: #f1f5f9;
}

.avatar-custom-upload-box {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border, #cbd5e1);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.015);
  transition: all 0.2s ease;
  width: 100%;
}

.avatar-custom-upload-box:hover {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.04);
}

.profile-avatar-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border, #e2e8f0);
  background: var(--bg-card, #ffffff);
  color: var(--text, #1e293b);
  font-size: 0.84rem;
  font-weight: 750;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.profile-avatar-trigger-btn:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37,99,235,0.25);
}
















/* ==========================================
   DARK THEME SYSTEM & COLOR HARMONY
   ========================================== */
:root[data-theme="dark"],
body.dark-theme {
  --page-bg: #0b111e;
  --surface: #141f32;
  --surface-soft: #0e1726;
  --line: #223249;
  --text: #f3f6fc;
  --muted: #94a3b8;
  --brand: #3b82f6;
  --brand-2: #60a5fa;
  --brand-soft: rgba(59, 130, 246, 0.16);
  --page-banner: #1e3a8a;
  --page-banner-2: #2563eb;
  --page-glow: rgba(59, 130, 246, 0.20);
  --page-accent: #93c5fd;
  --page-ink: #f8fafc;
  --dark: #030712;
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.55);
  --shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.40);
  --bg-card: #141f32;
  --border: #223249;
}

[data-theme="dark"] body {
  background-color: var(--page-bg);
  color: var(--text);
}

[data-theme="dark"] .topbar {
  background: rgba(20, 31, 50, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

[data-theme="dark"] .panel,
[data-theme="dark"] .card,
[data-theme="dark"] .auth-card,
[data-theme="dark"] .settings-card,
[data-theme="dark"] .profile-summary-card,
[data-theme="dark"] .quest-hub-card,
[data-theme="dark"] .ranking-stat-pill,
[data-theme="dark"] .mission-card,
[data-theme="dark"] .dashboard-metric {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

[data-theme="dark"] .dashboard-metric {
  background: var(--surface-soft);
}

[data-theme="dark"] .mission-card {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.22) 0%, rgba(59, 130, 246, 0.12) 100%);
  border-color: rgba(59, 130, 246, 0.35);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: var(--surface-soft);
  border: 1.5px solid var(--line);
  color: var(--text);
}

[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

[data-theme="dark"] .btn.soft {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.32);
  color: #93c5fd;
}

[data-theme="dark"] .btn.ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  color: var(--muted);
}

[data-theme="dark"] .btn.ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

[data-theme="dark"] .modalBox,
[data-theme="dark"] .auth-modal .modalBox,
[data-theme="dark"] .avatar-modal-box {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

[data-theme="dark"] .modal {
  background: rgba(3, 7, 18, 0.72);
}

[data-theme="dark"] .ranking-table thead th {
  background: var(--surface-soft);
  border-bottom: 2px solid var(--line);
  color: var(--muted);
}

[data-theme="dark"] .ranking-table tbody tr {
  border-bottom: 1px solid var(--line);
}

[data-theme="dark"] .ranking-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.10);
}

[data-theme="dark"] .ranking-user-row.is-current-user {
  background: rgba(59, 130, 246, 0.18) !important;
  border-left: 4px solid var(--brand);
}

[data-theme="dark"] .settings-day-chip {
  background: var(--surface-soft);
  border-color: var(--line);
  color: var(--muted);
}

[data-theme="dark"] .settings-day-chip.active {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}

[data-theme="dark"] .quest-item {
  background: var(--surface-soft);
  border-color: var(--line);
}

[data-theme="dark"] .quest-progress-track {
  background: rgba(255, 255, 255, 0.08);
}

/* ==========================================
   PROMINENT AVATAR CHANGER SECTION
   ========================================== */
.profile-avatar-banner-box {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(124, 58, 237, 0.08) 100%);
  border: 2px solid rgba(37, 99, 235, 0.28);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.10);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  margin-bottom: 6px;
}

[data-theme="dark"] .profile-avatar-banner-box {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18) 0%, rgba(124, 58, 237, 0.18) 100%);
  border-color: rgba(59, 130, 246, 0.40);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.30);
}

.profile-avatar-banner-box:hover {
  border-color: rgba(37, 99, 235, 0.50);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.18);
}

.profile-avatar-preview-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar-img-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #2563eb;
  background-size: cover;
  background-position: center;
  background-color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
  flex-shrink: 0;
}

.profile-avatar-trigger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  color: #ffffff !important;
  font-size: 0.92rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.32);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.profile-avatar-trigger-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.42);
  filter: brightness(1.08);
}

.profile-avatar-trigger-btn:active {
  transform: translateY(0) scale(0.98);
}

/* ==========================================
   AVATAR MODAL NAVIGATION BAR & CLEAR DISPLAY
   ========================================== */
.avatar-modal-box {
  max-width: 680px;
  width: 92%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 24px;
  border-radius: 28px;
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.22);
  position: relative;
}

.avatar-modal-head {
  flex-shrink: 0;
  margin-bottom: 12px;
}

.avatar-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex: 1;
  padding: 2px;
}

.avatar-cat-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px 2px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  background: var(--surface, #ffffff);
  z-index: 15;
  scrollbar-width: thin;
  border-bottom: 1px solid var(--line, #e2e8f0);
}

.avatar-cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 750;
  border: 1.5px solid var(--line, #e2e8f0);
  background: var(--surface-soft, #f8fafc);
  color: var(--text, #1e293b);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}

.avatar-cat-btn:hover {
  border-color: var(--brand, #2563eb);
  color: var(--brand, #2563eb);
  background: var(--brand-soft, #eff6ff);
  transform: translateY(-1px);
}

.avatar-cat-btn.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

/* ==========================================
   THEME SWITCHER IN SETTINGS
   ========================================== */
.theme-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.theme-option-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  border: 2px solid var(--line, #e2e8f0);
  background: var(--surface-soft, #f8fafc);
  color: var(--text, #1e293b);
  cursor: pointer;
  text-align: left;
  position: relative;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.theme-option-card:hover {
  border-color: var(--brand, #2563eb);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12);
}

.theme-option-card.active {
  border-color: var(--brand, #2563eb);
  background: var(--brand-soft, #eff6ff);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.theme-option-preview {
  height: 64px;
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.theme-preview-light {
  background: #f8fafc;
}
.theme-preview-light .theme-preview-head {
  height: 14px;
  border-radius: 4px;
  background: #2563eb;
}
.theme-preview-light .theme-preview-line {
  height: 8px;
  border-radius: 4px;
  background: #e2e8f0;
}
.theme-preview-light .theme-preview-line.line-2 {
  width: 60%;
}

.theme-preview-dark {
  background: #0b111e;
  border-color: #223249;
}
.theme-preview-dark .theme-preview-head {
  height: 14px;
  border-radius: 4px;
  background: #1e3a8a;
}
.theme-preview-dark .theme-preview-line {
  height: 8px;
  border-radius: 4px;
  background: #1e293b;
}
.theme-preview-dark .theme-preview-line.line-2 {
  width: 60%;
}

.theme-preview-system {
  background: linear-gradient(135deg, #f8fafc 50%, #0b111e 50%);
  border-color: #cbd5e1;
}
.theme-preview-system .theme-preview-head {
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(135deg, #2563eb 50%, #1e3a8a 50%);
}
.theme-preview-system .theme-preview-line {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(135deg, #e2e8f0 50%, #1e293b 50%);
}
.theme-preview-system .theme-preview-line.line-2 {
  width: 60%;
}

.theme-option-info strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.theme-option-info small {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
  display: block;
}

.theme-check-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand, #2563eb);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.theme-option-card.active .theme-check-badge {
  display: flex;
}


/* ==========================================
   MINIMALIST PROFESSIONAL PROMPT WORKBENCH
   ========================================== */
.prompt-workbench-wrapper {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  margin: 0 auto;
}

.prompt-workbench-categories {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 8px 2px;
  scrollbar-width: thin;
}

.prompt-cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  border: 1.5px solid var(--line, #e2e8f0);
  background: var(--surface, #ffffff);
  color: var(--text, #1e293b);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.prompt-cat-tab:hover {
  border-color: var(--brand, #2563eb);
  color: var(--brand, #2563eb);
  background: var(--brand-soft, #eff6ff);
}

.prompt-cat-tab.active {
  background: var(--brand, #2563eb) !important;
  color: #ffffff !important;
  border-color: var(--brand, #2563eb) !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28) !important;
}

.prompt-cat-tab-svg {
  flex-shrink: 0;
}

.prompt-workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.prompt-config-panel,
.prompt-preview-panel {
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow-soft, 0 10px 25px rgba(0, 0, 0, 0.05));
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.prompt-config-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line, #e2e8f0);
}

.prompt-section-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand, #2563eb);
  background: var(--brand-soft, rgba(37, 99, 235, 0.08));
  padding: 3px 10px;
  border-radius: 6px;
}

.prompt-config-head h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text, #0f172a);
}

.prompt-goal-desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted, #64748b);
  line-height: 1.5;
}

.prompt-templates-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prompt-sub-label {
  font-size: 0.80rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted, #64748b);
}

.prompt-template-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prompt-template-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 650;
  border: 1.5px solid var(--line, #e2e8f0);
  background: var(--surface-soft, #f8fafc);
  color: var(--text, #1e293b);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.prompt-template-pill:hover {
  border-color: var(--brand, #2563eb);
  color: var(--brand, #2563eb);
  background: var(--brand-soft, #eff6ff);
}

.prompt-template-pill.active {
  border-color: var(--brand, #2563eb);
  background: var(--brand-soft, rgba(37, 99, 235, 0.08));
  color: var(--brand, #2563eb);
  font-weight: 800;
}

.prompt-pill-check {
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--brand, #2563eb);
}

.prompt-params-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line, #e2e8f0);
}

.prompt-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prompt-field-label {
  font-size: 0.86rem;
  font-weight: 750;
  color: var(--text, #1e293b);
}

.prompt-field-group input,
.prompt-field-group textarea {
  border: 1.5px solid var(--line, #cbd5e1);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.90rem;
  font-family: inherit;
  color: var(--text, #1e293b);
  background: var(--surface-soft, #f8fafc);
  transition: all 0.2s ease;
}

.prompt-field-group input:focus,
.prompt-field-group textarea:focus {
  border-color: var(--brand, #2563eb);
  background: var(--surface, #ffffff);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  outline: none;
}

.prompt-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.prompt-generate-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}

/* ---- Right Preview Column ---- */
.prompt-workbench-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 20px;
  gap: 12px;
  min-height: 380px;
  border: 2px dashed var(--line, #cbd5e1);
  border-radius: 18px;
  background: var(--surface-soft, #f8fafc);
}

.prompt-empty-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface, #ffffff);
  color: var(--muted, #64748b);
  border: 1px solid var(--line, #e2e8f0);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.prompt-workbench-empty h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text, #1e293b);
}

.prompt-workbench-empty p {
  margin: 0;
  max-width: 360px;
  font-size: 0.88rem;
  color: var(--muted, #64748b);
  line-height: 1.55;
}

.prompt-workbench-ready {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: promptFadeIn 0.25s ease-out;
}

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

.prompt-ready-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line, #e2e8f0);
}

.prompt-ready-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.prompt-ready-title-group strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text, #0f172a);
}

.prompt-stats-pill {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted, #64748b);
  background: var(--surface-soft, #f1f5f9);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line, #e2e8f0);
}

.prompt-ready-status-badge {
  font-size: 0.76rem;
  font-weight: 800;
  color: #059669;
  background: rgba(5, 150, 105, 0.10);
  border: 1px solid rgba(5, 150, 105, 0.25);
  padding: 3px 10px;
  border-radius: 999px;
}

.prompt-syntax-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface-soft, #f8fafc);
  border: 1.5px solid var(--line, #e2e8f0);
  border-radius: 16px;
  padding: 16px;
}

.prompt-syntax-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prompt-syntax-section + .prompt-syntax-section {
  padding-top: 8px;
  border-top: 1px dashed var(--line, #e2e8f0);
}

.prompt-syntax-tag {
  align-self: flex-start;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand, #2563eb);
  background: rgba(37, 99, 235, 0.08);
  padding: 2px 8px;
  border-radius: 6px;
}

.prompt-syntax-text {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text, #1e293b);
  word-break: break-word;
}

.prompt-raw-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prompt-raw-label {
  font-size: 0.80rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted, #64748b);
}

.prompt-raw-textarea {
  width: 100%;
  border: 1.5px solid var(--line, #cbd5e1);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.84rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  line-height: 1.55;
  background: var(--surface-soft, #f8fafc);
  color: var(--text, #1e293b);
  resize: vertical;
}

.prompt-workbench-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 6px;
}

.prompt-action-sandbox-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #10a37f 0%, #0d8a6a 100%);
  color: #ffffff !important;
  font-size: 0.88rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 163, 127, 0.28);
  transition: all 0.2s ease;
}

.prompt-action-sandbox-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 163, 127, 0.38);
  filter: brightness(1.05);
}

@media (max-width: 960px) {
  .prompt-workbench-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================
   MINIMALIST PROFESSIONAL DIAGNOSTIC SYSTEM
   ========================================== */
.diag-result-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.diag-score-banner {
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 24px;
  padding: 24px 28px;
  box-shadow: var(--shadow-soft, 0 10px 25px rgba(0,0,0,0.04));
}

.diag-score-metric {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.diag-score-circle {
  width: 90px;
  height: 90px;
  border-radius: 24px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}

.diag-score-val {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
}

.diag-score-max {
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.85;
}

.diag-score-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 240px;
}

.diag-score-meta h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text, #0f172a);
}

.diag-score-meta p {
  margin: 0;
  font-size: 0.90rem;
  color: var(--muted, #64748b);
  line-height: 1.5;
}

.diag-score-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.diag-eval-tag {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
}

.diag-eval-tag.good {
  background: rgba(5, 150, 105, 0.10);
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.diag-eval-tag.fair {
  background: rgba(217, 119, 6, 0.10);
  color: #d97706;
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.diag-eval-tag.needs-work {
  background: rgba(220, 38, 38, 0.10);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.diag-xp-tag {
  font-size: 0.78rem;
  font-weight: 800;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 4px 12px;
  border-radius: 999px;
}

.diag-section-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.diag-section-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text, #0f172a);
}

.diag-section-header p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted, #64748b);
}

.diag-competency-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.diag-comp-col {
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.diag-comp-col.strong { border-top: 3.5px solid #059669; }
.diag-comp-col.moderate { border-top: 3.5px solid #d97706; }
.diag-comp-col.weak { border-top: 3.5px solid #dc2626; }

.diag-comp-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.diag-comp-head strong {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text, #0f172a);
}

.diag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.diag-dot.green { background: #059669; box-shadow: 0 0 6px rgba(5, 150, 105, 0.4); }
.diag-dot.amber { background: #d97706; box-shadow: 0 0 6px rgba(217, 119, 6, 0.4); }
.diag-dot.red { background: #dc2626; box-shadow: 0 0 6px rgba(220, 38, 38, 0.4); }

.diag-comp-body {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.diag-comp-pill {
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 0.80rem;
  font-weight: 700;
}

.diag-comp-pill.green { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.diag-comp-pill.amber { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.diag-comp-pill.red { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.diag-comp-empty {
  font-size: 0.82rem;
  color: var(--muted, #64748b);
  font-style: italic;
}

.diag-ai-box {
  background: var(--surface-soft, #f8fafc);
  border: 1.5px solid var(--line, #e2e8f0);
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.diag-ai-head {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brand, #2563eb);
}

.diag-ai-head strong {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text, #0f172a);
}

.diag-ai-content {
  font-size: 0.90rem;
  line-height: 1.75;
  color: var(--text, #1e293b);
}

.diag-roadmap-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.diag-week-card {
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 18px;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}

.diag-week-card.active {
  border-left: 4px solid var(--brand, #2563eb);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
}

.diag-week-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.diag-week-badge {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--surface-soft, #f1f5f9);
  color: var(--muted, #64748b);
}

.diag-week-badge.current {
  background: var(--brand-soft, rgba(37, 99, 235, 0.10));
  color: var(--brand, #2563eb);
}

.diag-week-status {
  font-size: 0.78rem;
  font-weight: 750;
  color: var(--muted, #64748b);
}

.diag-week-goal {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text, #0f172a);
}

.diag-week-focus {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted, #64748b);
  line-height: 1.5;
}

.diag-week-chapters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.diag-chapter-tag {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--surface-soft, #f1f5f9);
  color: var(--text, #1e293b);
  border: 1px solid var(--line, #e2e8f0);
}

.diag-actions-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 10px;
}

.diag-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  background: var(--brand, #2563eb);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}

.diag-action-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border: none;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.28);
}

/* Pre-test Intro Layout */
.diag-intro-card {
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 24px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  box-shadow: var(--shadow-soft, 0 10px 25px rgba(0,0,0,0.04));
}

.diag-intro-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.diag-intro-head h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text, #0f172a);
}

.diag-intro-head p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted, #64748b);
  line-height: 1.6;
}

.diag-intro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.diag-intro-item {
  background: var(--surface-soft, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 18px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.diag-intro-num {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--brand-soft, rgba(37, 99, 235, 0.10));
  color: var(--brand, #2563eb);
  font-size: 0.92rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.diag-intro-item h4 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text, #0f172a);
}

.diag-intro-item p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted, #64748b);
  line-height: 1.5;
}

@media (max-width: 860px) {
  .diag-competency-grid,
  .diag-intro-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================
   MINIMALIST PROFESSIONAL ROADMAP SYSTEM
   ========================================== */
.roadmap-summary-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 20px;
  padding: 18px 22px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-soft, 0 8px 20px rgba(0, 0, 0, 0.04));
}

.roadmap-summary-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--brand-soft, rgba(37, 99, 235, 0.10));
  color: var(--brand, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.roadmap-summary-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.roadmap-summary-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.roadmap-summary-title-row strong {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text, #0f172a);
}

.roadmap-summary-level-tag {
  font-size: 0.76rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
}

.roadmap-summary-level-tag.easy {
  background: rgba(5, 150, 105, 0.10);
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.roadmap-summary-level-tag.medium {
  background: rgba(217, 119, 6, 0.10);
  color: #d97706;
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.roadmap-summary-level-tag.hard {
  background: rgba(220, 38, 38, 0.10);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.roadmap-summary-info p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted, #64748b);
  line-height: 1.45;
}

.roadmap-milestones-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.roadmap-milestone-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 18px;
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow-soft, 0 6px 18px rgba(0, 0, 0, 0.03));
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.roadmap-milestone-card:hover {
  border-color: var(--brand, #2563eb);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.08);
}

.roadmap-milestone-index {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--brand, #2563eb);
  background: var(--surface-soft, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 54px;
}

.roadmap-milestone-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.roadmap-milestone-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.roadmap-milestone-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.roadmap-week-pill {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand, #2563eb);
  background: var(--brand-soft, rgba(37, 99, 235, 0.08));
  padding: 3px 9px;
  border-radius: 6px;
}

.roadmap-milestone-title-group h3 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text, #0f172a);
}

.roadmap-score-band {
  font-size: 0.78rem;
  font-weight: 750;
  color: var(--muted, #64748b);
  background: var(--surface-soft, #f1f5f9);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line, #e2e8f0);
}

.roadmap-milestone-desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text, #334155);
}

.roadmap-milestone-note {
  font-size: 0.82rem;
  color: var(--muted, #64748b);
  background: var(--surface-soft, #f8fafc);
  border-left: 3px solid var(--brand, #2563eb);
  padding: 8px 12px;
  border-radius: 0 8px 8px 0;
}

.roadmap-milestone-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.roadmap-quiz-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  padding: 9px 18px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.roadmap-quiz-action-btn.easy {
  background: #059669;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
}

.roadmap-quiz-action-btn.medium {
  background: #2563eb;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.roadmap-quiz-action-btn.hard {
  background: #7c3aed;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.25);
}

.roadmap-video-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 750;
  padding: 9px 16px;
  border-radius: 12px;
}

.roadmap-level-selector-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px dashed var(--line, #e2e8f0);
}

.roadmap-level-label {
  font-size: 0.78rem;
  font-weight: 750;
  color: var(--muted, #64748b);
}

.roadmap-level-pill-btn {
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line, #cbd5e1);
  background: var(--surface-soft, #f8fafc);
  color: var(--text, #475569);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.roadmap-level-pill-btn:hover {
  border-color: var(--brand, #2563eb);
  color: var(--brand, #2563eb);
  background: var(--brand-soft, #eff6ff);
}

.roadmap-level-pill-btn.active {
  background: var(--brand, #2563eb);
  color: #ffffff;
  border-color: var(--brand, #2563eb);
}

@media (max-width: 768px) {
  .roadmap-milestone-card {
    grid-template-columns: 1fr;
  }
  .roadmap-milestone-index {
    width: 44px;
    height: 44px;
    font-size: 1.05rem;
  }
}



/* ==========================================
   AUTH MODAL REDESIGN — Split Layout 2025
   ========================================== */

/* Override old modal box sizing for auth */
#authModal .modalBox,
#authModal .auth-modal-box {
  width: min(900px, 100%) !important;
  max-width: 900px !important;
  padding: 0 !important;
  border-radius: 28px !important;
  overflow: hidden !important;
  min-height: 560px !important;
  max-height: 90vh !important;
  background: #ffffff !important;
  box-shadow: 0 32px 80px rgba(15, 23, 42, 0.28) !important;
}

#authModal .auth-body {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

.auth-two-col-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  min-height: 560px;
}

/* LEFT PANEL */
.auth-split-left {
  background: linear-gradient(150deg, #1e3a8a 0%, #2563eb 50%, #7c3aed 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 28px;
  position: relative;
  overflow: hidden;
}

.auth-split-left::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -60px;
  width: 220px;
  height: 220px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

.auth-split-left::after {
  content: '';
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

.auth-split-left-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.auth-bear-wrap {
  animation: authBearFloat 3s ease-in-out infinite;
}

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

.auth-brand-title {
  color: #ffffff !important;
  font-size: 1.8rem !important;
  font-weight: 900 !important;
  letter-spacing: -0.02em !important;
  margin: 0 !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
}

.auth-brand-sub {
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 0.88rem !important;
  line-height: 1.55 !important;
  margin: 0 !important;
  max-width: 220px;
}

.auth-feature-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
  width: 100%;
}

.auth-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.84rem;
  font-weight: 650;
  background: rgba(255, 255, 255, 0.10);
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  text-align: left;
}

.auth-feature-item svg {
  flex-shrink: 0;
  opacity: 0.95;
}

/* RIGHT PANEL */
.auth-split-right {
  background: #ffffff;
  display: flex;
  flex-direction: column;
  padding: 32px 36px 28px;
  overflow-y: auto;
  max-height: 90vh;
  position: relative;
}

/* Close button inside right panel */
.authCloseBtn {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  color: #64748b !important;
  transition: all 0.2s ease !important;
  z-index: 10 !important;
}

.authCloseBtn:hover {
  background: #fee2e2 !important;
  color: #dc2626 !important;
  border-color: #fecaca !important;
}

/* Auth tabs redesign */
.auth-tabs-modern {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
}

.auth-tab {
  flex: 1;
  padding: 9px 4px;
  border-radius: 9px;
  font-size: 0.84rem;
  font-weight: 750;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 0.18s ease;
}

.auth-tab.active {
  background: #ffffff;
  color: #1e293b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  font-weight: 800;
}

/* Auth head section */
.auth-head {
  margin-bottom: 16px;
}

.auth-head h2 {
  margin: 0 0 5px;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.auth-head p {
  margin: 0;
  font-size: 0.87rem;
  color: #64748b;
  line-height: 1.5;
}

/* Auth fields */
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.auth-field-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: #334155;
  letter-spacing: 0.01em;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-wrap input,
.auth-input-wrap select {
  width: 100%;
  height: 44px;
  padding: 0 42px 0 42px;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  font-size: 0.90rem;
  color: #1e293b;
  background: #f8fafc;
  transition: all 0.18s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.auth-input-wrap input:focus,
.auth-input-wrap select:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  outline: none;
}

.auth-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.auth-eye-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
}

.auth-eye-btn:hover {
  color: #2563eb;
  background: #eff6ff;
}

/* Social buttons */
.auth-social-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  font-size: 0.90rem;
  font-weight: 750;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.18s ease;
  margin-bottom: 14px;
}

.auth-social-btn:hover {
  border-color: #2563eb;
  background: #f8fafc;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.auth-divider span {
  font-size: 0.76rem;
  color: #94a3b8;
  font-weight: 700;
  white-space: nowrap;
}

/* Auth 2col grid inside form */
.auth-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Submit button */
.auth-submit-btn {
  width: 100%;
  height: 50px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff !important;
  font-size: 1rem;
  font-weight: 800;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.32);
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

.auth-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.40);
  filter: brightness(1.05);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

/* Loading spinner inside submit */
.auth-btn-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Checkbox and options row */
.auth-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.auth-checkbox-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.83rem;
  color: #475569;
  cursor: pointer;
}

.auth-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  accent-color: #2563eb;
  cursor: pointer;
}

/* Link buttons */
.auth-link-btn {
  background: none;
  border: none;
  color: #2563eb;
  font-size: 0.83rem;
  font-weight: 750;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-link-btn:hover {
  color: #1d4ed8;
}

/* Switch text */
.auth-switch-text {
  text-align: center;
  font-size: 0.83rem;
  color: #64748b;
  margin-top: 12px;
}

/* Mobile: collapse to single column */
@media (max-width: 740px) {
  .auth-two-col-layout {
    grid-template-columns: 1fr;
  }
  .auth-split-left {
    display: none;
  }
  .auth-split-right {
    padding: 24px 20px;
  }
  #authModal .modalBox,
  #authModal .auth-modal-box {
    border-radius: 20px !important;
    min-height: auto !important;
  }
}


/* ==========================================
   BEAR MASCOT TOUR SYSTEM v4.2 — ZERO OVERFLOW & CLEAN MARGINS
   ========================================== */

/* ---- Welcome Modal ---- */
.tour-welcome-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: linear-gradient(135deg, #0b1329 0%, #1e1b4b 55%, #0b1329 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.45s ease;
}
.tour-welcome-modal.tw-visible { opacity: 1; }
.tour-welcome-modal.tw-exit {
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.tour-welcome-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 52px;
  padding: 40px 32px;
  max-width: 900px;
  width: 100%;
  position: relative;
}

.tw-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.tw-conf-piece {
  position: absolute;
  top: -20px;
  animation: confFall linear infinite;
}
@keyframes confFall {
  0%   { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

.tw-bear {
  flex-shrink: 0;
  opacity: 0;
  transform: translateY(40px) scale(0.8);
  animation: twBearIn 0.8s cubic-bezier(0.34,1.56,0.64,1) 0.1s forwards;
  filter: drop-shadow(0 16px 36px rgba(0,0,0,0.5));
}
@keyframes twBearIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.tw-content {
  flex: 1;
  color: #fff;
  opacity: 0;
  transform: translateY(16px);
  animation: twContentIn 0.6s ease 0.3s forwards;
}
@keyframes twContentIn { to { opacity: 1; transform: translateY(0); } }

.tw-badge {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.92);
  font-size: 0.84rem;
  font-weight: 750;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.tw-title {
  font-size: 3rem !important;
  font-weight: 900 !important;
  margin: 0 0 8px !important;
  letter-spacing: -0.03em !important;
  background: linear-gradient(120deg, #ffffff 0%, #93c5fd 50%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1 !important;
}
.tw-sub {
  color: rgba(255,255,255,0.72);
  font-size: 0.96rem;
  margin: 0 0 18px;
  line-height: 1.5;
}
.tw-feats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 24px;
}
.tw-feat {
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 9px 13px;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
}
.tw-actions { display: flex; flex-direction: column; gap: 10px; }
.tw-start {
  width: 100%;
  padding: 15px 24px;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  color: #fff !important;
  font-size: 1rem;
  font-weight: 800;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(37,99,235,0.45);
  transition: all 0.2s ease;
}
.tw-start:hover { transform: translateY(-2px); filter: brightness(1.08); }
.tw-skip {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.45);
  font-size: 0.83rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.18s;
}
.tw-skip:hover { color: rgba(255,255,255,0.75); }

/* ---- FIXED VIEWPORT SVG ARROW CANVAS ---- */
.tour-arrow-svg {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  pointer-events: none !important;
  z-index: 100005 !important;
  overflow: hidden !important;
}

#tourArrowPath {
  animation: arrowDashPulse 0.9s linear infinite;
  stroke-dasharray: 10 6;
  filter: drop-shadow(0 2px 8px rgba(249, 115, 22, 0.45));
}
@keyframes arrowDashPulse {
  to { stroke-dashoffset: -32; }
}

/* ---- TARGET PULSE RING ---- */
.tour-pulse-ring {
  position: fixed !important;
  pointer-events: none !important;
  z-index: 99990 !important;
  border: 3px solid #f97316 !important;
  border-radius: 14px !important;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.25), 0 0 20px rgba(249, 115, 22, 0.35) !important;
  animation: pulseRingGlow 1.3s ease-in-out infinite !important;
}
@keyframes pulseRingGlow {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(249,115,22,0.22), 0 0 16px rgba(249,115,22,0.25);
    border-color: #f97316;
  }
  50% {
    box-shadow: 0 0 0 10px rgba(249,115,22,0), 0 0 28px rgba(249,115,22,0.5);
    border-color: #fb923c;
  }
}

/* Target Element Highlight */
[data-tour-glow="true"] {
  outline: 2.5px solid rgba(249, 115, 22, 0.75) !important;
  outline-offset: 3px !important;
  border-radius: 10px;
  transition: outline 0.25s ease;
}

/* ---- BEAR MASCOT ---- */
.tour-bear {
  position: fixed !important;
  z-index: 100010 !important;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  filter: drop-shadow(0 12px 28px rgba(0,0,0,0.35));
  animation: bearHover 2.6s ease-in-out infinite;
}

@keyframes bearHover {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50%       { transform: translateY(-10px) rotate(1.5deg); }
}

/* Flipped bear (points left) */
.tour-bear.bear-flip {
  transform: scaleX(-1);
  animation: bearHoverFlip 2.6s ease-in-out infinite;
}

@keyframes bearHoverFlip {
  0%, 100% { transform: scaleX(-1) translateY(0) rotate(1.5deg); }
  50%       { transform: scaleX(-1) translateY(-10px) rotate(-1.5deg); }
}

/* ---- SPEECH BUBBLE (STRICT PROPORTIONS & ZERO HORIZONTAL SCROLL) ---- */
.tour-bubble {
  position: fixed !important;
  z-index: 100011 !important;
  width: 360px !important;
  max-width: calc(100vw - 32px) !important;
  box-sizing: border-box !important;
  filter: drop-shadow(0 14px 40px rgba(15, 23, 42, 0.22));
  overflow: hidden !important;
}

.tour-bubble-inner {
  background: #ffffff;
  border-radius: 22px;
  padding: 16px 20px 14px;
  border: 1.5px solid rgba(37, 99, 235, 0.16);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.15);
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
}

/* Header with Step Badge & Mini Progress Dots */
.tour-bubble-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin-bottom: 8px !important;
  padding-bottom: 6px !important;
  border-bottom: 1px solid rgba(241, 245, 249, 0.9) !important;
}

.tour-step-badge {
  font-size: 0.76rem !important;
  font-weight: 850 !important;
  color: #2563eb !important;
  background: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
  padding: 3px 10px !important;
  border-radius: 20px !important;
  letter-spacing: 0.02em !important;
  white-space: nowrap !important;
}

.tour-step-dots {
  display: flex !important;
  gap: 3px !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}

.tour-dot {
  width: 5px !important;
  height: 5px !important;
  border-radius: 50% !important;
  background: #cbd5e1 !important;
  display: inline-block !important;
  transition: all 0.2s ease !important;
}
.tour-dot.active {
  background: #2563eb !important;
  width: 12px !important;
  border-radius: 3px !important;
}

/* Title & Content with Clean Typography & Perfect Margins */
.tour-bubble-title {
  font-size: 1.02rem !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  margin: 0 0 6px 0 !important;
  line-height: 1.35 !important;
  letter-spacing: -0.01em !important;
}

.tour-bubble-msg {
  font-size: 0.88rem !important;
  color: #334155 !important;
  line-height: 1.58 !important;
  margin: 0 0 10px 0 !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
}

.tour-bubble-hint {
  margin: 0 0 10px 0 !important;
}

.tour-hint-box {
  display: inline-block !important;
  background: linear-gradient(135deg, #fffbeb, #fef3c7) !important;
  border: 1.5px solid #fde68a !important;
  color: #92400e !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  padding: 6px 12px !important;
  border-radius: 10px !important;
  animation: hintBounce 1.2s ease-in-out infinite !important;
  line-height: 1.4 !important;
}

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

/* Footer layout: Right aligned, ample spacing, no awkward wrapping */
.tour-bubble-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  margin-top: 10px !important;
  padding-top: 8px !important;
  border-top: 1px solid rgba(241, 245, 249, 0.9) !important;
}

/* Clear Skip button */
.tour-skip-btn {
  background: #f8fafc !important;
  border: 1.5px solid #e2e8f0 !important;
  color: #64748b !important;
  font-size: 0.82rem !important;
  font-weight: 750 !important;
  padding: 7px 14px !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
}

.tour-skip-btn:hover {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  color: #dc2626 !important;
}

.tour-next-btn {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  color: #fff !important;
  border: none !important;
  padding: 8px 18px !important;
  border-radius: 10px !important;
  font-size: 0.86rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  box-shadow: 0 4px 12px rgba(37,99,235,0.28) !important;
  transition: all 0.18s ease !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.tour-next-btn:hover {
  transform: translateY(-1px) !important;
  filter: brightness(1.07) !important;
}

.tour-next-btn.tour-btn-pulse {
  animation: btnPulse 1.1s ease infinite !important;
}
@keyframes btnPulse {
  0%, 100% { box-shadow: 0 4px 12px rgba(37,99,235,0.3); }
  50%      { box-shadow: 0 6px 20px rgba(37,99,235,0.6); transform: translateY(-1px); }
}

/* Countdown bar */
.tour-cdown-bar {
  height: 3px !important;
  background: #e2e8f0 !important;
  border-radius: 2px !important;
  margin-top: 8px !important;
  overflow: hidden !important;
}
.tour-cdown-fill {
  height: 100% !important;
  background: linear-gradient(90deg, #2563eb, #7c3aed) !important;
  border-radius: 2px !important;
  width: 100% !important;
}

/* ---- FLOATING TOUR BUTTON (High above Chatbot) ---- */
.tour-float-btn {
  position: fixed !important;
  bottom: 175px !important;     /* High above chatbot fab (24px) + callout (96px-150px) */
  right: 24px !important;
  z-index: 9005 !important;
  background: linear-gradient(135deg, #c8956c 0%, #a16207 100%) !important;
  border: 2.5px solid #ffffff !important;
  border-radius: 50px !important;
  padding: 8px 14px 8px 8px !important;
  display: none;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(168, 100, 45, 0.42) !important;
  animation: floatBtnHover 3s ease-in-out infinite;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.25s ease !important;
}

.tour-float-btn:hover {
  animation: none !important;
  transform: scale(1.08) translateY(-3px) !important;
  box-shadow: 0 12px 30px rgba(168, 100, 45, 0.55) !important;
}

@keyframes floatBtnHover {
  0%, 100% { transform: translateY(0); }
  45%     { transform: translateY(-6px); }
}

.tour-float-btn span {
  color: #ffffff !important;
  font-size: 0.82rem !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
  letter-spacing: 0.01em;
}

/* ---- Responsive adjustments ---- */
@media (max-width: 640px) {
  .tour-welcome-inner { flex-direction: column; gap: 20px; padding: 24px 18px; text-align: center; }
  .tw-title { font-size: 2rem !important; }
  .tw-feats { grid-template-columns: 1fr; }
  .tour-float-btn { right: 16px !important; bottom: 165px !important; }
  .tour-bubble { width: calc(100vw - 24px) !important; max-width: calc(100vw - 24px) !important; }
}

/* ---- Dark Theme Support ---- */
[data-theme="dark"] .tour-bubble-inner {
  background: #1e293b !important;
  border-color: rgba(96, 165, 250, 0.25) !important;
}
[data-theme="dark"] .tour-bubble-title { color: #f1f5f9 !important; }
[data-theme="dark"] .tour-bubble-msg { color: #94a3b8 !important; }
[data-theme="dark"] .tour-step-badge {
  background: #1e3a8a !important;
  border-color: #2563eb !important;
  color: #93c5fd !important;
}
[data-theme="dark"] .tour-bubble-header,
[data-theme="dark"] .tour-bubble-footer {
  border-color: rgba(51, 65, 85, 0.8) !important;
}
[data-theme="dark"] .tour-skip-btn {
  background: #334155 !important;
  border-color: #475569 !important;
  color: #cbd5e1 !important;
}
[data-theme="dark"] .tour-skip-btn:hover {
  background: #7f1d1d !important;
  border-color: #991b1b !important;
  color: #fca5a5 !important;
}
[data-theme="dark"] .tour-hint-box {
  background: linear-gradient(135deg, #451a03, #78350f) !important;
  border-color: #f59e0b !important;
  color: #fef3c7 !important;
}



/* ==========================================
   ADMIN DASHBOARD & USER MANAGEMENT ENHANCEMENTS
   ========================================== */
.admin-table-wrap {
  width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  background: var(--surface, #ffffff);
  border: 1.5px solid var(--line, #e2e8f0);
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
  margin-top: 12px;
}

.admin-data-table {
  width: 100% !important;
  min-width: 1100px !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  font-size: 0.88rem;
}

.admin-data-table th {
  background: #f8fafc !important;
  color: #475569 !important;
  font-weight: 800 !important;
  padding: 14px 16px !important;
  border-bottom: 1.5px solid var(--line, #e2e8f0) !important;
  white-space: nowrap !important;
  letter-spacing: 0.01em;
}

.admin-data-table td {
  padding: 12px 16px !important;
  border-bottom: 1px solid var(--line, #f1f5f9) !important;
  vertical-align: middle !important;
  background: inherit;
}

.admin-data-table tbody tr:hover td {
  background: #f8fafc !important;
}

.col-user { min-width: 180px; }
.col-email { min-width: 200px; }
.col-pwd { min-width: 155px; }
.col-grade { min-width: 130px; }
.col-role { min-width: 95px; }
.col-status { min-width: 110px; }
.col-time { min-width: 160px; }
.col-actions { min-width: 195px; }

.admin-actions-cell-wrap {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  white-space: nowrap !important;
}

.admin-act-btn {
  padding: 6px 12px !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  border-radius: 9px !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  cursor: pointer !important;
  transition: all 0.16s ease !important;
}

.admin-act-btn:hover {
  transform: translateY(-1px);
}

.admin-pwd-cell {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 3px 6px 3px 10px;
  border-radius: 10px;
}

.admin-pwd-text {
  font-family: Consolas, Monaco, monospace;
  font-size: 0.84rem;
  font-weight: 800;
  color: #0f172a;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-pwd-toggle {
  border: none;
  background: #e2e8f0;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 0.85rem;
  transition: background 0.15s ease;
}
.admin-pwd-toggle:hover { background: #cbd5e1; }

.admin-live-pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(34, 197, 94, 0.12);
  border: 1.5px solid rgba(34, 197, 94, 0.35);
  color: #15803d;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 30px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: liveDotPulse 1.6s infinite;
}

@keyframes liveDotPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

[data-theme="dark"] .admin-data-table th { background: #1e293b !important; color: #cbd5e1 !important; }
[data-theme="dark"] .admin-data-table td { border-bottom-color: #334155 !important; }
[data-theme="dark"] .admin-data-table tbody tr:hover td { background: #1e293b !important; }
[data-theme="dark"] .admin-pwd-cell { background: #334155; border-color: #475569; }
[data-theme="dark"] .admin-pwd-text { color: #f8fafc; }
[data-theme="dark"] .admin-pwd-toggle { background: #475569; }
[data-theme="dark"] .admin-live-pulse-badge { background: rgba(34, 197, 94, 0.2); color: #86efac; }



/* ==========================================
   FLOATING BROWSER NOTIFICATION PROMPT
   ========================================== */
.floating-notif-prompt {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  z-index: 99995 !important;
  max-width: 380px !important;
  width: calc(100vw - 32px) !important;
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  transition: opacity 0.35s cubic-bezier(0.16,1,0.3,1), transform 0.35s cubic-bezier(0.16,1,0.3,1);
  pointer-events: none;
}

.floating-notif-prompt.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.floating-notif-inner {
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  padding: 18px 18px 16px 18px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(37, 99, 235, 0.12);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.floating-notif-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 0.95rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: all 0.15s ease;
}
.floating-notif-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.floating-notif-bell {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #d97706;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.22);
  animation: bellSwing 2.5s ease-in-out infinite;
}

@keyframes bellSwing {
  0%, 100% { transform: rotate(0); }
  15% { transform: rotate(14deg); }
  30% { transform: rotate(-14deg); }
  45% { transform: rotate(8deg); }
  60% { transform: rotate(-8deg); }
  75% { transform: rotate(0); }
}

.floating-notif-content {
  flex: 1;
  padding-right: 14px;
}

.floating-notif-title {
  display: block;
  font-size: 0.96rem;
  font-weight: 850;
  color: #0f172a;
  margin-bottom: 4px;
}

.floating-notif-desc {
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.45;
  margin: 0 0 12px 0;
}

.floating-notif-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.floating-notif-btn-allow {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border: none;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 7px 16px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
  transition: all 0.16s ease;
}
.floating-notif-btn-allow:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.floating-notif-btn-later {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.16s ease;
}
.floating-notif-btn-later:hover {
  background: #f1f5f9;
  color: #334155;
}

/* ==========================================
   SYSTEM BROADCAST ANNOUNCEMENT BANNER
   ========================================== */
.system-broadcast-bar {
  width: 100%;
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 750;
  position: relative;
  z-index: 9999;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  animation: slideDownBroadcast 0.35s ease;
}

@keyframes slideDownBroadcast {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

.system-broadcast-bar.info {
  background: linear-gradient(90deg, #1e3a8a, #2563eb);
  color: #ffffff;
}
.system-broadcast-bar.warning {
  background: linear-gradient(90deg, #9a3412, #ea580c);
  color: #ffffff;
}
.system-broadcast-bar.success {
  background: linear-gradient(90deg, #065f46, #059669);
  color: #ffffff;
}
.system-broadcast-bar.danger {
  background: linear-gradient(90deg, #991b1b, #dc2626);
  color: #ffffff;
}

.system-broadcast-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  padding: 0 32px;
}

.broadcast-text {
  line-height: 1.4;
  text-align: center;
}

.broadcast-link {
  color: #fef08a !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 850;
  white-space: nowrap;
}

.broadcast-close {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}
.broadcast-close:hover {
  background: rgba(255,255,255,0.2);
  color: #ffffff;
}

/* ==========================================
   ADMIN NAV TABS SCROLLABLE
   ========================================== */
.admin-nav-tabs {
  display: flex !important;
  gap: 8px !important;
  overflow-x: auto !important;
  padding: 6px 0 10px !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.admin-nav-tabs::-webkit-scrollbar {
  height: 4px;
}
.admin-nav-tabs::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.3);
  border-radius: 4px;
}

.admin-tab-btn {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  padding: 9px 16px !important;
  font-size: 0.86rem !important;
  font-weight: 800 !important;
  border-radius: 12px !important;
  transition: all 0.18s ease !important;
}

[data-theme="dark"] .floating-notif-inner {
  background: #1e293b;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .floating-notif-title { color: #f8fafc; }
[data-theme="dark"] .floating-notif-desc { color: #94a3b8; }
[data-theme="dark"] .floating-notif-btn-later { background: #334155; border-color: #475569; color: #cbd5e1; }



/* ==========================================
   ADMIN DASHBOARD FULL-WIDTH RESPONSIVE FIX
   ========================================== */
#page-admin {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
}

.page-banner-admin {
  max-width: 1440px !important;
  margin: 0 auto 20px auto !important;
  width: 100% !important;
}

.admin-full-stack {
  max-width: 1440px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 0 20px 80px 20px !important;
  box-sizing: border-box !important;
}

.admin-table-wrap {
  width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  background: var(--surface, #ffffff);
  border: 1.5px solid var(--line, #e2e8f0);
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
  margin-top: 14px;
  padding-bottom: 8px;
}

.admin-data-table {
  width: 100% !important;
  min-width: 1160px !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

.admin-data-table th,
.admin-data-table td {
  padding: 13px 16px !important;
}

.col-user { min-width: 190px !important; }
.col-email { min-width: 210px !important; }
.col-pwd { min-width: 155px !important; }
.col-grade { min-width: 130px !important; }
.col-role { min-width: 95px !important; }
.col-status { min-width: 110px !important; }
.col-time { min-width: 165px !important; }
.col-actions { min-width: 200px !important; padding-right: 20px !important; }

/* Hide Tour Float Button and scale Chatbot FAB when inside #page-admin */
#page-admin.active ~ .tour-float-btn,
#page-admin[style*="display: block"] ~ .tour-float-btn,
body:has(#page-admin.active) .tour-float-btn {
  display: none !important;
}

#page-admin.active ~ #chatFab,
#page-admin[style*="display: block"] ~ #chatFab,
body:has(#page-admin.active) #chatFab {
  transform: scale(0.8) !important;
  bottom: 12px !important;
  right: 12px !important;
  opacity: 0.65 !important;
  transition: opacity 0.2s ease, transform 0.2s ease !important;
}

#page-admin.active ~ #chatFab:hover,
#page-admin[style*="display: block"] ~ #chatFab:hover,
body:has(#page-admin.active) #chatFab:hover {
  opacity: 1 !important;
  transform: scale(0.95) !important;
}

#page-admin.active ~ .chat-callout,
body:has(#page-admin.active) .chat-callout {
  display: none !important;
}



/* =========================================================================
   COMMUNITY STUDY CHAT & VIP PRO ADMIN STYLES
   ========================================================================= */

/* Floating Launcher Button (Messenger Logo above Bé Gấu) */
.community-chat-fab {
  position: fixed !important;
  bottom: 265px !important; /* Elevated higher above Bé Gấu */
  right: 24px !important;
  z-index: 99990 !important;
  width: 58px !important;
  height: 58px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle at 35% 25%, #ffffff 0%, #f0f7ff 15%, #0084ff 60%, #a800ff 100%) !important;
  border: 2.5px solid #ffffff !important;
  box-shadow: 0 10px 28px rgba(0, 106, 255, 0.45), 0 2px 8px rgba(168, 0, 255, 0.35), inset 0 2px 4px rgba(255, 255, 255, 0.6) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease !important;
  padding: 0 !important;
}

.community-chat-fab::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.5) 0%, transparent 65%);
  pointer-events: none;
}

.community-chat-fab:hover {
  transform: scale(1.14) translateY(-3px) !important;
  box-shadow: 0 16px 36px rgba(0, 106, 255, 0.6), 0 0 20px rgba(255, 51, 102, 0.45), 0 0 0 3px rgba(255, 255, 255, 0.95) !important;
}

.community-fab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 5px rgba(0, 50, 150, 0.35));
  animation: fabMsgFloat 2.8s ease-in-out infinite;
  z-index: 1;
}

.community-fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: linear-gradient(135deg, #ff1744 0%, #d50000 100%);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 900;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  padding: 0 6px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2.5px solid #ffffff;
  box-shadow: 0 4px 14px rgba(255, 23, 68, 0.85);
  animation: badgeRedPulse 1.6s infinite;
  z-index: 2;
}

.community-fab-tooltip {
  position: absolute;
  right: 64px;
  background: #0f172a;
  color: #ffffff;
  font-size: 12px;
  font-weight: 750;
  padding: 6px 12px;
  border-radius: 10px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(8px);
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

.community-chat-fab:hover .community-fab-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* Chat Window Modal / Popup */
.community-chat-window {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  width: 420px !important;
  max-width: calc(100vw - 32px) !important;
  height: 620px !important;
  max-height: calc(100vh - 60px) !important;
  z-index: 100010 !important;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(0, 106, 255, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.92) translateY(30px);
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.community-chat-window.open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.community-chat-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

/* Header */
.community-chat-header {
  padding: 14px 18px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.community-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.community-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #00B2FF, #006AFF);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.community-header-title {
  font-size: 0.95rem;
  font-weight: 850;
  display: block;
}

.community-header-online {
  font-size: 0.75rem;
  color: #4ade80;
  font-weight: 700;
}

.community-header-actions {
  display: flex;
  gap: 6px;
}

.community-hdr-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #ffffff;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background 0.15s ease;
}

.community-hdr-btn:hover {
  background: rgba(255,255,255,0.22);
}

/* Channels Bar */
.community-channel-bar {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  overflow-x: auto;
  scrollbar-width: none;
}

.community-channel-bar::-webkit-scrollbar {
  display: none;
}

.community-ch-btn {
  white-space: nowrap;
  padding: 5px 12px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 750;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.community-ch-btn.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

/* Chat Body / Messages Feed */
.community-chat-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #f1f5f9;
}

.community-messages-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.community-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
}

.community-empty-state span {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 8px;
}

.community-msg-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.community-msg-row.msg-me {
  flex-direction: row-reverse;
}

.community-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #3b82f6;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.community-msg-bubble-wrap {
  max-width: 78%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.community-msg-row.msg-me .community-msg-bubble-wrap {
  align-items: flex-end;
}

.community-msg-author {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
}

.author-role-badge {
  font-size: 0.7rem;
  background: #e2e8f0;
  color: #475569;
  padding: 1px 6px;
  border-radius: 6px;
  font-weight: 700;
}

.community-msg-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.45;
  word-break: break-word;
}

.bubble-other {
  background: #ffffff;
  color: #0f172a;
  border-top-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.bubble-me {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border-top-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.community-msg-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: #94a3b8;
}

.msg-quick-react-btn,
.msg-del-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.78rem;
  color: #64748b;
  padding: 0 2px;
  opacity: 0.7;
}
.msg-quick-react-btn:hover,
.msg-del-btn:hover { opacity: 1; color: #0f172a; }

/* ==========================================
   ✨ QUẢN TRỊ VIÊN VIP PRO ADMIN STYLES
   ========================================== */
.msg-admin-vip {
  position: relative;
  margin: 6px 0;
}

.admin-vip-avatar-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.admin-avatar-crown {
  position: absolute;
  top: -12px;
  font-size: 16px;
  z-index: 2;
  filter: drop-shadow(0 2px 4px rgba(234, 179, 8, 0.8));
  animation: crownBob 2s ease-in-out infinite;
}

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

.admin-vip-aura {
  border: 2.5px solid #facc15 !important;
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.8), inset 0 0 8px rgba(234, 179, 8, 0.6) !important;
  animation: auraPulse 2.5s infinite alternate !important;
}

@keyframes auraPulse {
  from { box-shadow: 0 0 8px rgba(250, 204, 21, 0.6); }
  to { box-shadow: 0 0 18px rgba(250, 204, 21, 1), 0 0 24px rgba(249, 115, 22, 0.6); }
}

.admin-vip-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 20px;
  background: linear-gradient(90deg, #1e1b4b, #312e81);
  border: 1px solid #fbbf24;
  color: #fde047;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35);
  margin-bottom: 3px;
}

.admin-aurora-card {
  position: relative;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #090d16 100%) !important;
  color: #ffffff !important;
  border: 1.5px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.35), 0 0 16px rgba(245, 158, 11, 0.3) !important;
  border-radius: 16px !important;
}

.admin-aurora-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  background: linear-gradient(60deg, #f79533, #f37055, #ef4e7b, #a166ab, #5073b8, #1098ad, #07b39b, #6fba82);
  z-index: -1;
  background-size: 300% 300%;
  animation: auroraFlow 4s ease infinite;
}

@keyframes auroraFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Media in Chat */
.chat-media-img-wrap {
  position: relative;
  margin-top: 6px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  max-width: 240px;
}

.chat-media-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.2s ease;
}

.chat-media-img-wrap:hover img {
  transform: scale(1.03);
}

.chat-img-zoom-hint {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0,0,0,0.65);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
}

/* Voice Player */
.chat-voice-player {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.06);
  padding: 6px 12px;
  border-radius: 20px;
  margin-top: 4px;
  cursor: pointer;
}

.msg-admin-vip .chat-voice-player {
  background: rgba(255,255,255,0.12);
}

.voice-player-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.voice-player-waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 16px;
}

.voice-player-waveform span {
  width: 2.5px;
  background: #3b82f6;
  border-radius: 2px;
  height: 8px;
  animation: waveIdle 1.2s ease-in-out infinite;
}

.voice-player-waveform span:nth-child(2) { height: 14px; animation-delay: 0.1s; }
.voice-player-waveform span:nth-child(3) { height: 10px; animation-delay: 0.2s; }
.voice-player-waveform span:nth-child(4) { height: 16px; animation-delay: 0.3s; }
.voice-player-waveform span:nth-child(5) { height: 12px; animation-delay: 0.4s; }

.voice-player-time {
  font-size: 0.72rem;
  font-weight: 750;
  opacity: 0.85;
}

/* Reactions */
.chat-reactions-row {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}

.chat-reaction-chip {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1px 6px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
}

.chat-reaction-chip.active {
  background: #eff6ff;
  border-color: #3b82f6;
  font-weight: 800;
}

/* Voice Recording Bar */
.community-voice-record-bar {
  background: #fee2e2;
  border-top: 1px solid #fca5a5;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.voice-rec-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

.voice-rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  animation: recBlink 1s infinite;
}

@keyframes recBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }

.voice-rec-timer {
  font-size: 0.88rem;
  font-weight: 850;
  color: #991b1b;
}

.voice-rec-wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 16px;
}

.voice-rec-wave span {
  width: 3px;
  background: #ef4444;
  height: 14px;
  border-radius: 2px;
  animation: waveActive 0.6s ease-in-out infinite alternate;
}

.voice-rec-actions {
  display: flex;
  gap: 6px;
}

.voice-cancel-btn {
  background: #ffffff;
  border: 1px solid #fca5a5;
  color: #991b1b;
  font-size: 0.78rem;
  font-weight: 750;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.voice-send-btn {
  background: #ef4444;
  color: #ffffff;
  border: none;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 8px;
  cursor: pointer;
}

/* Media Preview */
.community-media-preview {
  background: #ffffff;
  padding: 8px 14px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.preview-thumb-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
}

.preview-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-remove-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 10px;
  cursor: pointer;
}

/* Footer / Input */
.community-chat-footer {
  padding: 10px 14px 12px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.community-input-wrap textarea {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 0.88rem;
  font-family: inherit;
  resize: none;
  outline: none;
  max-height: 80px;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}

.community-input-wrap textarea:focus {
  border-color: #2563eb;
}

.community-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.community-tool-left {
  display: flex;
  gap: 4px;
}

.tool-icon-btn {
  background: transparent;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.tool-icon-btn:hover {
  background: #f1f5f9;
}

.community-send-btn {
  background: linear-gradient(135deg, #00B2FF, #006AFF);
  color: #ffffff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 106, 255, 0.35);
  transition: transform 0.15s ease;
}

.community-send-btn:hover {
  transform: scale(1.08);
}

.community-emoji-picker {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  padding: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1.2rem;
  text-align: center;
}

.community-emoji-picker span {
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
}
.community-emoji-picker span:hover { background: #e2e8f0; }

/* Lightbox Modal */
.chat-lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: none;
  align-items: center;
  justify-content: center;
}

.chat-lightbox-modal.open {
  display: flex;
}

.chat-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(4px);
}

.chat-lightbox-content {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.chat-lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}

.chat-lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}

.chat-lightbox-dl {
  background: #2563eb;
  color: #fff;
  padding: 8px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 750;
  font-size: 0.85rem;
}

/* Community Chat Fab visible on all pages */

[data-theme="dark"] .community-chat-window {
  background: #1e293b;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
}
[data-theme="dark"] .community-channel-bar { background: #0f172a; border-color: #334155; }
[data-theme="dark"] .community-ch-btn { background: #1e293b; border-color: #334155; color: #94a3b8; }
[data-theme="dark"] .community-chat-body { background: #0f172a; }
[data-theme="dark"] .bubble-other { background: #1e293b; color: #f8fafc; }
[data-theme="dark"] .community-chat-footer { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .community-input-wrap textarea { background: #0f172a; border-color: #334155; color: #f8fafc; }



/* =========================================================================
   5 SUPER FEATURES STYLES: PVP 1VS1, MOCK EXAM, PREDICTOR, FLASHCARDS, CERTIFICATE
   ========================================================================= */

/* 1. PVP ARENA STYLES */
.page-banner-battle { --page-banner: #b91c1c; --page-banner-2: #ef4444; --page-banner-bg: #fef2f2; }

.pvp-arena-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 10px 0 40px;
}

.pvp-hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0f172a;
  color: #ffffff;
  padding: 16px 20px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  gap: 16px;
}

.pvp-hud-player {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pvp-player-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pvp-hud-player.opponent .pvp-player-info {
  justify-content: flex-end;
}

.pvp-score-badge {
  font-size: 0.76rem;
  color: #facc15;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pvp-hp-bar-wrap {
  width: 100%;
  height: 12px;
  background: #334155;
  border-radius: 6px;
  overflow: hidden;
}

.pvp-hp-fill {
  height: 100%;
  transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pvp-hud-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.pvp-timer-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.6);
  animation: timerHeartbeat 1s infinite;
}

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

.pvp-q-indicator {
  font-size: 0.76rem;
  color: #94a3b8;
  font-weight: 800;
}

.pvp-question-box {
  padding: 24px;
  border-radius: 20px;
}

.pvp-question-stem {
  font-size: 1.15rem;
  font-weight: 750;
  line-height: 1.55;
  margin-bottom: 20px;
  color: #0f172a;
}

.pvp-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pvp-opt-btn {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.16s ease;
}

.pvp-opt-btn span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #2563eb;
  flex-shrink: 0;
}

.pvp-opt-btn:hover:not(:disabled) {
  border-color: #2563eb;
  background: #f8fafc;
  transform: translateY(-2px);
}

.pvp-result-card {
  text-align: center;
  padding: 50px 24px;
  border-radius: 24px;
  max-width: 680px;
  margin: 20px auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.pvp-result-card.victory {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 3px solid #10b981;
  color: #065f46;
}

.pvp-result-card.defeat {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 3px solid #ef4444;
  color: #991b1b;
}

/* 2. MOCK EXAM SIMULATOR STYLES */
.page-banner-mock { --page-banner: #1e40af; --page-banner-2: #2563eb; --page-banner-bg: #eff6ff; }

.mock-subject-card {
  padding: 24px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.mock-subject-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.15);
}

.mock-exam-workspace {
  max-width: 1200px;
  margin: 0 auto;
}

.mock-exam-topbar {
  position: sticky;
  top: 70px;
  z-index: 40;
  background: #ffffff;
  padding: 12px 20px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border: 1px solid #e2e8f0;
}

.mock-countdown-badge {
  font-size: 1.25rem;
  font-weight: 900;
  color: #2563eb;
  background: #eff6ff;
  padding: 6px 14px;
  border-radius: 10px;
  border: 1.5px solid #bfdbfe;
}

.mock-split-container {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

.mock-questions-scroll {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mock-q-block {
  background: #ffffff;
  border-radius: 18px;
  padding: 20px;
  border: 1.5px solid #e2e8f0;
  scroll-margin-top: 150px;
}

.mock-q-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.mock-flag-btn {
  background: transparent;
  border: 1px solid #cbd5e1;
  font-size: 0.75rem;
  font-weight: 750;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.mock-flag-btn.active {
  background: #fef2f2;
  border-color: #ef4444;
  color: #ef4444;
}

.mock-q-stem {
  font-size: 1.02rem;
  font-weight: 650;
  line-height: 1.5;
  margin-bottom: 14px;
}

.mock-options-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mock-opt-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mock-opt-label.selected {
  background: #eff6ff;
  border-color: #2563eb;
}

.mock-opt-label input { display: none; }

.mock-opt-letter {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f1f5f9;
  font-weight: 850;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
}

.mock-opt-label.selected .mock-opt-letter {
  background: #2563eb;
  color: #ffffff;
}

.mock-matrix-sidebar {
  position: sticky;
  top: 160px;
  background: #ffffff;
  border-radius: 18px;
  padding: 18px;
  border: 1.5px solid #e2e8f0;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
}

.mock-matrix-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.mock-matrix-cell {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 800;
  font-size: 0.85rem;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  transition: all 0.15s ease;
}

.mock-matrix-cell.answered {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.mock-matrix-cell.flagged {
  border-color: #ef4444;
  box-shadow: inset 0 0 0 2px #ef4444;
}

.mock-score-big {
  font-size: 3.5rem;
  font-weight: 900;
  color: #2563eb;
}

/* 3. AI UNIVERSITY PREDICTOR STYLES */
.page-banner-predictor { --page-banner: #065f46; --page-banner-2: #10b981; --page-banner-bg: #ecfdf5; }

.pred-gauge-circle {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 6px solid #10b981;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}

/* 4. FLASHCARD 3D FLIP STYLES */
.page-banner-flashcards { --page-banner: #581c87; --page-banner-2: #8b5cf6; --page-banner-bg: #faf5ff; }

.fc-card-container {
  width: 100%;
  max-width: 680px;
  height: 360px;
  margin: 24px auto;
  perspective: 1200px;
  position: relative;
  box-sizing: border-box;
}

.fc-flip-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.fc-flip-card.flipped {
  transform: rotateY(180deg);
}

.fc-card-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 24px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  border: 2px solid #e2e8f0;
}

.fc-front {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  color: #0f172a;
}

.fc-back {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  color: #ffffff;
  transform: rotateY(180deg);
  border-color: #8b5cf6;
}

.fc-badge {
  align-self: flex-start;
  font-size: 0.76rem;
  font-weight: 850;
  padding: 5px 12px;
  border-radius: 12px;
  background: #e0e7ff;
  color: #3730a3;
  letter-spacing: 0.5px;
}

.fc-content-text {
  font-size: 1.32rem;
  font-weight: 750;
  line-height: 1.6;
  text-align: center;
  margin: auto 0;
  white-space: pre-line;
  color: inherit;
}

.fc-tip-box {
  background: rgba(255,255,255,0.12);
  border-left: 4px solid #facc15;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  color: #fef08a;
  text-align: left;
  line-height: 1.45;
}

.fc-flip-hint {
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Certificate Customizer Styles */
.cert-customizer-card {
  max-width: 900px;
  margin: 0 auto 30px;
  padding: 24px;
  border-radius: 20px;
  border-top: 4px solid #d97706;
}
.cert-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 14px;
}
/* 5. CERTIFICATE LUXURY STYLES */
.certificate-frame-wrap {
  width: 100%;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.cert-gold-border {
  padding: 16px;
  background: linear-gradient(135deg, #d4af37 0%, #f3e5ab 50%, #aa7c11 100%);
}

.cert-inner-content {
  background: #fdfbf7;
  border: 2px dashed #b8860b;
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  color: #2c2416;
}

.cert-header-seal h2 {
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #8b6508;
  margin: 6px 0 2px;
}

.cert-subtitle {
  font-size: 0.78rem;
  font-weight: 800;
  color: #a0781c;
  letter-spacing: 1px;
}

.cert-student-name {
  font-size: 2.2rem;
  font-weight: 900;
  color: #1a365d;
  margin: 8px 0;
  font-family: serif;
}

.cert-score-highlight {
  display: inline-block;
  background: #d4af37;
  color: #ffffff;
  font-weight: 850;
  font-size: 0.88rem;
  padding: 4px 16px;
  border-radius: 20px;
  margin-top: 10px;
}

.cert-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid rgba(184, 134, 11, 0.25);
}

.cert-seal-stamp {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2.5px solid #dc2626;
  color: #dc2626;
  font-weight: 900;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transform: rotate(-12deg);
  margin: 0 auto 6px;
}

[data-theme="dark"] .pvp-opt-btn { background: #1e293b; border-color: #334155; color: #f8fafc; }
[data-theme="dark"] .mock-q-block { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .mock-matrix-sidebar { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .mock-opt-label { border-color: #334155; }
[data-theme="dark"] .fc-front { background: #1e293b; color: #f8fafc; border-color: #334155; }



/* =========================================================================
   CLEAN PROFESSIONAL UI & CERTIFICATE PAGE STYLES
   ========================================================================= */

.clean-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08) !important;
}

.clean-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.page-banner-cert { --page-banner: #b45309; --page-banner-2: #d97706; --page-banner-bg: #fffbeb; }

.certificate-container {
  max-width: 900px;
  margin: 0 auto 30px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.certificate-outer-gold {
  padding: 18px;
  background: linear-gradient(135deg, #d4af37 0%, #fef3c7 35%, #d97706 70%, #aa7c11 100%);
}

.certificate-inner-sheet {
  position: relative;
  background: #fdfbf7;
  border: 2.5px solid #b8860b;
  border-radius: 14px;
  padding: 40px 32px 30px;
  text-align: center;
  color: #2c2416;
}

.cert-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: #d4af37;
  border-style: solid;
}
.cert-corner.top-left { top: 8px; left: 8px; border-width: 3px 0 0 3px; }
.cert-corner.top-right { top: 8px; right: 8px; border-width: 3px 3px 0 0; }
.cert-corner.bottom-left { bottom: 8px; left: 8px; border-width: 0 0 3px 3px; }
.cert-corner.bottom-right { bottom: 8px; right: 8px; border-width: 0 3px 3px 0; }

.cert-republic-text {
  font-size: 0.85rem;
  font-weight: 850;
  color: #8b6508;
  line-height: 1.4;
  margin: 6px 0 10px;
  letter-spacing: 1px;
}

.cert-main-title {
  font-family: serif;
  font-size: 2rem;
  font-weight: 900;
  color: #8b6508;
  letter-spacing: 3px;
  margin: 8px 0 4px;
}

.cert-org-text {
  font-size: 0.82rem;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 1.5px;
}

.cert-content-body {
  margin: 28px 0 24px;
}

.cert-text-lead {
  font-size: 0.95rem;
  color: #475569;
  font-style: italic;
}

.cert-student-fullname {
  font-family: serif;
  font-size: 2.5rem;
  font-weight: 900;
  color: #1e3a8a;
  margin: 8px 0 4px;
  letter-spacing: 2px;
}

.cert-class-tag {
  display: inline-block;
  font-size: 0.92rem;
  font-weight: 800;
  color: #d97706;
  margin-bottom: 12px;
}

.cert-reason-text {
  font-size: 1rem;
  color: #334155;
  line-height: 1.5;
  max-width: 620px;
  margin: 0 auto 16px;
}

.cert-distinction-badge {
  display: inline-block;
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #ffffff;
  font-weight: 850;
  font-size: 0.88rem;
  padding: 6px 20px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(184, 134, 11, 0.3);
}

.cert-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid rgba(184, 134, 11, 0.25);
  text-align: left;
}

.cert-qr-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cert-qr-box {
  background: #ffffff;
  padding: 6px;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.cert-qr-meta strong {
  font-size: 0.72rem;
  color: #64748b;
  display: block;
}

.cert-qr-meta code {
  font-size: 0.8rem;
  color: #0f172a;
  font-weight: 800;
}

.cert-authority-block {
  text-align: center;
}

.cert-authority-block small {
  display: block;
  font-size: 0.78rem;
  color: #64748b;
  margin-bottom: 4px;
}

.cert-sign-role {
  font-size: 0.85rem;
  font-weight: 850;
  color: #1e293b;
  display: block;
}

.cert-red-seal {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 2.5px solid #dc2626;
  color: #dc2626;
  font-weight: 900;
  font-size: 0.65rem;
  line-height: 1.25;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transform: rotate(-10deg);
  margin: 6px auto;
  box-shadow: inset 0 0 0 2px rgba(220, 38, 38, 0.2);
}

.cert-signer-name {
  font-family: serif;
  font-size: 1.15rem;
  font-weight: 850;
  color: #1e3a8a;
}



/* =========================================================================
   PVP 1VS1 RADAR MATCHMAKING & BOT ARENA STYLES
   ========================================================================= */

.pvp-radar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pvp-radar-card {
  background: #0f172a;
  border: 2px solid #334155;
  border-radius: 24px;
  max-width: 480px;
  width: 100%;
  padding: 36px 24px;
  text-align: center;
  color: #ffffff;
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}

.pvp-radar-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 2px solid rgba(239, 68, 68, 0.4);
  margin: 0 auto 20px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.15) 0%, transparent 70%);
}

.pvp-radar-scanner {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, transparent 270deg, rgba(239, 68, 68, 0.6) 360deg);
  animation: radarSweep 1.8s linear infinite;
}

@keyframes radarSweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.pvp-radar-avatar-center {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #1e293b;
  border: 2px solid #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  z-index: 2;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

.pvp-streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-weight: 850;
  font-size: 0.78rem;
  padding: 4px 12px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.pvp-diff-selector {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.pvp-diff-btn {
  padding: 10px 8px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.16s ease;
}

.pvp-diff-btn.active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1e40af;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}


/* Modern HTML5 Video Showcase */
.custom-video-wrapper video {
  outline: none;
  border: none;
}
.custom-video-wrapper video::-webkit-media-controls-panel {
  background-image: linear-gradient(transparent, rgba(0,0,0,0.7));
}
/* =========================================================================
   AI SCHOLAR — MOBILE RESPONSIVE SYSTEM (Phone 320px - 768px)
   Comprehensive mobile fixes for all modules
   ========================================================================= */

/* === GLOBAL MOBILE BASE === */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .content-stack {
    padding: 0 12px;
  }

  .section-heading h2 {
    font-size: 1.4rem;
  }

  /* Fix page banners on mobile */
  .page-banner .banner-head h1,
  .page-banner h1 {
    font-size: 1.5rem !important;
    line-height: 1.3;
  }

  .page-banner .banner-head p {
    font-size: 0.9rem !important;
  }

  /* Fix panels overflow */
  .panel {
    padding: 16px;
  }

  /* Fix generic grids */
  [style*="grid-template-columns: repeat(auto-fit"] {
    grid-template-columns: 1fr !important;
  }
}

/* === NAV / HAMBURGER MENU === */
@media (max-width: 960px) {
  .nav-links a span,
  .nav-links a > span:not(.nav-ic) {
    display: none;
  }

  .nav-links a {
    padding: 8px 10px;
    font-size: 0;
  }

  .nav-ic {
    font-size: 1rem;
    display: block;
  }
}

@media (max-width: 680px) {
  /* Full drawer nav on small phones */
  .nav {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 12px 0;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    overflow: visible;
  }

  .nav-links a {
    font-size: 1rem;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .nav-links a span {
    display: inline;
  }

  .nav-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
}

/* === HOME PAGE MOBILE === */
@media (max-width: 768px) {
  /* 5-feature cards grid: 2 col */
  .home-features-grid,
  div[style*="grid-template-columns:repeat(auto-fit, minmax(220px"],
  div[style*="grid-template-columns: repeat(auto-fit, minmax(220px"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  /* Hero video card */
  .hero-video-card {
    border-radius: 20px !important;
    padding: 14px !important;
  }

  .custom-video-wrapper video {
    border-radius: 14px;
  }

  /* About panel */
  .home-about-panel {
    flex-direction: column;
    gap: 16px;
  }
}

@media (max-width: 400px) {
  .home-features-grid,
  div[style*="grid-template-columns:repeat(auto-fit, minmax(220px"],
  div[style*="grid-template-columns: repeat(auto-fit, minmax(220px"] {
    grid-template-columns: 1fr !important;
  }
}

/* === MOCK EXAM MOBILE === */
@media (max-width: 900px) {
  .mock-exam-workspace {
    padding: 0 8px;
  }

  .mock-exam-topbar {
    top: 0;
    border-radius: 0;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
  }

  .mock-exam-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 0.9rem;
  }

  .mock-exam-stats {
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    justify-content: space-between;
  }

  /* Stack exam body: questions above, matrix sidebar below */
  .mock-exam-body,
  .mock-split-container {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  /* Matrix sidebar becomes horizontal scrollable strip on mobile */
  .mock-matrix-sidebar {
    position: static !important;
    order: -1;
    border-radius: 16px;
    padding: 14px;
  }

  .mock-matrix-grid {
    grid-template-columns: repeat(10, 1fr) !important;
    gap: 4px;
  }

  .mock-matrix-cell {
    width: 28px;
    height: 28px;
    font-size: 0.68rem;
    border-radius: 6px;
  }

  .mock-q-block {
    padding: 14px;
    border-radius: 14px;
  }

  .mock-q-stem {
    font-size: 0.96rem;
  }
}

@media (max-width: 480px) {
  .mock-matrix-grid {
    grid-template-columns: repeat(8, 1fr) !important;
  }

  .mock-exam-topbar > .mock-exam-title strong {
    font-size: 0.88rem;
  }
}

/* === BATTLE / PVP ARENA MOBILE === */
@media (max-width: 768px) {
  .pvp-arena-container {
    padding: 0 8px;
  }

  /* HUD header: stack players vertically with VS in middle */
  .pvp-hud-header {
    flex-direction: column !important;
    gap: 10px !important;
    align-items: stretch !important;
    padding: 12px 14px !important;
  }

  .pvp-hud-player {
    width: 100% !important;
  }

  .pvp-hud-vs {
    text-align: center;
    font-size: 1.2rem !important;
    padding: 6px 0 !important;
  }

  /* Battle options: 2 columns */
  .pvp-diff-selector {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
  }

  /* Battle mode cards stack */
  .battle-mode-grid,
  div[style*="display:grid"][style*="pvp"] {
    grid-template-columns: 1fr !important;
  }

  /* Question block in active battle */
  .battle-question-card {
    padding: 14px 12px;
    border-radius: 16px;
  }

  .battle-options-grid {
    grid-template-columns: 1fr !important;
  }

  /* Radar overlay full screen on mobile */
  .pvp-radar-card {
    max-width: 100%;
    border-radius: 16px;
    padding: 24px 16px;
  }
}

/* === FLASHCARD MOBILE === */
@media (max-width: 768px) {
  .fc-card-container {
    height: 280px !important;
    max-width: 100% !important;
  }

  .fc-card-front,
  .fc-card-back {
    border-radius: 16px !important;
    padding: 20px 16px !important;
  }

  .fc-term {
    font-size: 1.1rem !important;
  }

  .fc-definition {
    font-size: 0.9rem !important;
  }

  .fc-subject-pills {
    flex-wrap: wrap;
    gap: 6px;
  }

  .fc-subject-pill {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
}

/* === CERTIFICATE / BANG KHEN MOBILE === */
@media (max-width: 768px) {
  .cert-award {
    padding: 20px 12px !important;
    border-radius: 16px !important;
    max-width: 100% !important;
  }

  .cert-title {
    font-size: 1.4rem !important;
  }

  .cert-recipient-name {
    font-size: 1.8rem !important;
  }

  .cert-reason-text {
    font-size: 0.9rem !important;
    max-width: 100% !important;
  }

  .cert-footer-row {
    flex-direction: column !important;
    align-items: center !important;
    gap: 16px !important;
  }

  .cert-customizer-card {
    border-radius: 16px;
    padding: 16px 14px;
  }

  .cert-form-grid,
  .cert-customizer-grid {
    grid-template-columns: 1fr !important;
  }
}

/* === LEADERBOARD MOBILE === */
@media (max-width: 640px) {
  .leaderboard-podium {
    grid-template-columns: 1fr !important;
  }

  .podium-card {
    transform: none !important;
  }
}

/* === PREDICTOR / AI TOOLS MOBILE === */
@media (max-width: 768px) {
  .predictor-main-layout,
  .predictor-grid {
    grid-template-columns: 1fr !important;
  }

  .predictor-uni-card {
    padding: 14px;
  }
}

/* === PROFILE / DASHBOARD MOBILE === */
@media (max-width: 640px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .profile-layout {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 420px) {
  .dashboard-grid {
    grid-template-columns: 1fr !important;
  }
}

/* === SCHOLAR CHAT BUBBLE MOBILE === */
@media (max-width: 480px) {
  #scholarChatToggle {
    bottom: 16px !important;
    right: 16px !important;
    width: 52px !important;
    height: 52px !important;
    font-size: 1.2rem !important;
  }
}

/* === MODAL MOBILE === */
@media (max-width: 540px) {
  .modalBox,
  .modal-box {
    width: calc(100vw - 20px) !important;
    max-width: 100% !important;
    border-radius: 20px !important;
    max-height: 90vh;
    overflow-y: auto;
  }
}

/* === GENERAL TABLE/GRID MOBILE SAFETY NET === */
@media (max-width: 480px) {
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .content-stack {
    padding: 0 10px;
  }

  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.1rem; }

  .btn {
    padding: 9px 14px;
    font-size: 0.9rem;
  }

  .chip {
    font-size: 0.72rem;
    padding: 3px 8px;
  }
}

/* === LEADERBOARD & PVP AVATARS & MOBILE PERFECTION === */
.podium-avatar {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}
.lb-user-avatar {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}
@media (max-width: 768px) {
  .leaderboard-podium {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }
  .podium-card.rank-1 {
    order: -1 !important;
    transform: none !important;
  }
  .leaderboard-tabs-bar {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 8px !important;
    padding-bottom: 8px !important;
  }
  .leaderboard-tab-btn {
    flex-shrink: 0 !important;
  }
}
/* ============================================================
   MATH / LATEX RENDERING STYLES
   ============================================================ */
.math-inline {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-style: italic;
  background: rgba(99, 102, 241, 0.07);
  color: #4338ca;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.97em;
  letter-spacing: 0.01em;
  display: inline-block;
  vertical-align: baseline;
  white-space: nowrap;
}
[data-theme=dark] .math-inline {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}
.math-display {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-style: italic;
  background: rgba(99, 102, 241, 0.06);
  border-left: 3px solid #6366f1;
  color: #3730a3;
  border-radius: 6px;
  padding: 10px 16px;
  margin: 8px 0;
  font-size: 1.05rem;
  overflow-x: auto;
  text-align: center;
  line-height: 1.8;
}
[data-theme=dark] .math-display {
  background: rgba(99, 102, 241, 0.12);
  border-left-color: #818cf8;
  color: #c7d2fe;
}
.math-frac {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  vertical-align: middle;
  margin: 0 3px;
  font-style: italic;
}
.math-num {
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  line-height: 1.2;
}
.math-den {
  padding-top: 1px;
  line-height: 1.2;
}

/* ============================================================
   SOCRATIC AI TYPING DOTS
   ============================================================ */
.soc-typing-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #8b5cf6;
  border-radius: 50%;
  animation: soc-dot-bounce 1.3s infinite ease-in-out;
}
.soc-typing-dot:nth-child(2) { animation-delay: 0.18s; }
.soc-typing-dot:nth-child(3) { animation-delay: 0.36s; }
@keyframes soc-dot-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-5px); opacity: 1; }
}

/* ============================================================
   CG TYPING DOTS (ChatGPT Sandbox existing dots — ensure styled)
   ============================================================ */
.cg-typing-dot {
  width: 7px;
  height: 7px;
  background: #6366f1;
  border-radius: 50%;
  display: inline-block;
  animation: cg-dot-pulse 1.2s infinite ease-in-out;
}
.cg-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.cg-typing-dot:nth-child(3) { animation-delay: 0.4s; }
.cg-typing-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 2px;
}
@keyframes cg-dot-pulse {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}
