/* Oval cards row for Detection Tips & Your Stats (game page) */
.oval-cards-row {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  justify-content: center;
  margin: 2.2rem 0 1.5rem 0;
}
.oval-card.warm-oval {
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(255, 236, 200, 0.82) 0%, rgba(255, 214, 164, 0.72) 100%);
  box-shadow: 0 4px 32px 0 rgba(255, 180, 80, 0.10), 0 1.5px 8px 0 rgba(255, 180, 80, 0.08);
  border: 1.5px solid rgba(255, 180, 80, 0.18);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  opacity: 0.96;
  transition: box-shadow 0.2s, background 0.2s;
}
.oval-card.warm-oval h3 {
  color: #b97a2a;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.oval-card.warm-oval ul li,
.oval-card.warm-oval span,
.oval-card.warm-oval div {
  color: #7a4c1b !important;
}
.oval-card.warm-oval span[id^="sidebar"] {
  color: #b97a2a !important;
}
@media (max-width: 900px) {
  .oval-cards-row {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
}
/* Sidebar cards row for game page */
/* Trainee 框優化：右邊直接分數 */
.badge-info {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

#nextRankInfo {
    font-weight: 600 !important;
    color: var(--accent-cyan) !important;
    margin: 0 !important;
}

/* 電燈泡提示按鈕 */
.tip-toggle {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    background: none !important;
    border: none !important;
    font-size: 20px !important;
    cursor: pointer !important;
    color: var(--text-secondary) !important;
    padding: 4px !important;
    border-radius: 50% !important;
    transition: all 0.2s !important;
    z-index: 5 !important;
}

.tip-toggle:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #FFD60A !important;
    transform: scale(1.1) !important;
}

/* Tips Modal - 乾淨彈出 */
.tips-modal {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(8px) !important;
    z-index: 10000 !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
}

.tips-modal.show {
    display: flex !important;
}

.tips-modal-content {
    background: var(--glass-bg-strong) !important;
    backdrop-filter: blur(25px) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 24px !important;
    max-width: 420px !important;
    width: 90% !important;
    max-height: 80vh !important;
    padding: 32px !important;
    position: relative !important;
    animation: modalSlideIn 0.3s cubic-bezier(0.25, 0.1, 0.25, 1) !important;
}

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

.modal-close {
    position: absolute !important;
    top: 16px !important;
    right: 20px !important;
    background: none !important;
    border: none !important;
    font-size: 24px !important;
    cursor: pointer !important;
    color: var(--text-secondary) !important;
}

.tips-list {
    list-style: none !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    padding: 0 !important;
}

.tips-list li {
    padding: 16px !important;
    margin-bottom: 12px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    border-left: 4px solid #6DAF8D !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
}

.modal-title {
    text-align: center !important;
    font-size: 24px !important;
    margin-bottom: 24px !important;
    color: var(--text-primary) !important;
}


/* =====================================================
   NeoTrace — Apple-Inspired Transparent Minimalist Design
   SF Pro + Frosted Glass + Dark/Light Theme System
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ===== Design Tokens — Dark Theme (default) ===== */
:root {
  /* ── Dark Mode (premium deep teal-black) ── */
  --bg-primary: #060F10;      /* deep dark teal — cinematic night */
  --bg-secondary: #0B1618;    /* subtle teal lift */
  --bg-tertiary: #121E20;     /* cards & panels */
  --bg-elevated: #0E1A1C;     /* modals & popovers */
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.10);
  --glass-bg: rgba(255, 255, 255, 0.05);         /* visible glass tint */
  --glass-bg-strong: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.10);
  --glass-border-hover: rgba(255, 255, 255, 0.20);
  --text-primary: rgba(245, 248, 250, 0.97);   /* crisp cool-white */
  --text-secondary: rgba(210, 225, 230, 0.72); /* soft teal-tinted mid-tone */
  --text-tertiary: rgba(190, 210, 220, 0.50);  /* de-emphasised */
  --text-muted: rgba(170, 195, 210, 0.36);     /* placeholders */
  --accent: #0A84FF;
  --accent-soft: rgba(10, 132, 255, 0.15);
  --accent-glow: rgba(10, 132, 255, 0.30);
  --green: #34D162;
  --red: #FF453A;
  --orange: #FF9F0A;
  --yellow: #FFD60A;
  --cyan: #5AC8FA;
  --purple: #BF5AF2;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.65);
  --shadow-xl: 0 20px 64px rgba(0, 0, 0, 0.75);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition: all 0.3s var(--ease);
  --transition-slow: all 0.5s var(--ease);
}

/* ===== Light Theme ===== */
[data-theme="light"] {
  /* ── Light Mode (pastel rainbow glass) ── */
  --bg-primary: #F7F5FC;      /* soft lavender-white base */
  --bg-secondary: #F0EEF8;   /* gentle tint */
  --bg-tertiary: #E8E6F2;    /* subtle separation */
  --bg-elevated: #FFFFFF;    /* pure white for cards/modals */
  --bg-card: rgba(0, 0, 0, 0.024);
  --bg-card-hover: rgba(0, 0, 0, 0.048);
  --card-bg: rgba(255, 255, 255, 0.82);
  --card-border: rgba(0, 0, 0, 0.09);
  --glass-bg: rgba(255, 255, 255, 0.72);      /* clean white glass */
  --glass-bg-strong: rgba(255, 255, 255, 0.92);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-border-hover: rgba(0, 0, 0, 0.16);
  --text-primary: #1D1D1F;                    /* Apple near-black */
  --text-secondary: rgba(29, 29, 31, 0.68);   /* comfortable secondary */
  --text-tertiary: rgba(29, 29, 31, 0.50);    /* de-emphasised */
  --text-muted: rgba(29, 29, 31, 0.36);       /* placeholders */
  --accent: #0066CC;          /* Apple blue adjusted for white bg */
  --accent-soft: rgba(0, 102, 204, 0.10);
  --accent-glow: rgba(0, 102, 204, 0.20);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.07);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 10px 36px rgba(0, 0, 0, 0.13);
  --shadow-xl: 0 20px 56px rgba(0, 0, 0, 0.16);
}
[data-theme="light"] body {
  background: #F7F5FC;
}
[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 90% 70% at -5% 100%, rgba(255, 145, 175, 0.28) 0%, transparent 52%),
    radial-gradient(ellipse 65% 60% at 102% 0%,  rgba(60,  215, 190, 0.22) 0%, transparent 50%),
    radial-gradient(ellipse 50% 48% at 100% 65%, rgba(90,  185, 255, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse 48% 42% at 25%  12%, rgba(185, 160, 255, 0.20) 0%, transparent 50%),
    radial-gradient(ellipse 55% 42% at 58%  95%, rgba(255, 210, 110, 0.14) 0%, transparent 50%);
}
[data-theme="light"] .navbar {
  background: rgba(247, 245, 252, 0.88);
  border-bottom-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 14px rgba(0, 0, 0, 0.06);
  backdrop-filter: saturate(180%) blur(20px);
}
[data-theme="light"] .hero h1 {
  background: linear-gradient(180deg, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.55) 100%);
  -webkit-background-clip: text; background-clip: text;
}
[data-theme="light"] .chatbot-toggle {
  background: rgba(255,255,255,0.7);
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
[data-theme="light"] .chatbot-toggle:hover {
  background: rgba(0,113,227,0.08); border-color: rgba(0,113,227,0.25);
}
[data-theme="light"] .chatbot-panel {
  background: rgba(255,255,255,0.97);
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 12px 50px rgba(0,0,0,0.18);
}
[data-theme="light"] .chatbot-header { background: rgba(0,0,0,0.02); border-bottom-color: rgba(0,0,0,0.08); }
[data-theme="light"] .chat-msg.bot { background: rgba(0,0,0,0.04); color: var(--text-secondary); }
[data-theme="light"] .chat-input-area { background: rgba(0,0,0,0.01); border-top-color: rgba(0,0,0,0.08); }
[data-theme="light"] .chat-input-area input { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); color: var(--text-primary); }
[data-theme="light"] .chat-chip { background: rgba(0,113,227,0.06); border-color: rgba(0,113,227,0.2); }
[data-theme="light"] .chat-chip:hover { background: rgba(0,113,227,0.12); }
[data-theme="light"] .nav-links a { color: rgba(0,0,0,0.75); }
[data-theme="light"] .nav-links a:hover { color: rgba(0,0,0,0.92); background: rgba(0,0,0,0.05); }
[data-theme="light"] .nav-links a.active { color: rgba(0,0,0,0.92); background: rgba(0,0,0,0.07); }
[data-theme="light"] .page-hero h1,
[data-theme="light"] .section-title-lg {
  background: linear-gradient(135deg, rgba(0,0,0,0.88), rgba(0,0,0,0.55));
  -webkit-background-clip: text; background-clip: text;
}
[data-theme="light"] .stat-card { background: rgba(255,255,255,0.88); box-shadow: 0 2px 16px rgba(0,0,0,0.08); border: 1px solid rgba(0,0,0,0.08); }
[data-theme="light"] .feedback-modal { background: rgba(255,255,255,0.98); box-shadow: 0 16px 50px rgba(0,0,0,0.18); }
[data-theme="light"] .pc-body { background: rgba(248,248,250,0.96); }
[data-theme="light"] .neo-footer { background: rgba(240,238,248,0.92); border-top-color: rgba(0,0,0,0.08); }
[data-theme="light"] .chapter { background: rgba(255,255,255,0.88); border-color: rgba(0,0,0,0.1); box-shadow: 0 4px 20px rgba(0,0,0,0.07); }
[data-theme="light"] .message-example { border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .about-card { background: rgba(255,255,255,0.88); border-color: rgba(0,0,0,0.1); box-shadow: 0 2px 14px rgba(0,0,0,0.07); }
[data-theme="light"] .resource-card { background: rgba(255,255,255,0.85); }
[data-theme="light"] .resource-card:hover { background: rgba(255,255,255,0.98); box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
[data-theme="light"] .answer-btn { background: rgba(255,255,255,0.6); border-color: rgba(0,0,0,0.1); color: var(--text-primary); }
[data-theme="light"] .answer-btn:hover { background: rgba(0,113,227,0.06); border-color: rgba(0,113,227,0.25); }
[data-theme="light"] .diff-btn { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); color: var(--text-secondary); }
[data-theme="light"] .diff-btn.active { background: rgba(0,113,227,0.1); border-color: var(--accent); color: var(--accent); }
[data-theme="light"] .product-card { border-color: rgba(0,0,0,0.1); box-shadow: 0 2px 16px rgba(0,0,0,0.08); }
[data-theme="light"] .product-card:hover { box-shadow: 0 10px 32px rgba(0,0,0,0.14); transform: translateY(-3px); }
[data-theme="light"] .info-card { background: rgba(255,255,255,0.88); border-color: rgba(0,0,0,0.1); box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
[data-theme="light"] .mini-stat { background: rgba(255,255,255,0.88); border-color: rgba(0,0,0,0.1); box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
[data-theme="light"] .tip-card { background: rgba(255,255,255,0.88) !important; border-color: rgba(0,0,0,0.1) !important; box-shadow: 0 2px 10px rgba(0,0,0,0.05) !important; }
[data-theme="light"] .tech-tag, [data-theme="light"] .company-tag { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.08); }
[data-theme="light"] #matrix-canvas { display: none; }
/* Light: inputs, buttons, forms */
[data-theme="light"] .cyber-input { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.12); color: var(--text-primary); }
[data-theme="light"] .cyber-input:focus { background: #fff; box-shadow: 0 0 0 3px rgba(0,113,227,0.12); border-color: var(--accent); }
[data-theme="light"] .cyber-input::placeholder { color: rgba(0,0,0,0.3); }
[data-theme="light"] .cyber-btn { box-shadow: 0 2px 8px rgba(0,113,227,0.18); }
[data-theme="light"] .cyber-btn:hover { box-shadow: 0 4px 16px rgba(0,113,227,0.25); }
[data-theme="light"] .feedback-modal textarea { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.12); color: var(--text-primary); }
/* Light: message examples */
[data-theme="light"] .message-example.danger { background: rgba(255,69,58,0.04); border-color: rgba(255,69,58,0.12); }
[data-theme="light"] .message-example.safe { background: rgba(48,209,88,0.04); border-color: rgba(48,209,88,0.12); }
/* Light: game scenario area */
[data-theme="light"] .scenario-card { background: rgba(255,255,255,0.88); border-color: rgba(0,0,0,0.1); box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
[data-theme="light"] .score-display { color: var(--text-secondary); }
/* Light: auto-suggest */
[data-theme="light"] .auto-suggest-list { background: rgba(255,255,255,0.98); border-color: rgba(0,0,0,0.1); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
[data-theme="light"] .auto-suggest-item:hover { background: rgba(0,113,227,0.06); }
/* Light: hero section */
[data-theme="light"] .hero { background: rgba(0,0,0,0.01); }
[data-theme="light"] .hero p { color: rgba(0,0,0,0.72); font-size: 1.22rem; }
/* Light: page hero */
[data-theme="light"] .page-hero { background: rgba(0,0,0,0.01); }
[data-theme="light"] .page-hero p { color: rgba(0,0,0,0.72); font-size: 1.12rem; }
/* Light: general section text improvements */
[data-theme="light"] .section-title-lg { color: rgba(0,0,0,0.88) !important; -webkit-text-fill-color: rgba(0,0,0,0.88) !important; }
[data-theme="light"] .kpi-card { background: rgba(255,255,255,0.88); border-color: rgba(0,0,0,0.1); box-shadow: 0 2px 14px rgba(0,0,0,0.07); }
[data-theme="light"] .result-panel { background: rgba(255,255,255,0.85); border-color: rgba(0,0,0,0.1); box-shadow: 0 2px 14px rgba(0,0,0,0.07); }
[data-theme="light"] .result-panel h3 { color: rgba(0,0,0,0.75); }
[data-theme="light"] .section-card, [data-theme="light"] .glass-card { background: rgba(255,255,255,0.88) !important; border-color: rgba(0,0,0,0.1) !important; box-shadow: 0 2px 16px rgba(0,0,0,0.08) !important; }
[data-theme="light"] .scenario-content { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.09); color: rgba(0,0,0,0.78); }
[data-theme="light"] .leaderboard-table td {
  background: rgba(0,0,0,0.02) !important;
  color: rgba(0,0,0,0.8);
}
[data-theme="light"] .leaderboard-table tr:nth-child(odd) td { background: rgba(0,0,0,0.02) !important; }
[data-theme="light"] .leaderboard-table tr:nth-child(even) td { background: rgba(0,0,0,0.04) !important; }
[data-theme="light"] .leaderboard-table th {
  color: rgba(0,0,0,0.7);
  border-bottom-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .leaderboard-table tbody tr:hover td { background: rgba(0,113,227,0.1) !important; }
[data-theme="light"] .leaderboard-table .rank-1 td { background: rgba(255,214,10,0.12) !important; }
[data-theme="light"] .leaderboard-table .rank-2 td { background: rgba(192,192,192,0.12) !important; }
[data-theme="light"] .leaderboard-table .rank-3 td { background: rgba(205,127,50,0.12) !important; }
[data-theme="light"] .badge-display { background: rgba(255,255,255,0.88); border-color: rgba(0,0,0,0.1); }
/* Light: theme toggle */
[data-theme="light"] .theme-toggle { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .theme-toggle:hover { background: rgba(0,0,0,0.08); }

/* ===== Theme Toggle Button ===== */
.theme-toggle {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.theme-toggle:hover { background: rgba(255,255,255,0.12); color: var(--text-primary); }
[data-theme="light"] .theme-toggle { border-color: rgba(0,0,0,0.1); background: rgba(0,0,0,0.04); }
[data-theme="light"] .theme-toggle:hover { background: rgba(0,0,0,0.08); }

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Inter', 'Helvetica Neue', sans-serif;
  background: #060F10;
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  letter-spacing: -0.01em;
  font-size: 17px;
}

/* ── Ambient glow blobs (fixed, behind all content) ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 55% at 12% -5%,  rgba(10, 132, 255, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse 65% 50% at 88% 105%, rgba(90, 200, 250, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 55% 40% at 50%  48%, rgba(0,  185, 145, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 40% 35% at 75%  20%, rgba(191, 90, 242, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

#matrix-canvas { display: none; }
body::after { display: none !important; content: none !important; }

/* ===== Nav — Frosted Glass ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0 clamp(1.1rem, 3.3vw, 2.75rem);
  height: 57.2px;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text-primary);
  font-weight: 700; font-size: 1.32rem; letter-spacing: -0.02em;
}

.nav-logo .logo-icon {
  width: 30px; height: 30px; border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), #5E5CE6);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}

.nav-logo .logo-img {
  width: 30px; height: 30px; border-radius: 7px;
  object-fit: cover;
}

.nav-links { display: flex; align-items: center; gap: 0; list-style: none; }

.nav-links a {
  color: var(--text-secondary); text-decoration: none;
  padding: 6.6px 15.4px; font-size: 1.012rem; font-weight: 500;
  transition: var(--transition); border-radius: var(--radius-sm);
}

.nav-links a:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }
.nav-links a.active { color: var(--text-primary); background: rgba(255,255,255,0.08); }
.nav-links a.active::after { display: none; }

/* ===== Apple-style Mega Dropdown ===== */
.nav-dropdown { position: static; }
.nav-dropdown > a { cursor: pointer; }
.nav-dropdown > a::after { content: ' ▾'; font-size: 0.68em; opacity: 0.55; display: inline-block; transition: transform 0.2s; }
.nav-dropdown:hover > a::after { transform: rotate(180deg); }
.nav-dropdown.active > a { color: var(--accent); }

/* Mega menu panel */
.mega-menu {
  display: flex; /* always flex — controlled by visibility/opacity */
  position: fixed;
  left: 0; right: 0;
  top: 52px;
  padding: 2rem 3rem 2.5rem;
  background: rgba(22,22,26,0.97);
  backdrop-filter: saturate(200%) blur(40px);
  -webkit-backdrop-filter: saturate(200%) blur(40px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  z-index: 999;
  flex-direction: row;
  align-items: flex-start;
  gap: 0;
  /* Hidden by default — opacity + visibility allows CSS transition delay */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.45s;
}
@keyframes megaFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Show: instant on hover-in, delayed hide (450ms grace period) */
.nav-dropdown:hover .mega-menu,
.nav-dropdown.open .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0s;
}

/* Mega columns */
.mega-col {
  display: flex; flex-direction: column; gap: 1px;
  min-width: 180px; padding: 0 2.5rem 0 0;
}
.mega-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-muted);
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.mega-label svg {
  width: 13px; height: 13px; flex-shrink: 0;
  stroke: var(--text-muted); stroke-width: 1.9; opacity: 0.9;
}
.mega-col a {
  font-size: 0.9rem; color: var(--text-secondary);
  padding: 5px 0; text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
}
.mega-col a:hover { color: var(--text-primary); }
.mega-col a.active { color: var(--accent); font-weight: 600; }
/* Vertical divider */
.mega-divider {
  width: 1px; background: rgba(255,255,255,0.07);
  margin: 0 2rem; align-self: stretch;
}
/* Light theme mega menu */
[data-theme="light"] .mega-menu {
  background: rgba(247,245,252,0.97);
  border-bottom-color: rgba(0,0,0,0.07);
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  backdrop-filter: saturate(180%) blur(20px);
}
[data-theme="light"] .mega-col a { color: rgba(0,0,0,0.65); }
[data-theme="light"] .mega-col a:hover { color: rgba(0,0,0,0.9); }
[data-theme="light"] .mega-label { color: rgba(0,0,0,0.38); border-bottom-color: rgba(0,0,0,0.08); }
[data-theme="light"] .mega-divider { background: rgba(0,0,0,0.08); }

.nav-right { display: flex; align-items: center; gap: 10px; }

.lang-toggle {
  display: flex; background: rgba(255,255,255,0.06);
  border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}

.lang-btn {
  padding: 4px 12px; cursor: pointer; font-size: 0.72rem; font-weight: 600;
  border: none; background: transparent; color: var(--text-tertiary);
  transition: var(--transition); font-family: inherit;
}

.lang-btn.active { background: rgba(255,255,255,0.12); color: var(--text-primary); }

.hamburger {
  display: none; background: none; border: none;
  color: var(--text-secondary); font-size: 1.3rem; cursor: pointer;
}

/* ===== Main Content ===== */
.main-content { padding-top: 52px; position: relative; z-index: 1; min-height: 100vh; }

/* ===== Hero Section ===== */
/* Compact hero (no stats inline) for news-first layout */
.hero-compact {
  padding-bottom: 1.2rem !important;
}
.stats-section {
  padding: 0 clamp(1rem, 3vw, 2.5rem) 1.5rem;
}
.stats-section .hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 1400px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .stats-section .hero-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .stats-section .hero-stats { grid-template-columns: 1fr 1fr; }
}
.hero {
  text-align: center;
  padding: clamp(4rem, 8vw, 7rem) 2rem clamp(2rem, 4vw, 4rem);
  position: relative; overflow: hidden;
  max-width: 980px; margin: 0 auto;
  z-index: 1;
}

.hero::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 700px;
  height: 700px;
  transform: translate(-50%, -50%) scale(1.15) perspective(800px) rotateX(18deg) rotateZ(-8deg);
  background:
    linear-gradient(120deg, rgba(10,132,255,0.10) 0%, rgba(191,90,242,0.08) 100%),
    url('../images/logo.png') center/60% no-repeat;
  opacity: 0.18;
  filter: blur(2.5px) saturate(1.2);
  pointer-events: none;
  z-index: 0;
}


.hero::before {
  content: ''; position: absolute;
  top: -20%; left: 50%; transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(10,132,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: none; align-items: center; gap: 8px;
  padding: 6px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 100px;
  font-size: 0.78rem; color: var(--text-secondary);
  margin-bottom: 1.5rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
}

.hero-badge .pulse-dot {
  width: 6px; height: 6px; background: var(--green);
  border-radius: 50%; animation: pulse 2.5s infinite;
}

.hero h1 {
  font-size: clamp(3.2rem, 8vw, 5.5rem);
  font-weight: 800; margin-bottom: 1.2rem;
  line-height: 1.05; letter-spacing: -0.04em;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.5) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.hero p {
  font-size: 1.2rem; color: var(--text-secondary);
  max-width: 640px; margin: 0 auto 2.5rem;
  line-height: 1.65; font-weight: 400;
}

.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; max-width: 800px; margin: 0 auto;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
}

.stat-card {
  background: rgba(255,255,255,0.04);
  backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  padding: 1.5rem 1rem; text-align: center;
  transition: var(--transition);
}

.stat-card::before { display: none; }
.stat-card:hover { transform: none; background: rgba(255,255,255,0.04); border-color: transparent; box-shadow: none; }

.stat-card .stat-icon {
  font-size: 1.5rem; margin-bottom: 0.5rem; opacity: 0.75;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
}
.stat-card .stat-icon svg {
  width: 28px; height: 28px;
  stroke: var(--accent); stroke-width: 1.6;
  flex-shrink: 0;
}
[data-theme="light"] .stat-card .stat-icon svg { stroke: var(--accent); }
.stat-card .stat-number {
  font-size: 1.85rem; font-weight: 700; color: var(--text-primary);
  margin-bottom: 0.25rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.stat-card .stat-label {
  font-size: 0.82rem; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600;
}

/* ===== Section ===== */
.section { padding: clamp(2rem, 4vw, 4rem) clamp(1rem, 3vw, 2.5rem); max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header h2 { font-size: 1.85rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.5rem; letter-spacing: -0.025em; }
.section-header p { color: var(--text-secondary); font-size: 1.05rem; }
.section-header .accent-line { width: 40px; height: 3px; background: var(--accent); margin: 0.8rem auto 0; border-radius: 3px; opacity: 0.6; }

/* ===== Cards Grid ===== */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }

.card {
  background: var(--glass-bg);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl); padding: 1.5rem;
  box-shadow: 0 2px 20px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.07);
  transition: var(--transition); position: relative; overflow: hidden;
}

.card::before { display: none; }
.card:hover { transform: translateY(-3px); background: var(--glass-bg-strong); border-color: var(--glass-border-hover); box-shadow: 0 8px 40px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.10); }
.card:hover::before { display: none; }

.card-icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; margin-bottom: 1rem;
}

.card-icon.green  { background: rgba(48,209,88,0.1); }
.card-icon.cyan   { background: rgba(100,210,255,0.1); }
.card-icon.purple { background: rgba(191,90,242,0.1); }
.card-icon.red    { background: rgba(255,69,58,0.1); }
.card-icon.orange { background: rgba(255,159,10,0.1); }
.card-icon.blue   { background: rgba(10,132,255,0.1); }

.card h3 { font-size: 1.18rem; font-weight: 700; margin-bottom: 0.45rem; color: var(--text-primary); letter-spacing: -0.01em; }
.card p { font-size: 1rem; color: var(--text-secondary); line-height: 1.65; margin-bottom: 1rem; overflow-wrap: break-word; word-break: break-word; }

.card-link {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--accent); text-decoration: none;
  font-weight: 500; font-size: 0.82rem; transition: var(--transition);
}
.card-link:hover { gap: 8px; }

/* ===== Charts ===== */
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.chart-container {
  background: var(--glass-bg);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl); padding: 1.5rem;
  box-shadow: 0 2px 20px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.07);
}

.chart-container h3 {
  font-size: 0.95rem; font-weight: 600; color: var(--text-secondary);
  margin-bottom: 1rem; padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex; align-items: center; gap: 8px;
}

.chart-wrapper { position: relative; height: 350px; }
.chart-container.full-width { grid-column: 1 / -1; }

#heatmap { height: 450px; border-radius: var(--radius); z-index: 1; }

.leaflet-container { background: #0a0a0a !important; border-radius: var(--radius); }
.leaflet-control-attribution { display: none !important; }

.custom-tooltip {
  background: rgba(28,28,30,0.95) !important;
  backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 10px !important;
  color: var(--text-primary) !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif !important;
  padding: 10px 14px !important;
  box-shadow: var(--shadow-lg) !important;
}
.custom-tooltip .tooltip-title { font-weight: 600; font-size: 0.88rem; }
.custom-tooltip .tooltip-value { font-size: 0.78rem; color: var(--text-secondary); }

/* ===== News Section ===== */


.news-cards {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.news-card {
  display: flex;
  flex-direction: row;
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  overflow: hidden;
  margin-bottom: 0;
  max-width: 900px;
  min-height: 220px;
}
.news-main-img {
  flex: 2;
  min-width: 220px;
  max-width: 60%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
}
.news-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.news-content {
  flex: 3;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.news-content h2 {
  font-size: 1.5rem;
  margin: 0 0 12px 0;
  color: var(--text-primary);
}
.news-summary {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
}
.news-meta {
  font-size: 0.95rem;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
}

.news-card {
  min-width: 320px;
  max-width: 340px;
  background: var(--glass-bg);
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  box-shadow: 0 2px 16px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.2rem 1.1rem 1.1rem 1.1rem;
  gap: 0.7rem;
  transition: box-shadow 0.2s, transform 0.2s;
  backdrop-filter: saturate(180%) blur(18px);
}
.news-card:hover {
  box-shadow: 0 10px 36px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.10);
  transform: translateY(-2px) scale(1.02);
  border-color: var(--glass-border-hover);
}
.news-icon {
  font-size: 2.1rem;
  margin-bottom: 0.2rem;
}
.news-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.news-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 0.1rem;
}
.news-summary {
  font-size: 0.93rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.news-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.news-item {
  display: flex; gap: 1rem; padding: 0.9rem 1.2rem;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  transition: var(--transition); text-decoration: none; color: inherit;
  align-items: flex-start; cursor: pointer;
}
.news-item:hover { background: rgba(255,255,255,0.04); }

.news-date { flex-shrink: 0; width: 44px; text-align: center; padding-top: 2px; }
.news-date .day { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); line-height: 1; font-variant-numeric: tabular-nums; }
.news-date .month { font-size: 0.62rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }

.news-content { flex: 1; min-width: 0; }
.news-content h4 {
  font-size: 0.98rem; font-weight: 600; color: var(--text-primary);
  margin-bottom: 0.25rem; line-height: 1.4; letter-spacing: -0.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-content .news-summary {
  font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-source {
  font-size: 0.65rem; color: var(--text-muted); margin-top: 0.25rem;
  font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em;
}

.news-link-icon {
  flex-shrink: 0; color: var(--text-muted);
  font-size: 0.75rem; padding-top: 4px; transition: var(--transition);
}
.news-item:hover .news-link-icon { color: var(--accent); }

/* ===== Calendar Widget ===== */
.calendar-widget {
  background: var(--glass-bg);
  backdrop-filter: saturate(150%) blur(20px); -webkit-backdrop-filter: saturate(150%) blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl); padding: 1.2rem;
}

.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.8rem; }
.calendar-header h4 { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); }
.calendar-nav { display: flex; gap: 4px; }
.calendar-nav button {
  width: 26px; height: 26px; border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.08); background: transparent;
  color: var(--text-secondary); cursor: pointer; font-size: 0.72rem;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.calendar-nav button:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }

.calendar-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.calendar-days .day-label {
  font-size: 0.62rem; color: var(--text-muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em; padding: 4px 0;
}
.calendar-days .day-cell {
  font-size: 0.72rem; color: var(--text-tertiary);
  padding: 5px 3px; border-radius: 7px;
  transition: var(--transition); cursor: default;
  font-variant-numeric: tabular-nums;
}
.calendar-days .day-cell.today { background: var(--accent); color: white; font-weight: 600; }
.calendar-days .day-cell.has-event { color: var(--text-primary); font-weight: 500; }
.calendar-days .day-cell.has-event::after {
  content: ''; display: block; width: 3px; height: 3px;
  background: var(--red); border-radius: 50%; margin: 1px auto 0;
}
.calendar-days .day-cell.other-month { color: var(--text-muted); opacity: 0.5; }

/* ===== Home Layout ===== */
.home-grid {
  display: grid; grid-template-columns: 1fr 300px;
  gap: 1.5rem; max-width: 1200px; margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
}
.home-main { min-width: 0; }
.home-sidebar { display: flex; flex-direction: column; gap: 1rem; }

/* ===== BBC-style News Layout ===== */
.bbc-wrap {
  max-width: 1400px; margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2.5rem) 0;
  display: grid; grid-template-columns: 1fr 280px; gap: 2rem; align-items: start;
}
.bbc-news-block { min-width: 0; }
.bbc-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  grid-template-rows: auto;
  gap: 0;
  border: 1px solid var(--card-border);
  border-radius: var(--radius); overflow: hidden;
  margin-bottom: 1px;
}
/* Left: featured headline text */
.bbc-left {
  padding: 1.6rem; display: flex; flex-direction: column; justify-content: space-between;
  border-right: 1px solid var(--card-border);
  background: var(--card-bg);
}
.bbc-cat {
  display: inline-block; font-size: 0.62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: #FF453A; margin-bottom: 10px;
}
.bbc-left h2 {
  font-size: 1.2rem; font-weight: 800; color: var(--text-primary);
  line-height: 1.35; flex: 1; margin: 0 0 12px;
}
.bbc-left p {
  font-size: 0.85rem; color: var(--text-secondary); line-height: 1.65;
  margin: 0 0 14px;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.bbc-meta {
  font-size: 0.72rem; color: var(--text-muted); font-weight: 500;
  display: flex; align-items: center; gap: 8px;
}
.bbc-meta-dot { opacity: 0.4; }
/* Center: hero image */
.bbc-hero {
  position: relative; overflow: hidden; background: #000;
}
.bbc-hero img {
  width: 100%; height: 100%; min-height: 320px;
  object-fit: cover; display: block;
  filter: brightness(0.85);
  transition: filter 0.3s;
}
.bbc-hero:hover img { filter: brightness(0.75); }
.bbc-hero-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 1.2rem;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
}
.bbc-hero-overlay h3 {
  font-size: 1.05rem; font-weight: 700; color: #fff; margin: 6px 0 0; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* Right: secondary articles */
.bbc-right {
  display: flex; flex-direction: column;
  border-left: 1px solid var(--card-border);
  background: var(--card-bg);
}
.bbc-secondary {
  display: flex; gap: 10px; padding: 12px 14px;
  border-bottom: 1px solid var(--card-border);
  text-decoration: none; transition: background 0.15s;
}
.bbc-secondary:last-child { border-bottom: none; }
.bbc-secondary:hover { background: rgba(255,255,255,0.04); }
.bbc-secondary img {
  width: 72px; height: 54px; object-fit: cover; border-radius: 4px;
  flex-shrink: 0; background: var(--bg-tertiary);
}
.bbc-secondary h4 {
  font-size: 0.84rem; font-weight: 600; color: var(--text-primary);
  line-height: 1.4; margin: 0 0 5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bbc-secondary span {
  font-size: 0.7rem; color: var(--text-muted); font-weight: 500;
}
/* Bottom row: extra news items */
.bbc-bottom-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  border: 1px solid var(--card-border); border-top: none;
  border-radius: 0 0 var(--radius) var(--radius); overflow: hidden;
}
.bbc-mini {
  display: block; padding: 12px 14px;
  background: var(--card-bg); text-decoration: none;
  border-right: 1px solid var(--card-border);
  transition: background 0.15s;
}
.bbc-mini:last-child { border-right: none; }
.bbc-mini:hover { background: rgba(255,255,255,0.04); }
.bbc-mini .bbc-cat { margin-bottom: 4px; }
.bbc-mini h5 {
  font-size: 0.83rem; font-weight: 600; color: var(--text-primary);
  line-height: 1.4; margin: 0 0 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bbc-mini span { font-size: 0.68rem; color: var(--text-muted); }
/* BBC sidebar calendar */
.bbc-sidebar { display: flex; flex-direction: column; gap: 1rem; padding-top: 0; }
/* Light mode BBC */
[data-theme="light"] .bbc-secondary:hover { background: rgba(0,0,0,0.03); }
[data-theme="light"] .bbc-mini:hover { background: rgba(0,0,0,0.03); }

/* ===== YouTube Learning Page — Full Rebuild ===== */

/* Hero */
.yt-hero-compact { padding: 2.5rem 0 1.5rem; }
.yt-hero-compact h1 { font-size: clamp(1.6rem,3vw,2.2rem); margin-bottom: 0.35rem; }
.yt-hero-compact p  { font-size: 0.95rem; color: var(--text-secondary); margin: 0; }

/* Page wrapper */
.yt-page-wrap { max-width: 1380px; margin: 0 auto; padding: 0 2rem 4rem; }

/* Filter chips */
.yt-filter-row { display: flex; gap: 8px; margin-bottom: 1.8rem; flex-wrap: wrap; }
.yt-chip {
  padding: 6px 18px; border-radius: 20px; font-size: 0.82rem; font-weight: 600;
  border: 1px solid rgba(255,255,255,0.10); background: rgba(255,255,255,0.05);
  color: var(--text-secondary); cursor: pointer; transition: all 0.18s;
}
.yt-chip:hover { border-color: rgba(255,255,255,0.25); color: var(--text-primary); }
.yt-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
[data-theme="light"] .yt-chip { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.12); color: #555; }
[data-theme="light"] .yt-chip:hover { border-color: rgba(0,0,0,0.25); color: #111; }
[data-theme="light"] .yt-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Main layout: video grid + sticky sidebar */
.yt-layout {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 2rem;
  align-items: start;
}

/* Video grid */
.yt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.2rem;
}

/* Video card */
.yt-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
  backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 2px 16px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.07);
}
.yt-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.18);
}
[data-theme="light"] .yt-card { background: rgba(255,255,255,0.80); border-color: rgba(0,0,0,0.08); box-shadow: 0 2px 12px rgba(0,0,0,0.06); backdrop-filter: saturate(180%) blur(18px); }
[data-theme="light"] .yt-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.14); }

/* Thumbnail 16:9 */
.yt-thumb {
  position: relative; width: 100%; padding-top: 56.25%;
  background: #111;
}
.yt-thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform 0.3s;
}
.yt-card:hover .yt-thumb img { transform: scale(1.04); }

/* Gradient fallback */
.yt-thumb-fallback {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--g1,#30D158), var(--g2,#0A84FF));
  display: none; align-items: center; justify-content: center;
  font-size: 2.8rem;
}

/* Level pill */
.yt-pill {
  position: absolute; top: 8px; left: 8px;
  padding: 3px 9px; border-radius: 20px;
  font-size: 0.68rem; font-weight: 700;
  backdrop-filter: blur(6px); letter-spacing: 0.03em;
}
.yt-pill.beginner    { background: rgba(48,209,88,0.88);  color:#fff; }
.yt-pill.intermediate{ background: rgba(255,159,10,0.88); color:#fff; }
.yt-pill.advanced    { background: rgba(191,90,242,0.88); color:#fff; }

/* Duration badge */
.yt-dur {
  position: absolute; bottom: 7px; right: 8px;
  background: rgba(0,0,0,0.82); color: #fff;
  font-size: 0.7rem; font-weight: 700;
  padding: 2px 6px; border-radius: 4px;
}

/* Play button overlay */
.yt-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s;
}
.yt-card:hover .yt-play { opacity: 1; }
.yt-play svg {
  width: 50px; height: 50px; border-radius: 50%;
  background: rgba(0,0,0,0.72); padding: 12px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

/* Card info row */
.yt-info {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px 12px;
}
.yt-av {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--av1,#0A84FF), var(--av2,#5E5CE6));
}
.yt-text {
  flex: 1; min-width: 0;
}
.yt-text h4 {
  font-size: 0.88rem; font-weight: 700; color: var(--text-primary);
  line-height: 1.4; margin: 0 0 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.yt-text p {
  font-size: 0.75rem; color: var(--text-muted); margin: 0;
}

/* ── VIDEO MODAL ── */
.yt-modal {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.88); z-index: 9000;
  align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
}
.yt-modal.open { display: flex; }
.yt-modal-box {
  width: min(880px, 96vw); background: #13131a;
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 40px 120px rgba(0,0,0,0.85);
  animation: modalIn 0.22s ease;
}
@keyframes modalIn { from { transform: scale(0.94); opacity:0; } to { transform:scale(1); opacity:1; } }
.yt-modal-hdr {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,0.07);
}
.yt-modal-ttl { font-size: 0.88rem; font-weight: 600; color: #fff; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yt-modal-x {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.1); border: none;
  color: #fff; cursor: pointer; font-size: 0.85rem;
  transition: background 0.2s; flex-shrink: 0; margin-left: 12px;
}
.yt-modal-x:hover { background: rgba(255,255,255,0.22); }
.yt-modal-player { position: relative; padding-top: 56.25%; }
.yt-modal-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

/* ── SIDEBAR ── */
.yt-sidebar {
  position: sticky; top: 80px;
  display: flex; flex-direction: column; gap: 1rem;
}

/* Sidebar card */
.yt-sb-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px; overflow: hidden;
}
[data-theme="light"] .yt-sb-card { background: #fff; border-color: rgba(0,0,0,0.09); box-shadow: 0 2px 14px rgba(0,0,0,0.07); }
.yt-sb-head {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 16px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
[data-theme="light"] .yt-sb-head { border-bottom-color: rgba(0,0,0,0.07); }
.yt-sb-label {
  font-size: 0.75rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-muted);
}
.yt-sb-body { padding: 10px 14px 12px; }

/* Study tips */
.yt-tip {
  display: flex; gap: 10px; padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
[data-theme="light"] .yt-tip { border-bottom-color: rgba(0,0,0,0.05); }
.yt-tip:last-child { border-bottom: none; padding-bottom: 0; }
.yt-tip-ico { font-size: 1rem; flex-shrink: 0; padding-top: 2px; }
.yt-tip strong { font-size: 0.8rem; color: var(--text-primary); display: block; margin-bottom: 1px; }
.yt-tip span   { font-size: 0.76rem; color: var(--text-secondary); line-height: 1.5; }

/* Learning Path */
.yt-path { display: flex; flex-direction: column; gap: 0; }
.yt-step { display: grid; grid-template-columns: 24px 12px 1fr; gap: 0 8px; align-items: start; }
.yt-step-dot {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,255,255,0.05); border: 1.5px solid var(--dc,#30D158);
  color: var(--dc,#30D158); font-size: 0.68rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}
.yt-step-line {
  width: 1.5px; background: rgba(255,255,255,0.08);
  height: 100%; min-height: 26px; margin: 0 auto;
}
.yt-step-line--last { background: transparent; }
.yt-step-content { padding-bottom: 12px; }
.yt-step-content strong { font-size: 0.8rem; color: var(--text-primary); display: block; }
.yt-step-content span   { font-size: 0.75rem; color: var(--text-secondary); line-height: 1.5; }

/* AI input */
.yt-ai-ta {
  width: 100%; box-sizing: border-box;
  padding: 9px 11px; resize: none;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.10);
  border-radius: 9px; color: var(--text-primary);
  font-family: inherit; font-size: 0.85rem; outline: none;
  transition: border-color 0.2s;
}
[data-theme="light"] .yt-ai-ta { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.12); }
.yt-ai-ta:focus { border-color: var(--accent); }
.yt-ai-btn {
  display: flex; align-items: center; gap: 6px;
  margin-top: 8px; padding: 8px 16px;
  background: var(--accent); color: #fff; border: none;
  border-radius: 9px; font-size: 0.82rem; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: opacity 0.2s;
}
.yt-ai-btn:hover { opacity: 0.85; }
.yt-ai-btn:disabled { opacity: 0.5; cursor: default; }
.yt-ai-reply {
  display: none; margin-top: 10px; padding: 10px 12px;
  background: rgba(10,132,255,0.06); border-left: 2.5px solid var(--accent);
  border-radius: 0 9px 9px 0;
  font-size: 0.83rem; color: var(--text-secondary); line-height: 1.65;
}

/* ── Responsive ── */
@media (max-width: 1080px) {
  .yt-layout { grid-template-columns: 1fr; }
  .yt-sidebar { position: static; }
}
@media (max-width: 640px) {
  .yt-page-wrap { padding: 0 0.75rem 3rem; }
  .yt-grid { grid-template-columns: 1fr; gap: 1rem; }
}

/* Legacy .yt-tip-text span kept for back-compat */
.yt-tip-text span {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== Books Page ===== */
.books-grid-wrapper {
  max-width: 1300px; margin: 0 auto;
  padding: 0 2rem 4rem;
}
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}
.book-card {
  background: var(--glass-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 2px 16px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.07);
  transition: transform 0.18s, box-shadow 0.18s;
}
.book-card:hover { transform: translateY(-4px); box-shadow: 0 14px 44px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.10); border-color: var(--glass-border-hover); }
[data-theme="light"] .book-card { background: #fff; border-color: rgba(0,0,0,0.09); box-shadow: 0 2px 12px rgba(0,0,0,0.07); }
[data-theme="light"] .book-card:hover { box-shadow: 0 10px 32px rgba(0,0,0,0.14); }

.book-cover {
  width: 100%; height: 220px;
  background: rgba(0,0,0,0.18);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
[data-theme="light"] .book-cover { background: rgba(0,0,0,0.06); }
.book-cover img {
  width: 100%; height: 100%;
  object-fit: contain; object-position: center;
  transition: transform 0.3s;
}
.book-card:hover .book-cover img { transform: scale(1.05); }

.book-body {
  padding: 14px 16px 18px;
  display: flex; flex-direction: column; flex: 1; gap: 6px;
}
.book-level {
  display: inline-block; padding: 2px 10px;
  border-radius: 20px; font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; width: fit-content;
}
.lv-beginner    { background: rgba(48,209,88,0.15);  color: #30D158; }
.lv-intermediate{ background: rgba(255,159,10,0.15); color: #FF9F0A; }
.lv-advanced    { background: rgba(191,90,242,0.15); color: #BF5AF2; }

.book-body h3 {
  font-size: 0.92rem; font-weight: 700; color: var(--text-primary);
  margin: 0; line-height: 1.4;
}
.book-author {
  font-size: 0.78rem; color: var(--accent); margin: 0; font-weight: 600;
}
.book-desc {
  font-size: 0.8rem; color: var(--text-secondary); margin: 0;
  line-height: 1.55; flex: 1;
}
.book-buy {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 8px; padding: 8px 14px;
  background: var(--accent); color: #fff; text-decoration: none;
  border-radius: 9px; font-size: 0.8rem; font-weight: 700;
  transition: opacity 0.2s; width: 100%;
}
.book-buy:hover { opacity: 0.85; color: #fff; }

@media (max-width: 640px) {
  .books-grid-wrapper { padding: 0 0.75rem 3rem; }
  .books-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .book-cover { height: 170px; }
}
@media (max-width: 400px) {
  .books-grid { grid-template-columns: 1fr; }
}

/* ===== Influencers Page ===== */
.influencer-filters {
  display: flex; gap: 8px; flex-wrap: wrap;
  max-width: 1300px; margin: 0 auto 1.6rem;
  padding: 0 2rem;
}
.filter-btn {
  padding: 7px 18px; border-radius: 20px;
  font-size: 0.82rem; font-weight: 600; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05); color: var(--text-secondary);
  transition: all 0.18s; font-family: inherit;
}
.filter-btn:hover { border-color: rgba(255,255,255,0.25); color: var(--text-primary); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
[data-theme="light"] .filter-btn { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.12); color: #555; }
[data-theme="light"] .filter-btn:hover { border-color: rgba(0,0,0,0.25); color: #111; }
[data-theme="light"] .filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.influencer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.4rem;
  max-width: 1300px; margin: 0 auto;
  padding: 0 2rem 4rem;
}

.influencer-card {
  background: var(--glass-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 14px; padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.07);
  transition: transform 0.18s, box-shadow 0.18s;
}
.influencer-card:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,0.42); border-color: var(--glass-border-hover); }
[data-theme="light"] .influencer-card { background: #fff; border-color: rgba(0,0,0,0.09); box-shadow: 0 2px 12px rgba(0,0,0,0.07); }

.influencer-header { display: flex; gap: 12px; align-items: center; }
.influencer-avatar {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 800; color: #fff;
}
.influencer-info { flex: 1; min-width: 0; }
.influencer-info h3 {
  font-size: 0.92rem; font-weight: 700; color: var(--text-primary); margin: 0 0 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.influencer-title {
  font-size: 0.73rem; color: var(--text-muted); display: block;
}

.influencer-bio {
  font-size: 0.82rem; color: var(--text-secondary); line-height: 1.58;
  margin: 0; flex: 1;
}

.influencer-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.inf-tag {
  padding: 3px 9px; border-radius: 20px;
  font-size: 0.7rem; font-weight: 600;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-secondary);
}
[data-theme="light"] .inf-tag { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.10); color: #555; }

.influencer-platforms { display: flex; flex-wrap: wrap; gap: 7px; }
.platform-badge {
  padding: 5px 11px; border-radius: 8px;
  font-size: 0.73rem; font-weight: 700; text-decoration: none;
  transition: opacity 0.2s; display: inline-flex; align-items: center; gap: 4px;
}
.platform-badge:hover { opacity: 0.8; }
.platform-badge.twitter  { background: rgba(29,161,242,0.14); color: #1DA1F2; border: 1px solid rgba(29,161,242,0.2); }
.platform-badge.youtube  { background: rgba(255,0,0,0.10); color: #FF4444; border: 1px solid rgba(255,60,60,0.2); }
.platform-badge.linkedin { background: rgba(10,102,194,0.14); color: #0A66C2; border: 1px solid rgba(10,102,194,0.2); }
.platform-badge.blog     { background: rgba(255,159,10,0.12); color: #FF9F0A; border: 1px solid rgba(255,159,10,0.2); }
[data-theme="light"] .platform-badge.twitter  { background: rgba(29,161,242,0.08); }
[data-theme="light"] .platform-badge.youtube  { background: rgba(255,0,0,0.06); }
[data-theme="light"] .platform-badge.linkedin { background: rgba(10,102,194,0.08); }
[data-theme="light"] .platform-badge.blog     { background: rgba(255,159,10,0.08); }

@media (max-width: 640px) {
  .influencer-grid { padding: 0 0.75rem 3rem; grid-template-columns: 1fr; }
  .influencer-filters { padding: 0 0.75rem; }
}

/* ===== Cyber Fundamentals Page ===== */
.fund-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  max-width: 1300px; margin: 0 auto 1.6rem;
  padding: 0 2rem;
}
.fund-tab {
  padding: 8px 18px; border-radius: 10px;
  font-size: 0.83rem; font-weight: 600; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04); color: var(--text-secondary);
  transition: all 0.18s; font-family: inherit;
}
.fund-tab:hover { border-color: var(--accent); color: var(--text-primary); }
.fund-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
[data-theme="light"] .fund-tab { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.12); color: #555; }
[data-theme="light"] .fund-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.fund-panels {
  max-width: 1300px; margin: 0 auto;
  padding: 0 2rem 4rem;
}
.fund-panel { display: none; }
.fund-panel.active { display: block; }

.fund-content-row {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2rem; align-items: start;
}

/* Knowledge side */
.fund-knowledge { }
.fund-knowledge h2 {
  font-size: 1.3rem; font-weight: 700; margin-bottom: 1.2rem;
  color: var(--text-primary);
}
.fund-points { display: flex; flex-direction: column; gap: 1px; margin-bottom: 1.2rem; }
.fund-point {
  padding: 12px 16px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: 10px; font-size: 0.88rem;
  color: var(--text-secondary); line-height: 1.65;
  margin-bottom: 8px;
  backdrop-filter: saturate(180%) blur(16px);
  box-shadow: 0 1px 8px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.06);
}
.fund-point strong { color: var(--text-primary); }
[data-theme="light"] .fund-point { background: rgba(255,255,255,0.85); border-color: rgba(0,0,0,0.09); backdrop-filter: saturate(180%) blur(16px); }

.fund-note {
  padding: 12px 16px;
  background: rgba(255,159,10,0.07); border-left: 3px solid #FF9F0A;
  border-radius: 0 10px 10px 0;
  font-size: 0.84rem; color: var(--text-secondary); line-height: 1.6;
}
[data-theme="light"] .fund-note { background: rgba(255,159,10,0.06); }

/* Exam side */
.fund-exam {
  position: sticky; top: 72px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: 14px; padding: 20px;
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.07);
}
[data-theme="light"] .fund-exam { background: rgba(255,255,255,0.85); border-color: rgba(0,0,0,0.09); box-shadow: 0 2px 16px rgba(0,0,0,0.07); backdrop-filter: saturate(180%) blur(20px); }
.fund-exam h3 {
  font-size: 0.88rem; font-weight: 700; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 1rem; padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
[data-theme="light"] .fund-exam h3 { border-bottom-color: rgba(0,0,0,0.07); }

.exam-q { margin-bottom: 1.4rem; }
.exam-q:last-child { margin-bottom: 0; }
.exam-question {
  font-size: 0.86rem; color: var(--text-primary); line-height: 1.6;
  margin-bottom: 10px;
}
.exam-question code {
  background: rgba(255,255,255,0.08); padding: 1px 5px;
  border-radius: 4px; font-size: 0.82em;
  font-family: 'SF Mono', Consolas, monospace;
}
[data-theme="light"] .exam-question code { background: rgba(0,0,0,0.07); }

.exam-options {
  display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px;
}
.exam-options label {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 0.83rem; color: var(--text-secondary);
  cursor: pointer; padding: 8px 10px;
  border-radius: 8px; border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02); transition: background 0.15s;
}
.exam-options label:hover { background: rgba(255,255,255,0.06); }
[data-theme="light"] .exam-options label { border-color: rgba(0,0,0,0.08); background: rgba(0,0,0,0.02); }
[data-theme="light"] .exam-options label:hover { background: rgba(0,0,0,0.05); }
.exam-options input[type="radio"] { margin-top: 2px; flex-shrink: 0; accent-color: var(--accent); }

.reveal-btn {
  padding: 7px 16px; border-radius: 8px;
  background: rgba(10,132,255,0.12); color: var(--accent);
  border: 1px solid rgba(10,132,255,0.25); cursor: pointer;
  font-size: 0.8rem; font-weight: 700; font-family: inherit;
  transition: background 0.18s;
}
.reveal-btn:hover { background: rgba(10,132,255,0.22); }

.exam-answer {
  margin-top: 10px; padding: 12px 14px;
  background: rgba(48,209,88,0.06); border-left: 3px solid #30D158;
  border-radius: 0 9px 9px 0;
}
.correct-answer {
  font-size: 0.84rem; font-weight: 700; color: #30D158; margin: 0 0 6px;
}
.answer-explain {
  font-size: 0.82rem; color: var(--text-secondary); line-height: 1.6; margin: 0;
}
.answer-explain strong { color: var(--text-primary); }

@media (max-width: 1080px) {
  .fund-content-row { grid-template-columns: 1fr; }
  .fund-exam { position: static; }
}
@media (max-width: 640px) {
  .fund-tabs { padding: 0 0.75rem; }
  .fund-panels { padding: 0 0.75rem 3rem; }
}
/* ===== Tool Page Layout ===== */
.tool-layout {
  display: grid; grid-template-columns: 360px 1fr;
  gap: 1.5rem; max-width: 1200px; margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2.5rem) 2rem;
}

.tool-input-panel { position: sticky; top: 72px; height: fit-content; }

.tool-panel {
  background: var(--glass-bg);
  backdrop-filter: saturate(150%) blur(20px); -webkit-backdrop-filter: saturate(150%) blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl); padding: 1.5rem; margin-bottom: 1rem;
}

.tool-panel h3 {
  font-size: 0.95rem; font-weight: 600; margin-bottom: 1rem;
  padding-bottom: 0.8rem; border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex; align-items: center; gap: 8px; color: var(--text-secondary);
}

/* ===== Forms ===== */
.input-group { margin-bottom: 1rem; }
.input-group label { display: block; font-size: 0.88rem; color: var(--text-tertiary); margin-bottom: 0.4rem; font-weight: 500; }

.cyber-input {
  width: 100%; padding: 10px 14px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-family: 'SF Mono', 'Fira Code', 'Menlo', monospace;
  font-size: 0.92rem; transition: var(--transition);
}
.cyber-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(10,132,255,0.15); background: rgba(255,255,255,0.06); }
.cyber-input::placeholder { color: var(--text-muted); }
textarea.cyber-input { min-height: 150px; resize: vertical; font-family: inherit; }

.cyber-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 24px; border: none;
  background: var(--accent); color: white;
  font-family: inherit; font-size: 0.92rem; font-weight: 600;
  border-radius: var(--radius-sm); cursor: pointer;
  transition: var(--transition); width: 100%;
}
.cyber-btn:hover { background: #0070E0; box-shadow: 0 4px 12px rgba(10,132,255,0.3); transform: translateY(-1px); }
.cyber-btn:active { transform: translateY(0); }
.cyber-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

.cyber-btn.btn-cyan { background: rgba(100,210,255,0.12); color: var(--cyan); border: 1px solid rgba(100,210,255,0.2); }
.cyber-btn.btn-cyan:hover { background: rgba(100,210,255,0.2); }
.cyber-btn.btn-red { background: rgba(255,69,58,0.12); color: var(--red); border: 1px solid rgba(255,69,58,0.2); }
.cyber-btn.btn-red:hover { background: rgba(255,69,58,0.2); }

/* ===== Upload ===== */
.upload-area {
  border: 1.5px dashed rgba(255,255,255,0.1); border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem; text-align: center; cursor: pointer; transition: var(--transition);
}
.upload-area:hover, .upload-area.dragover { border-color: var(--accent); background: rgba(10,132,255,0.04); }
.upload-area .upload-icon { font-size: 2.5rem; margin-bottom: 0.8rem; opacity: 0.5; }
.upload-area p { color: var(--text-secondary); font-size: 0.85rem; }
.upload-area .file-types { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.3rem; }

/* ===== Results ===== */
.result-panel {
  background: var(--glass-bg);
  backdrop-filter: saturate(150%) blur(20px); -webkit-backdrop-filter: saturate(150%) blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl); padding: 1.5rem; margin-bottom: 1rem;
}
.result-panel h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 1rem; display: flex; align-items: center; gap: 8px; color: var(--text-secondary); }

.finding-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  margin-bottom: 6px; font-size: 0.92rem; line-height: 1.55;
}
.finding-item.danger { background: rgba(255,69,58,0.06); border-left: 2px solid var(--red); color: rgba(255,120,113,0.9); }
.finding-item.warning { background: rgba(255,159,10,0.06); border-left: 2px solid var(--orange); color: rgba(255,190,80,0.9); }
.finding-item.safe { background: rgba(48,209,88,0.05); border-left: 2px solid var(--green); color: rgba(90,220,120,0.9); }
.finding-item.info { background: rgba(100,210,255,0.05); border-left: 2px solid var(--cyan); color: rgba(140,220,255,0.9); }

/* ===== Risk ===== */
.risk-meter { text-align: center; padding: 1.5rem; }
.risk-circle {
  width: 130px; height: 130px; border-radius: 50%;
  margin: 0 auto 0.8rem; display: flex; align-items: center; justify-content: center;
  position: relative; background: rgba(255,255,255,0.03);
}
.risk-circle .score { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; }
.risk-circle svg { position: absolute; top: 0; left: 0; transform: rotate(-90deg); }
.risk-label { font-size: 0.85rem; font-weight: 700; }
.risk-low { color: var(--green); }
.risk-medium { color: var(--orange); }
.risk-high { color: var(--red); }
.risk-critical { color: #ff2d2d; }

/* ===== Progress ===== */
.progress-bar-container { background: rgba(255,255,255,0.06); border-radius: 10px; height: 4px; overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: 10px; background: var(--accent); transition: width 0.5s ease; }

/* ===== Story ===== */
.story-container { max-width: 720px; margin: 0 auto; padding: 1rem clamp(1rem, 3vw, 2rem); }

.chapter {
  margin-bottom: 2rem; padding: 1.5rem;
  background: var(--glass-bg);
  backdrop-filter: saturate(150%) blur(20px); -webkit-backdrop-filter: saturate(150%) blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.chapter.visible { opacity: 1; transform: translateY(0); }
.chapter-number { font-size: 0.65rem; color: var(--text-muted); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.4rem; font-weight: 600; }
.chapter h2 { font-size: 1.55rem; font-weight: 700; margin-bottom: 0.8rem; color: var(--text-primary); letter-spacing: -0.01em; }
.chapter .story-text { font-size: 1.08rem; color: var(--text-secondary); line-height: 1.8; margin-bottom: 1rem; overflow-wrap: break-word; word-break: break-word; }

.message-example { padding: 0.8rem 1rem; border-radius: var(--radius); margin: 0.8rem 0; font-family: 'SF Mono', 'Menlo', monospace; font-size: 0.78rem; line-height: 1.6; }
.message-example.danger { background: rgba(255,69,58,0.05); border: 1px solid rgba(255,69,58,0.1); border-left: 3px solid var(--red); }
.message-example.safe { background: rgba(48,209,88,0.04); border: 1px solid rgba(48,209,88,0.1); border-left: 3px solid var(--green); }

.message-label {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 100px;
  font-size: 0.62rem; font-weight: 700; margin-bottom: 6px;
  letter-spacing: 0.06em; font-family: inherit;
}
.message-label.danger-label { background: rgba(255,69,58,0.12); color: var(--red); }
.message-label.safe-label { background: rgba(48,209,88,0.1); color: var(--green); }

.scroll-progress { position: fixed; top: 52px; left: 0; height: 2px; background: var(--accent); z-index: 999; transition: width 0.1s linear; }

/* ===== Game ===== */
.game-container { max-width: 800px; margin: 0 auto; padding: 1rem clamp(1rem, 3vw, 2rem); }
.game-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.game-score { display: flex; align-items: center; gap: 1.5rem; }
.score-item { text-align: center; }
.score-item .label { font-size: 0.62rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.score-item .value { font-size: 1.3rem; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }

.difficulty-selector { display: flex; gap: 4px; flex-wrap: wrap; }
.diff-btn {
  padding: 6px 14px; border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.08); background: transparent;
  color: var(--text-tertiary); font-family: inherit;
  font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: var(--transition);
}
.diff-btn:hover { border-color: rgba(255,255,255,0.15); color: var(--text-secondary); }
.diff-btn.active { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); color: var(--text-primary); }
.diff-btn.active.tier-1 { background: rgba(48,209,88,0.1); border-color: rgba(48,209,88,0.25); color: var(--green); }
.diff-btn.active.tier-2 { background: rgba(100,210,255,0.1); border-color: rgba(100,210,255,0.25); color: var(--cyan); }
.diff-btn.active.tier-3 { background: rgba(255,159,10,0.1); border-color: rgba(255,159,10,0.25); color: var(--orange); }
.diff-btn.active.tier-4 { background: rgba(255,69,58,0.1); border-color: rgba(255,69,58,0.25); color: var(--red); }
.diff-btn.active.tier-5 { background: rgba(191,90,242,0.1); border-color: rgba(191,90,242,0.25); color: var(--purple); }

.scenario-card {
  background: var(--glass-bg);
  backdrop-filter: saturate(150%) blur(20px); -webkit-backdrop-filter: saturate(150%) blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl); padding: 1.5rem; margin-bottom: 1rem;
}
.scenario-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 100px;
  font-size: 0.65rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; margin-bottom: 0.8rem;
  background: rgba(255,255,255,0.06); color: var(--text-secondary);
}
.scenario-content {
  padding: 1.2rem; background: rgba(255,255,255,0.02);
  border-radius: var(--radius); margin-bottom: 1.2rem;
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 0.9rem; line-height: 1.7; color: var(--text-secondary);
  border: 1px solid rgba(255,255,255,0.06);
  overflow-wrap: break-word; word-break: break-word;
}
.answer-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.answer-btn {
  padding: 14px 18px; border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03); color: var(--text-primary);
  font-family: inherit; font-size: 0.95rem; font-weight: 500;
  cursor: pointer; transition: var(--transition); text-align: left;
  overflow-wrap: break-word; word-break: break-word;
}
.answer-btn:hover { border-color: rgba(255,255,255,0.12); background: rgba(255,255,255,0.04); }
.answer-btn.correct { border-color: var(--green) !important; background: rgba(48,209,88,0.08) !important; color: var(--green) !important; }
.answer-btn.incorrect { border-color: var(--red) !important; background: rgba(255,69,58,0.08) !important; color: var(--red) !important; }

.feedback-panel { padding: 1.2rem; border-radius: var(--radius); margin-top: 0.8rem; display: none; }
.feedback-panel.show { display: block; }
.feedback-panel.correct-feedback { background: rgba(48,209,88,0.04); border: 1px solid rgba(48,209,88,0.12); }
.feedback-panel.incorrect-feedback { background: rgba(255,69,58,0.04); border: 1px solid rgba(255,69,58,0.12); }
.feedback-title { font-size: 0.88rem; font-weight: 700; margin-bottom: 0.4rem; }

.badge-display {
  display: flex; align-items: center; gap: 1rem; padding: 1.2rem;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg); margin-bottom: 1rem;
}
.badge-emoji { font-size: 2.5rem; }
.badge-info h4 { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); }
.badge-info p { color: var(--text-secondary); font-size: 0.75rem; }

/* ===== Leaderboard ===== */
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0 4px;
  table-layout: fixed;
}
.leaderboard-table th {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 10px;
  text-align: left;
  background: transparent;
  border-bottom: 1px solid var(--glass-border);
}
.leaderboard-table td {
  padding: 12px 10px;
  background: var(--glass-bg);
  font-size: 0.9rem;
  color: var(--text-primary);
  border: none;
  vertical-align: middle;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.leaderboard-table tr:nth-child(odd) td { background: rgba(255,255,255,0.02); }
.leaderboard-table tr:nth-child(even) td { background: rgba(255,255,255,0.04); }
.leaderboard-table tr td:first-child {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  width: 15%;
}
.leaderboard-table tr td:nth-child(2) { width: 35%; }
.leaderboard-table tr td:nth-child(3) { width: 25%; text-align: center; }
.leaderboard-table tr td:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  width: 25%;
  text-align: center;
}
.leaderboard-table tbody tr {
  transition: var(--transition);
}
.leaderboard-table tbody tr:hover td {
  background: rgba(10,132,255,0.08) !important;
  color: var(--text-primary);
}
.leaderboard-table .rank-1 td {
  background: rgba(255,214,10,0.08) !important;
}
.leaderboard-table .rank-2 td {
  background: rgba(192,192,192,0.08) !important;
}
.leaderboard-table .rank-3 td {
  background: rgba(205,127,50,0.08) !important;
}
.rank-badge { font-weight: 700; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
 .rank-badge {
   font-weight: 700;
   color: var(--accent);
   font-size: 1.25rem;
   font-variant-numeric: tabular-nums;
   text-shadow: 0 1px 4px rgba(0,0,0,0.08);
 }

/* ===== Loading ===== */
.loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2.5rem; gap: 0.8rem; }
.spinner { width: 32px; height: 32px; border: 2px solid rgba(255,255,255,0.06); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
.loading-text { font-size: 0.82rem; color: var(--text-tertiary); }

/* ===== Footer (ArshCreates-style 3-column) ===== */
.footer { text-align: center; padding: 1.5rem; border-top: 1px solid rgba(255,255,255,0.04); margin-top: 3rem; color: var(--text-muted); font-size: 0.82rem; }
.footer a { color: var(--accent); text-decoration: none; }

.neo-footer {
  margin-top: 5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(5,5,8,0.95);
  backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
  padding: 4rem 2rem 0;
}
.neo-footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr;
  gap: 3.5rem;
}
.neo-footer-brand { display: flex; flex-direction: column; gap: 1.2rem; }
.neo-footer-brand .footer-logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--text-primary);
  font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em;
}
.neo-footer-brand .footer-logo img {
  width: 40px; height: 40px; border-radius: 10px; object-fit: cover;
}
.neo-footer-brand .footer-desc {
  font-size: 0.95rem; color: var(--text-secondary); line-height: 1.7; max-width: 300px;
}
.neo-footer-tagline {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.78rem; color: var(--text-muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 8px 14px; border-radius: 100px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07);
  width: fit-content;
}
.neo-footer-tagline .dot { width: 6px; height: 6px; background: var(--green); border-radius: 50%; animation: pulse 2.5s infinite; }
.neo-footer-social {
  display: flex; gap: 10px; margin-top: 0.3rem;
}
.neo-footer-social a {
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.09);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); text-decoration: none; font-size: 1.1rem;
  transition: var(--transition);
}
.neo-footer-social a:hover {
  background: rgba(10,132,255,0.15); border-color: rgba(10,132,255,0.3);
  color: var(--accent); transform: translateY(-2px);
}
.neo-footer-col h4 {
  font-size: 0.72rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--text-primary); margin-bottom: 1.2rem;
  padding-bottom: 0.6rem; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.neo-footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.neo-footer-col ul li a {
  color: var(--text-secondary); text-decoration: none; font-size: 0.95rem;
  transition: color 0.2s; display: flex; align-items: center; gap: 6px;
}
.neo-footer-col ul li a:hover { color: var(--accent); padding-left: 4px; }

.neo-footer-divider {
  max-width: 1100px; margin: 3.5rem auto 0;
  height: 1px; background: rgba(255,255,255,0.07);
}
.neo-footer-bottom {
  max-width: 1100px; margin: 0 auto;
  padding: 1.5rem 0 2rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.neo-footer-bottom p {
  font-size: 0.88rem; color: var(--text-secondary);
}
.neo-footer-bottom a {
  color: var(--accent); text-decoration: none;
}
.neo-footer-bottom-right {
  display: flex; align-items: center; gap: 1rem;
}
.back-to-top {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 12px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-secondary); text-decoration: none;
  font-size: 0.85rem; font-weight: 600; transition: var(--transition);
}
.back-to-top:hover {
  background: rgba(10,132,255,0.12); border-color: rgba(10,132,255,0.25); color: var(--accent); transform: translateY(-2px);
}

/* Light theme footer overrides */
[data-theme="light"] .neo-footer {
  background: rgba(240,240,245,0.97);
  border-top-color: rgba(0,0,0,0.1);
}
[data-theme="light"] .neo-footer-social a {
  background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .neo-footer-col h4 {
  border-bottom-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .neo-footer-divider {
  background: rgba(0,0,0,0.08);
}
[data-theme="light"] .neo-footer-tagline {
  background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .back-to-top {
  background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1);
}

/* Auto-suggest dropdown */
.suggest-wrapper { position: relative; }
.suggest-dropdown {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 100;
  background: rgba(28,28,30,0.97);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; margin-top: 4px;
  max-height: 200px; overflow-y: auto;
  display: none; box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.suggest-dropdown.show { display: block; }
.suggest-item {
  padding: 10px 14px; font-size: 0.88rem;
  color: var(--text-secondary); cursor: pointer;
  transition: background 0.15s;
}
.suggest-item:hover, .suggest-item.active {
  background: rgba(10,132,255,0.12); color: var(--accent);
}
.suggest-item:first-child { border-radius: 12px 12px 0 0; }
.suggest-item:last-child { border-radius: 0 0 12px 12px; }
[data-theme="light"] .suggest-dropdown {
  background: rgba(255,255,255,0.97);
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

@media (max-width: 1024px) {
  .neo-footer-inner { grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; }
  .neo-footer-brand { grid-column: 1 / -1; }
  .neo-footer-brand .footer-desc { max-width: 100%; }
}
@media (max-width: 768px) {
  .neo-footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .neo-footer-brand { grid-column: 1 / -1; }
  .neo-footer-bottom { flex-direction: column; text-align: center; }
  .neo-footer-bottom-right { flex-direction: column; }
}
@media (max-width: 480px) {
  .neo-footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ===== EXIF Table ===== */
.exif-table { width: 100%; border-collapse: collapse; }
.exif-table td { padding: 6px 10px; border-bottom: 1px solid rgba(255,255,255,0.03); font-size: 0.82rem; }
.exif-table td:first-child { color: var(--text-muted); font-weight: 600; width: 40%; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; }
.exif-table td:last-child { color: var(--text-primary); font-family: 'SF Mono', 'Menlo', monospace; font-size: 0.78rem; }

/* ===== Animations ===== */
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(1.3); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.animate-in { animation: slideUp 0.5s var(--ease) forwards; }
@keyframes skeletonPulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.8; } }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .charts-grid { grid-template-columns: 1fr; }
  .tool-layout { grid-template-columns: 1fr; }
  .tool-input-panel { position: static; }
  .home-grid { grid-template-columns: 1fr; }
  .home-sidebar { order: -1; }
}

@media (max-width: 768px) {
  .navbar { padding: 0 1rem; }
  .nav-links {
    display: none; position: absolute; top: 52px; left: 0; right: 0;
    background: rgba(0,0,0,0.92);
    backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    flex-direction: column; padding: 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  [data-theme="light"] .nav-links {
    background: rgba(255,255,255,0.98);
    border-bottom: 1px solid rgba(0,0,0,0.09);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  }
  [data-theme="light"] .nav-links a { color: rgba(0,0,0,0.82); font-weight: 500; }
  [data-theme="light"] .nav-links a:hover { color: var(--accent); background: rgba(0,113,227,0.07); }
  [data-theme="light"] .nav-links a.active { color: var(--accent); background: rgba(0,113,227,0.1); }
  [data-theme="light"] .hamburger { color: rgba(0,0,0,0.7); }
  .nav-links.show { display: flex; }
  .hamburger { display: block; }
  .hero { padding: 3rem 1rem 1.5rem; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 1.5rem 1rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .answer-buttons { grid-template-columns: 1fr; }
  .game-header { flex-direction: column; align-items: stretch; }
  .game-score { justify-content: space-around; }
}

@media (max-width: 480px) {
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .nav-logo span { display: none; }
}

/* ===== Utility ===== */
.hidden { display: none !important; }
.text-green { color: var(--green); }
.text-cyan { color: var(--cyan); }
.text-red { color: var(--red); }
.text-orange { color: var(--orange); }
.text-purple { color: var(--purple); }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.text-center { text-align: center; }
.text-mono { font-family: 'SF Mono', 'Menlo', monospace; }

.news-skeleton { padding: 1rem 1.2rem; display: flex; gap: 1rem; align-items: flex-start; }
.skeleton-line { height: 12px; background: rgba(255,255,255,0.04); border-radius: 6px; animation: skeletonPulse 1.5s infinite; }

/* ===== Phone Inspector ===== */
.kpi-card {
  background: var(--glass-bg);
  backdrop-filter: saturate(150%) blur(20px);
  -webkit-backdrop-filter: saturate(150%) blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.2rem;
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  transition: transform 0.2s, box-shadow 0.2s;
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.kpi-icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
}
.kpi-body { flex: 1; min-width: 0; }
.kpi-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 0.2rem;
}
.kpi-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--kpi-accent, var(--text-primary));
  overflow-wrap: break-word;
  word-break: break-word;
}
.kpi-bar-bg {
  margin-top: 0.5rem;
  height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}
.kpi-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scan spinner */
.scan-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Tool input panel layout */
.tool-input-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.input-group { margin-bottom: 1rem; }
.input-group label {
  display: block;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

@media (max-width: 768px) {
  #kpiGrid { grid-template-columns: 1fr !important; }
}

/* ===== Chatbot Widget ===== */
.chatbot-logo-icon {
  width: 30px; height: 30px; object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(10,132,255,0.5));
  display: block;
}
.chatbot-toggle {
  position: fixed; bottom: 28px; right: 28px; z-index: 9999;
  width: 56px; height: 56px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  color: var(--text-secondary);
  font-size: 1.4rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  transition: all 0.3s var(--ease);
}
.chatbot-toggle:hover {
  transform: scale(1.08);
  background: rgba(10,132,255,0.12); border-color: rgba(10,132,255,0.3);
  color: var(--accent);
  box-shadow: 0 6px 28px rgba(10,132,255,0.25);
}
.chatbot-toggle.active {
  background: rgba(10,132,255,0.15); border-color: rgba(10,132,255,0.35);
  color: var(--accent);
}

.chatbot-panel {
  position: fixed; bottom: 96px; right: 28px; z-index: 9998;
  width: 390px; max-height: 80vh;
  background: rgba(28,28,30,0.96);
  backdrop-filter: saturate(180%) blur(30px); -webkit-backdrop-filter: saturate(180%) blur(30px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 12px 50px rgba(0,0,0,0.5);
  opacity: 0; visibility: hidden; transform: translateY(12px) scale(0.96);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.chatbot-panel.open {
  opacity: 1; visibility: visible; transform: translateY(0) scale(1);
}

.chatbot-header {
  padding: 14px 18px; display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.chatbot-header .bot-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex; align-items: center; justify-content: center; font-size: 0.9rem;
}
.chatbot-header h4 { font-size: 0.92rem; font-weight: 600; color: var(--text-primary); margin: 0; flex: 1; }
.chatbot-close {
  background: none; border: none; color: var(--text-muted); font-size: 1.1rem; cursor: pointer;
  padding: 4px 8px; border-radius: 8px; transition: var(--transition);
}
.chatbot-close:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }
.chatbot-feedback-btn {
  background: none; border: none; cursor: pointer; font-size: 1rem;
  padding: 4px 8px; border-radius: 8px; transition: var(--transition);
  color: var(--text-muted);
}
.chatbot-feedback-btn:hover { background: rgba(255,255,255,0.06); }

/* Quick question chips */
.chat-quick-chips {
  padding: 10px 14px 8px;
  border-top: 1px solid rgba(255,255,255,0.05);
  transition: opacity 0.25s ease;
}
.chips-label {
  font-size: 0.7rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px;
}
.chat-chip {
  display: inline-block; margin: 3px 4px 3px 0;
  padding: 6px 12px; border-radius: 20px;
  background: rgba(10,132,255,0.1); border: 1px solid rgba(10,132,255,0.25);
  color: var(--accent); font-size: 0.78rem; font-weight: 500;
  cursor: pointer; transition: var(--transition); white-space: nowrap;
}
.chat-chip:hover { background: rgba(10,132,255,0.2); border-color: var(--accent); }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  max-height: 60vh; min-height: 200px;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.chat-msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 0.9rem; line-height: 1.6; overflow-wrap: break-word; word-break: break-word; white-space: pre-wrap; }
.chat-msg.bot {
  align-self: flex-start;
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  border-bottom-left-radius: 4px;
  white-space: normal;
}
/* Chat markdown rendering */
.chat-msg.bot p { margin: 0 0 8px; }
.chat-msg.bot p:last-child { margin-bottom: 0; }
.chat-msg.bot h4 { font-size: 0.9rem; font-weight: 700; margin: 10px 0 6px; color: var(--text-primary); }
.chat-msg.bot h5 { font-size: 0.85rem; font-weight: 700; margin: 8px 0 4px; }
.chat-msg.bot ul, .chat-msg.bot ol { margin: 6px 0 8px 18px; padding: 0; }
.chat-msg.bot li { margin-bottom: 4px; font-size: 0.88rem; }
.chat-code-block { background: rgba(0,0,0,0.35); border-radius: 8px; padding: 10px 12px; margin: 8px 0; overflow-x: auto; font-family: 'SF Mono', Consolas, monospace; font-size: 0.8rem; line-height: 1.5; white-space: pre; }
.chat-inline-code { background: rgba(255,255,255,0.1); border-radius: 4px; padding: 1px 5px; font-family: 'SF Mono', Consolas, monospace; font-size: 0.82em; }
.chat-tip { background: rgba(10,132,255,0.08); border-left: 2px solid var(--accent); padding: 6px 10px; border-radius: 0 6px 6px 0; font-size: 0.85rem; margin: 6px 0; }
[data-theme="light"] .chat-code-block { background: rgba(0,0,0,0.06); }
[data-theme="light"] .chat-inline-code { background: rgba(0,0,0,0.08); }
.chat-msg.user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg .typing-dots span {
  display: inline-block; width: 6px; height: 6px;
  background: var(--text-muted); border-radius: 50%;
  margin: 0 2px; animation: typingBounce 1.4s infinite ease-in-out;
}
.chat-msg .typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.chat-msg .typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce { 0%,80%,100%{transform:translateY(0)} 40%{transform:translateY(-6px)} }

.chat-input-area {
  padding: 12px 14px; display: flex; gap: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}
.chat-input-area input {
  flex: 1; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 10px 14px; font-size: 0.88rem;
  color: var(--text-primary); font-family: inherit; outline: none;
  transition: var(--transition);
}
.chat-input-area input:focus { border-color: var(--accent); }
.chat-input-area input::placeholder { color: var(--text-muted); }
.chat-send-btn {
  width: 40px; height: 40px; border-radius: 12px; border: none;
  background: var(--accent); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: var(--transition);
}
.chat-send-btn:hover { background: #0b84fe; }
.chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== Feedback Modal ===== */
.feedback-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: all 0.3s;
}
.feedback-overlay.open { opacity: 1; visibility: visible; }
.feedback-modal {
  background: rgba(28,28,30,0.97);
  backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px; padding: 2rem; width: 90%; max-width: 480px;
  transform: scale(0.95); transition: transform 0.3s;
}
.feedback-overlay.open .feedback-modal { transform: scale(1); }
.feedback-modal h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text-primary); }
.feedback-modal p { font-size: 0.88rem; color: var(--text-tertiary); margin-bottom: 1.2rem; }
.feedback-stars { display: flex; gap: 8px; margin-bottom: 1rem; }
.feedback-stars button {
  background: none; border: none; font-size: 1.5rem; cursor: pointer;
  color: var(--text-muted); transition: color 0.2s;
}
.feedback-stars button.active,
.feedback-stars button:hover { color: #FFD60A; }
.feedback-modal textarea {
  width: 100%; min-height: 100px; resize: vertical;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 12px; font-size: 0.88rem;
  color: var(--text-primary); font-family: inherit; outline: none; margin-bottom: 1rem;
}
.feedback-modal textarea:focus { border-color: var(--accent); }
.feedback-actions { display: flex; gap: 10px; justify-content: flex-end; }
.feedback-actions button {
  padding: 10px 20px; border-radius: 10px; border: none; font-size: 0.88rem;
  font-weight: 600; cursor: pointer; transition: var(--transition);
}
.btn-feedback-cancel { background: rgba(255,255,255,0.06); color: var(--text-secondary); }
.btn-feedback-cancel:hover { background: rgba(255,255,255,0.1); }
.btn-feedback-submit { background: var(--accent); color: #fff; }
.btn-feedback-submit:hover { background: #0b84fe; }

/* ===== Resource / New Pages ===== */
.page-hero {
  padding: 4.5rem 2rem 2rem; text-align: center;
  position: relative;
}
/* Ambient halo behind page title */
.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 700px; height: 340px;
  background: radial-gradient(ellipse at 50% 30%, rgba(10,132,255,0.13) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}
.page-hero h1, .page-hero p { position: relative; z-index: 1; }
.page-hero h1 {
  font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 0.6rem;
}
.page-hero p { font-size: 1.2rem; color: var(--text-secondary); max-width: 620px; margin: 0 auto; }

.resource-grid {
  display: flex; flex-direction: column;
  gap: 0; padding: 0 2rem 3rem; max-width: 960px; margin: 0 auto;
}
.resource-card {
  background: var(--glass-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 0; padding: 1.4rem 1.8rem;
  border-bottom: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  transition: background 0.15s;
}
.resource-card:first-child { border-radius: 16px 16px 0 0; }
.resource-card:last-child  { border-radius: 0 0 16px 16px; border-bottom: 1px solid var(--glass-border); }
.resource-card:only-child  { border-radius: 16px; border-bottom: 1px solid var(--glass-border); }
.resource-card:hover { background: rgba(255,255,255,0.045); }
.resource-card .card-row { display: flex; align-items: flex-start; gap: 1.2rem; }
.resource-card .card-emoji { font-size: 1.6rem; line-height: 1; flex-shrink: 0; padding-top: 2px; }
.resource-card .card-body { flex: 1; min-width: 0; }
.resource-card h3 { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.2rem; }
.resource-card .card-subtitle { font-size: 0.8rem; color: var(--accent); font-weight: 600; margin-bottom: 0.4rem; }
.resource-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 0.6rem; }
.resource-card .card-meta { font-size: 0.82rem; color: var(--text-muted); display: flex; gap: 16px; flex-wrap: wrap; }
.resource-card .card-meta span { display: flex; align-items: center; gap: 4px; }
.resource-card .card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 140px; flex-shrink: 0; }
.resource-card .salary-badge {
  padding: 4px 12px; border-radius: 20px;
  background: rgba(52,199,89,0.12); border: 1px solid rgba(52,199,89,0.2);
  font-size: 0.82rem; font-weight: 600; color: var(--green); white-space: nowrap;
}
.resource-card .level-badge {
  padding: 3px 10px; border-radius: 20px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.75rem; color: var(--text-muted);
}
.resource-card .card-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.85rem; font-weight: 600; color: var(--accent);
  text-decoration: none; transition: gap 0.2s; margin-top: 4px;
}
.resource-card .card-link:hover { gap: 8px; }

/* Careers table */
.careers-table {
  width: 100%;
  border-collapse: separate; border-spacing: 0;
}
.careers-table thead th {
  padding: 10px 16px; text-align: left;
  font-size: 0.75rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.careers-table thead th:first-child { border-radius: 12px 0 0 0; }
.careers-table thead th:last-child  { border-radius: 0 12px 0 0; }
.careers-table tbody tr {
  transition: background 0.15s; cursor: default;
}
.careers-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.careers-table tbody td {
  padding: 14px 16px;
  font-size: 0.9rem; color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: top;
}
.careers-table tbody td:first-child { font-weight: 600; color: var(--text-primary); }
.careers-table .badge-level {
  display: inline-block; padding: 2px 10px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 600; white-space: nowrap;
}
.badge-entry  { background: rgba(52,199,89,0.12); color: var(--green); }
.badge-mid    { background: rgba(10,132,255,0.12); color: var(--accent); }
.badge-senior { background: rgba(191,90,242,0.12); color: var(--purple); }
.badge-exec   { background: rgba(255,159,10,0.12); color: var(--orange); }
.careers-table .salary-text { color: var(--green); font-weight: 600; font-size: 0.85rem; }

/* ── Careers page layout ─────────────────────────────── */
.page-section { max-width: 960px; margin: 0 auto 2.5rem; padding: 0 2rem; }
.section-label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 1rem;
}

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.mini-stat {
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: 14px; padding: 1.2rem 1.4rem; text-align: center;
}
.mini-stat-num { font-size: 1.9rem; font-weight: 800; color: var(--accent); }
.mini-stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

.careers-table-wrap { }
.tbl-wrap {
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: 14px; overflow: hidden; overflow-x: auto;
}

/* Level pills for careers table */
.level-pill {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 0.72rem; font-weight: 700; white-space: nowrap;
}
.lv-entry  { background: rgba(52,199,89,0.14);   color: var(--green); }
.lv-mid    { background: rgba(10,132,255,0.14);   color: var(--accent); }
.lv-senior { background: rgba(191,90,242,0.14);   color: var(--purple); }
.lv-exec   { background: rgba(255,159,10,0.14);   color: var(--orange); }

.salary-cell { color: var(--green); font-weight: 700; white-space: nowrap; }
.demand-bar { background: rgba(255,255,255,0.07); border-radius: 4px; width: 120px; height: 6px; }
.demand-fill { background: var(--accent); height: 100%; border-radius: 4px; }
.skills-cell { color: var(--text-muted); font-size: 0.8rem; max-width: 260px; }

/* Info cards: career paths + companies */
.info-card {
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: 14px; padding: 1.4rem 1.6rem; margin-bottom: 1rem;
}
.info-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.8rem; color: var(--text-primary); }

.path-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.path-step {
  background: rgba(10,132,255,0.12); border: 1px solid rgba(10,132,255,0.2);
  border-radius: 8px; padding: 6px 14px;
  font-size: 0.85rem; font-weight: 600; color: var(--accent);
}
.path-arrow { color: var(--text-muted); font-size: 1.1rem; }

.company-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.company-tag {
  padding: 5px 14px; border-radius: 20px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.82rem; color: var(--text-secondary);
}

/* ────────────────────────────────────────────────────── */

/* ── Product Card Grid (Courses & Certifications) ──────── */
.product-section { max-width: 1080px; margin: 0 auto; padding: 0 2rem 3rem; }

.product-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 1.2rem;
}

.product-card {
  border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.07);
  background: var(--glass-bg);
  display: flex; flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}

/* Card header: coloured gradient + icon */
.pc-header {
  position: relative;
  height: 130px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}
.pc-badge {
  position: absolute; top: 12px; right: 12px;
  padding: 4px 10px; border-radius: 20px;
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge-free    { background: rgba(52,199,89,0.85);  color: #fff; }
.badge-paid    { background: rgba(255,159,10,0.85);  color: #fff; }
.badge-premium { background: rgba(191,90,242,0.85);  color: #fff; }
.badge-free-paid { background: rgba(10,132,255,0.85); color: #fff; }

.pc-platform-label {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: rgba(255,255,255,0.85); white-space: nowrap;
  background: rgba(0,0,0,0.35); padding: 2px 10px; border-radius: 20px;
}

/* Card body */
.pc-body {
  padding: 16px 18px 18px;
  display: flex; flex-direction: column; flex: 1;
  background: rgba(18,18,20,0.9);
}
.pc-title {
  font-size: 0.95rem; font-weight: 700; color: var(--text-primary);
  margin-bottom: 8px; line-height: 1.35;
}
.pc-tags {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px;
}
.pc-tag {
  padding: 3px 10px; border-radius: 20px;
  font-size: 0.72rem; font-weight: 600;
  background: rgba(255,255,255,0.06); color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.07);
}
.pc-tag.lv-entry  { background: rgba(52,199,89,0.12);  color: var(--green); border-color: rgba(52,199,89,0.2); }
.pc-tag.lv-mid    { background: rgba(10,132,255,0.12);  color: var(--accent); border-color: rgba(10,132,255,0.2); }
.pc-tag.lv-adv    { background: rgba(191,90,242,0.12);  color: var(--purple); border-color: rgba(191,90,242,0.2); }
.pc-tag.lv-exp    { background: rgba(255,69,58,0.12);   color: #FF453A; border-color: rgba(255,69,58,0.2); }
.pc-tag.cost-tag  { background: rgba(52,199,89,0.1);    color: var(--green); border-color: rgba(52,199,89,0.15); }

.pc-desc {
  font-size: 0.82rem; color: var(--text-muted); line-height: 1.55;
  margin-bottom: 12px; flex: 1;
}
.pc-features {
  list-style: none; padding: 0; margin: 0 0 14px;
  display: flex; flex-direction: column; gap: 5px;
}
.pc-features li {
  font-size: 0.78rem; color: var(--text-secondary);
  display: flex; align-items: flex-start; gap: 7px;
}
.pc-features li::before {
  content: '✓'; color: var(--green); font-weight: 700; flex-shrink: 0; margin-top: 1px;
}
.pc-action {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  padding: 9px 0; border-radius: 10px; border: 1px solid rgba(10,132,255,0.3);
  color: var(--accent); font-size: 0.82rem; font-weight: 600;
  text-decoration: none; background: rgba(10,132,255,0.07);
  transition: var(--transition); margin-top: auto;
}
.pc-action:hover { background: rgba(10,132,255,0.18); border-color: var(--accent); color: var(--accent); }

/* Section label shared */
.section-label-lg {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 0.3rem;
}
.section-title-lg {
  font-size: 1.6rem; font-weight: 800; color: var(--text-primary); margin-bottom: 0.4rem;
}
.section-sub-lg {
  font-size: 0.92rem; color: var(--text-muted); margin-bottom: 0;
}

@media (max-width: 900px) {
  .product-cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .product-cards-grid { grid-template-columns: 1fr; }
  .product-section { padding: 0 1rem 2rem; }
}
/* ────────────────────────────────────────────────────────── */

.about-section { max-width: 1100px; margin: 0 auto; padding: 0 2rem 3rem; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.about-card {
  background: var(--glass-bg);
  backdrop-filter: saturate(150%) blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 18px; padding: 2rem;
}
.about-card.full-width { grid-column: 1 / -1; }

/* Story two-column layout */
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; max-width: 1100px; margin: 0 auto; padding: 0 2rem 3rem; }
.story-main { display: flex; flex-direction: column; gap: 1.5rem; }
.story-sidebar {
  position: sticky; top: 80px; align-self: start;
  display: flex; flex-direction: column; gap: 1.5rem;
}
.story-sidebar .tip-card {
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: 18px; padding: 1.5rem;
}
.story-sidebar .tip-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.5rem; }
.story-sidebar .tip-card p { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.65; }

/* Story AI interaction blocks */
.story-ai-block {
  margin-top: 1.2rem; padding: 1.2rem;
  background: rgba(10,132,255,0.04);
  border: 1px solid rgba(10,132,255,0.12);
  border-radius: 14px;
}
.story-ai-header {
  font-size: 0.85rem; font-weight: 700; color: var(--accent);
  margin-bottom: 0.7rem; letter-spacing: 0.02em;
}
.story-ai-input {
  width: 100%; min-height: 64px; resize: vertical;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; padding: 10px 14px; font-size: 0.88rem;
  color: var(--text-primary); font-family: inherit; outline: none;
  transition: border-color 0.2s;
}
.story-ai-input:focus { border-color: var(--accent); }
.story-ai-input::placeholder { color: var(--text-muted); }
.story-ai-btn {
  margin-top: 0.6rem; padding: 8px 20px; border-radius: 10px;
  border: 1px solid rgba(10,132,255,0.3);
  background: rgba(10,132,255,0.08); color: var(--accent);
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
  transition: var(--transition);
}
.story-ai-btn:hover { background: rgba(10,132,255,0.18); border-color: var(--accent); }
.story-ai-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.story-ai-reply {
  display: none; margin-top: 0.8rem; padding: 12px 16px;
  background: rgba(255,255,255,0.03); border-radius: 10px;
  border-left: 3px solid var(--accent);
  font-size: 0.9rem; color: var(--text-secondary); line-height: 1.65;
}
.story-ai-reply strong { color: var(--accent); }

/* Hero AI badge */
.hero-ai-badge {
  display: inline-block; margin-left: 10px; padding: 2px 10px;
  border-radius: 20px; font-size: 0.7rem; font-weight: 700;
  background: rgba(10,132,255,0.12); border: 1px solid rgba(10,132,255,0.25);
  color: var(--accent); letter-spacing: 0.04em; vertical-align: middle;
}

[data-theme="light"] .story-ai-block { background: rgba(0,113,227,0.04); border-color: rgba(0,113,227,0.12); }
[data-theme="light"] .story-ai-input { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .story-ai-reply { background: rgba(0,0,0,0.02); }

/* Game wider layout */
.game-layout { display: grid; grid-template-columns: 1fr 340px; gap: 2rem; max-width: 1100px; margin: 0 auto; padding: 1rem 2rem; }
.game-main { min-width: 0; }
.game-sidebar {
  position: sticky; top: 80px; align-self: start;
  display: flex; flex-direction: column; gap: 1.5rem;
}

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
  .story-grid { grid-template-columns: 1fr; }
  .game-layout { grid-template-columns: 1fr; }
  .story-sidebar, .game-sidebar { position: static; }
}
.about-card h3 { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.6rem; }
.about-card p { font-size: 1.05rem; color: var(--text-secondary); line-height: 1.8; overflow-wrap: break-word; word-break: break-word; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1rem; }
.tech-tag {
  padding: 5px 14px; border-radius: 20px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.82rem; color: var(--text-secondary);
}

@media (max-width: 768px) {
  .chatbot-panel { width: calc(100vw - 24px); right: 12px; bottom: 84px; }
  .resource-grid { padding: 0 1rem 2rem; }
  .resource-card .card-right { display: none; }
  .careers-table { padding: 0 1rem; font-size: 0.82rem; }
  .careers-table thead th, .careers-table tbody td { padding: 10px 10px; }
  .page-hero { padding: 3rem 1rem 1.5rem; }
  .page-hero h1 { font-size: 1.6rem; }
  .about-section { padding: 0 1rem 2rem; }
  .page-section { padding: 0 1rem; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .demand-bar { width: 70px; }
  .skills-cell { display: none; }
  .path-flow { gap: 6px; }
}

