﻿    /* ==========================================================================
       🌈 ETAN GAMIFIED EDTECH THEME — 8 TRÒ CHƠI HỌC TẬP CHUẨN XÁC THEO YÊU CẦU
       ========================================================================== */
    :root {
      --font-brand: 'Baloo 2', cursive, sans-serif;
      --font-body: 'Nunito', sans-serif;
      
      --bg-canvas: #f0f7ff;
      --orange-main: #ff9800;
      --orange-gradient: linear-gradient(135deg, #ff9f1c 0%, #f57c00 100%);
      --blue-main: #1877f2;
      --blue-card: #2563eb;
      --green-main: #10b981;
      --purple-main: #8b5cf6;
      --yellow-gold: #fbc02d;
      
      --card-white: #ffffff;
      --card-radius-xl: 24px;
      --card-radius-lg: 18px;
      --card-radius-md: 14px;
      
      --shadow-card: 0 8px 24px rgba(15, 23, 42, 0.06);
      --shadow-lift: 0 14px 32px rgba(15, 23, 42, 0.12);
      --border-soft: #e2eeff;
    }

    * { box-sizing: border-box; }
    body {
      margin: 0;
      font-family: var(--font-body);
      background-color: var(--bg-canvas);
      background-image: 
        radial-gradient(circle at 10% 15%, rgba(255, 183, 3, 0.10) 0%, transparent 20%),
        radial-gradient(circle at 90% 25%, rgba(139, 92, 246, 0.10) 0%, transparent 25%),
        radial-gradient(circle at 50% 85%, rgba(16, 185, 129, 0.08) 0%, transparent 30%);
      color: #1e293b;
      font-size: 15px;
      padding-top: 72px;
      overflow-x: hidden;
    }

    h1, h2, h3, h4, h5, h6, .brand-text {
      font-family: var(--font-brand);
      font-weight: 800;
    }

    /* ===== TOP APP BAR ===== */
    .top-app-bar {
      background: rgba(255, 255, 255, 0.97);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border-bottom: 2px solid #e2eeff;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
      padding: 8px 0;
      z-index: 1040;
    }
    .etan-logo-colorful {
      font-family: var(--font-brand);
      font-size: 2.1rem;
      font-weight: 900;
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      letter-spacing: 1px;
      line-height: 1;
    }
    .etan-logo-colorful .l-e { color: #ff5722; }
    .etan-logo-colorful .l-t { color: #10b981; }
    .etan-logo-colorful .l-a { color: #0284c7; }
    .etan-logo-colorful .l-n { color: #8b5cf6; }
    .etan-logo-colorful .l-star {
      color: #ffd700;
      font-size: 1.1rem;
      margin-left: 2px;
      animation: starTwist 2s infinite ease-in-out;
    }
    @keyframes starTwist {
      0%, 100% { transform: scale(1) rotate(0deg); }
      50% { transform: scale(1.3) rotate(20deg); }
    }

    .nav-icon-pill {
      background: #f1f6ff;
      border: 1px solid #dbeafe;
      color: #1e3a8a !important;
      border-radius: 14px;
      padding: 7px 13px !important;
      font-weight: 800;
      font-size: 0.88rem;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      transition: all 0.2s ease;
      text-decoration: none;
      margin: 0 2px;
    }
    .nav-icon-pill:hover, .nav-icon-pill.active {
      background: #1877f2;
      color: #ffffff !important;
      border-color: #1877f2;
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(24, 119, 242, 0.25);
    }
    .nav-icon-pill.active { background: #1877f2; color: #fff !important; }

    .btn-user-login {
      background: var(--orange-gradient);
      color: #ffffff !important;
      border-radius: 999px;
      font-weight: 900;
      padding: 7px 18px;
      font-size: 0.88rem;
      box-shadow: 0 4px 14px rgba(255, 152, 0, 0.3);
      text-decoration: none;
      transition: all 0.2s ease;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      white-space: nowrap;
    }
    .btn-user-login:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 20px rgba(255, 152, 0, 0.45);
      color: #fff !important;
    }
    .btn-user-reg {
      background: #f8fbff;
      border: 1.5px solid #bfdbfe;
      color: #1d4ed8 !important;
      border-radius: 999px;
      font-weight: 800;
      padding: 6px 16px;
      font-size: 0.88rem;
      text-decoration: none;
      transition: all 0.2s ease;
      white-space: nowrap;
    }
    .btn-user-reg:hover { background: #eff6ff; border-color: #93c5fd; }

    .btn-menu-drawer-toggle {
      background: #f1f5f9;
      border: 1.5px solid #cbd5e1;
      color: #1e293b;
      border-radius: 12px;
      padding: 6px 11px;
      font-size: 1.15rem;
      line-height: 1;
    }

    .marquee-bar-playful {
      background: linear-gradient(90deg, #fff7ed 0%, #fef3c7 50%, #eff6ff 100%);
      border-bottom: 1px solid #fed7aa;
      padding: 5px 0;
      font-size: 0.84rem;
      font-weight: 800;
      color: #c2410c;
    }

    .app-container {
      max-width: 1440px;
      margin: 0 auto;
      padding: 14px 18px 40px;
    }

    /* ===== HERO PROGRESS BANNER ===== */
    .player-hero-card {
      background: linear-gradient(135deg, #ff9f1c 0%, #ff7a00 100%);
      border-radius: var(--card-radius-xl);
      padding: 20px 24px;
      color: #ffffff;
      box-shadow: 0 14px 36px rgba(255, 122, 0, 0.28);
      display: grid;
      grid-template-columns: auto 1.4fr auto auto;
      align-items: center;
      gap: 18px;
      margin-bottom: 20px;
      position: relative;
      overflow: hidden;
    }
    .mascot-avatar-circle {
      width: 64px;
      height: 64px;
      border-radius: 50%;
      background: #ffffff;
      border: 3.5px solid #ffedd5;
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
      display: grid;
      place-items: center;
      font-size: 2.2rem;
      flex-shrink: 0;
      animation: mascotWave 3s infinite ease-in-out;
    }
    @keyframes mascotWave {
      0%, 100% { transform: translateY(0) rotate(0deg); }
      50% { transform: translateY(-4px) rotate(4deg); }
    }
    .player-title-sub {
      font-size: 0.74rem;
      font-weight: 800;
      color: #fff3e0;
      text-transform: uppercase;
      letter-spacing: 0.4px;
    }
    .player-name-big {
      font-family: var(--font-brand);
      font-size: 1.65rem;
      font-weight: 900;
      line-height: 1.1;
      color: #ffffff;
    }
    .player-progress-block {
      background: rgba(0, 0, 0, 0.16);
      border: 1px solid rgba(255, 255, 255, 0.3);
      border-radius: 16px;
      padding: 8px 14px;
    }
    .progress-header-label {
      font-size: 0.72rem;
      font-weight: 800;
      text-transform: uppercase;
      color: #fff3e0;
      margin-bottom: 4px;
      display: flex;
      justify-content: space-between;
    }
    .exp-bar-capsule {
      background: rgba(255, 255, 255, 0.25);
      height: 24px;
      border-radius: 999px;
      position: relative;
      overflow: hidden;
      display: flex;
      align-items: center;
      padding: 2px;
    }
    .exp-bar-fill {
      height: 100%;
      background: linear-gradient(90deg, #00b4d8 0%, #0077b6 100%);
      border-radius: 999px;
      width: 72%;
      position: absolute;
      left: 0;
      top: 0;
    }
    .exp-badge-coin {
      position: relative;
      z-index: 2;
      background: #ffd700;
      color: #78350f;
      font-weight: 900;
      font-size: 0.72rem;
      border-radius: 50%;
      width: 20px;
      height: 20px;
      display: grid;
      place-items: center;
    }
    .exp-text-display {
      position: relative;
      z-index: 2;
      margin-left: auto;
      margin-right: 10px;
      font-family: var(--font-brand);
      font-weight: 800;
      font-size: 0.88rem;
      color: #ffffff;
    }

    .streak-badge-pill, .coins-badge-pill {
      background: rgba(255, 255, 255, 0.2);
      border: 1.5px solid rgba(255, 255, 255, 0.4);
      border-radius: 16px;
      padding: 8px 14px;
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .streak-fire-icon { font-size: 1.8rem; line-height: 1; }
    .streak-text-top, .coin-info-num {
      font-family: var(--font-brand);
      font-size: 1.2rem;
      font-weight: 900;
      line-height: 1.1;
      color: #ffffff;
    }
    .streak-text-sub, .coin-info-top {
      font-size: 0.68rem;
      font-weight: 800;
      text-transform: uppercase;
      color: #fff3e0;
    }

    /* ===== MAIN DASHBOARD 3-COLUMN ===== */
    .dashboard-3col-grid {
      display: grid;
      grid-template-columns: 300px 1fr 330px;
      gap: 18px;
      margin-bottom: 22px;
      align-items: stretch;
    }
    .quest-col-box {
      display: flex;
      flex-direction: column;
      height: 100%;
    }
    .box-card-white {
      background: var(--card-white);
      border: 2px solid var(--border-soft);
      border-radius: var(--card-radius-xl);
      padding: 18px 16px;
      box-shadow: var(--shadow-card);
      transition: all 0.25s ease;
    }
    .box-card-white:hover { box-shadow: var(--shadow-lift); }

    .card-heading-title {
      font-family: var(--font-brand);
      font-size: 1.15rem;
      font-weight: 900;
      color: #0f2756;
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    /* CỘT 1: DAILY QUESTS & STREAK */
    .quest-stack {
      display: flex;
      flex-direction: column;
      gap: 9px;
      margin-bottom: 12px;
    }
    .quest-item-card {
      background: #f8fbff;
      border: 1.5px solid #dbeafe;
      border-radius: var(--card-radius-md);
      padding: 9px 11px;
      display: flex;
      align-items: center;
      gap: 9px;
      transition: transform 0.2s ease;
    }
    .quest-item-card:hover { background: #eff6ff; transform: translateX(3px); }
    .quest-icon-sq {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      display: grid;
      place-items: center;
      font-size: 1.1rem;
      flex-shrink: 0;
    }
    .quest-details { flex-grow: 1; min-width: 0; }
    .quest-name {
      font-family: var(--font-brand);
      font-weight: 800;
      font-size: 0.88rem;
      color: #0f172a;
      line-height: 1.25;
      margin-bottom: 2px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .quest-sub { font-size: 0.72rem; color: #64748b; line-height: 1.2; font-family: var(--font-body); }
    .quest-xp-pill {
      font-family: var(--font-brand);
      background: #fef3c7;
      border: 1.5px solid #fde68a;
      color: #b45309;
      font-weight: 900;
      font-size: 0.74rem;
      border-radius: 999px;
      padding: 2px 8px;
      white-space: nowrap;
    }

    /* Real-Time Week Streak Widget & Live Clock */
    .week-streak-box {
      background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
      border: 1.5px solid #fed7aa;
      border-radius: var(--card-radius-md);
      padding: 11px;
    }
    .week-realtime-bar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: rgba(255, 255, 255, 0.85);
      border: 1px dashed #fdba74;
      border-radius: 8px;
      padding: 4px 8px;
      margin: 6px 0 8px;
    }
    .live-clock-badge {
      display: inline-flex;
      align-items: center;
      background: #0f172a;
      color: #38bdf8;
      padding: 2px 7px;
      border-radius: 6px;
      font-family: 'Courier New', Courier, monospace;
      font-size: 0.76rem;
      font-weight: 900;
      letter-spacing: 0.5px;
      box-shadow: 0 2px 5px rgba(15, 23, 42, 0.12);
    }
    .week-dots-row {
      display: flex;
      justify-content: space-between;
      gap: 3px;
      margin-top: 4px;
    }
    .w-dot {
      flex: 1;
      height: 42px;
      min-width: 0;
      border-radius: 8px;
      background: #ffffff;
      border: 1.5px solid #fed7aa;
      color: #78350f;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      font-size: 0.68rem;
      font-weight: 800;
      line-height: 1.1;
      transition: all 0.2s ease;
      padding: 2px 1px;
    }
    .w-dot .w-name { font-size: 0.64rem; color: #9a3412; }
    .w-dot .w-date { font-size: 0.74rem; font-weight: 900; color: #431407; }
    
    .w-dot.today {
      background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
      border-color: #ea580c;
      color: #ffffff !important;
      box-shadow: 0 3px 10px rgba(234, 88, 12, 0.4);
      transform: translateY(-2px);
    }
    .w-dot.today .w-name, .w-dot.today .w-date { color: #ffffff !important; }
    
    .w-dot.active-past {
      background: #fef08a;
      border-color: #fde047;
      color: #854d0e;
    }

    /* CỘT 2: BOSS ARENA & 8 MINI-GAMES */
    .center-column-stack {
      display: flex;
      flex-direction: column;
      gap: 14px;
      height: 100%;
    }
    .game-arcade-box {
      display: flex;
      flex-direction: column;
      flex: 1;
      height: 100%;
    }
    .boss-battle-card {
      background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%);
      border-radius: var(--card-radius-lg);
      padding: 14px 18px;
      color: #ffffff;
      box-shadow: 0 8px 24px rgba(124, 58, 237, 0.22);
    }
    .boss-arena-header {
      font-family: var(--font-brand);
      font-size: 0.82rem;
      font-weight: 800;
      color: #ffd700;
      margin-bottom: 8px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .boss-stage-grid {
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      align-items: center;
      gap: 10px;
      background: rgba(0, 0, 0, 0.25);
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 14px;
      padding: 8px 12px;
      margin-bottom: 8px;
    }
    .fighter-box { display: flex; align-items: center; gap: 8px; }
    .fighter-avatar { font-size: 2rem; line-height: 1; }
    .fighter-info .f-name { font-weight: 800; font-size: 0.82rem; color: #ffffff; line-height: 1.2; }
    .f-hp-track {
      width: 85px;
      height: 6px;
      background: rgba(0,0,0,0.4);
      border-radius: 999px;
      overflow: hidden;
      margin-top: 3px;
    }
    .f-hp-fill-boss { height: 100%; background: linear-gradient(90deg, #ef4444, #f59e0b); border-radius: 999px; }
    .f-hp-fill-player { height: 100%; background: linear-gradient(90deg, #10b981, #06b6d4); border-radius: 999px; width: 90%; }
    .vs-badge-circle {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: #ffd700;
      color: #78350f;
      font-family: var(--font-brand);
      font-weight: 900;
      font-size: 0.75rem;
      display: grid;
      place-items: center;
    }
    .btn-boss-sm {
      background: #ffffff;
      color: #4f46e5 !important;
      border-radius: 999px;
      font-weight: 900;
      font-size: 0.82rem;
      padding: 5px 16px;
      text-decoration: none;
      box-shadow: 0 4px 12px rgba(0,0,0,0.15);
      display: inline-flex;
      align-items: center;
      gap: 6px;
      white-space: nowrap;
    }

    /* LƯỚI 8 MINI-GAME ARCADE (4 CỘT X 2 HÀNG HOẶC 2 CỘT X 4 HÀNG) */
    .mini-arcade-8grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      grid-template-rows: 1fr 1fr;
      gap: 10px;
      flex: 1;
    }
    .mini-game-card {
      border-radius: var(--card-radius-lg);
      padding: 13px 8px 11px;
      color: #ffffff;
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: space-between;
      text-decoration: none;
      box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
      transition: all 0.2s ease;
      height: 100%;
    }
    .mini-game-card:hover {
      transform: translateY(-3px) scale(1.02);
      color: #ffffff;
      box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
    }
    .mini-game-card .mg-icon {
      font-size: 1.85rem;
      margin-bottom: 4px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      height: 38px;
    }
    .mini-game-card .mg-title {
      font-family: var(--font-brand);
      font-size: 0.84rem;
      font-weight: 800;
      margin-bottom: 6px;
      color: #ffffff;
      line-height: 1.2;
      min-height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .mini-game-card .mg-btn {
      background: rgba(255, 255, 255, 0.92);
      color: #0f172a;
      border-radius: 999px;
      padding: 2px 12px;
      font-size: 0.72rem;
      font-weight: 800;
      margin-top: auto;
    }
    
    /* 8 Theme màu Gradient cho 8 Trò chơi */
    .mg-sohoc     { background: linear-gradient(145deg, #1e3a8a, #3b82f6); } /* Mê cung số học - Xanh dương */
    .mg-laptrinh  { background: linear-gradient(145deg, #065f46, #10b981); } /* Mê cung lập trình - Xanh ngọc */
    .mg-toantin   { background: linear-gradient(145deg, #6b21a8, #a855f7); } /* Mê cung toán tin - Tím */
    .mg-dautruong { background: linear-gradient(145deg, #b45309, #f59e0b); } /* Đấu trường toán - Vàng cam */
    .mg-tiengviet { background: linear-gradient(145deg, #991b1b, #ef4444); } /* Vua Tiếng Việt nhí - Đỏ */
    .mg-tienganh  { background: linear-gradient(145deg, #3730a3, #6366f1); } /* Lật thẻ Tiếng Anh - Indigo */
    .mg-gophim    { background: linear-gradient(145deg, #0f766e, #14b8a6); } /* Đua xe gõ 10 ngón - Teal */
    .mg-chuot     { background: linear-gradient(145deg, #c2410c, #f97316); } /* Luyện chuột máy tính - Cam đậm */

    /* LƯỚI 6 TIỆN ÍCH DẠY HỌC & IN ẤN A4 */
    .utility-tools-grid-6 {
      display: grid;
      grid-template-columns: repeat(6, 1fr);
      gap: 12px;
    }
    .utility-tools-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
    }
    .utility-card {
      border-radius: var(--card-radius-lg);
      padding: 13px 8px 11px;
      color: #ffffff;
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-decoration: none;
      box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
      transition: all 0.2s ease;
    }
    .utility-card:hover {
      transform: translateY(-3px) scale(1.02);
      color: #ffffff;
      box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
    }
    .utility-card .ut-icon {
      font-size: 1.85rem;
      margin-bottom: 4px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      height: 38px;
    }
    .utility-card .ut-title {
      font-family: var(--font-brand);
      font-size: 0.84rem;
      font-weight: 800;
      margin-bottom: 6px;
      color: #ffffff;
      line-height: 1.2;
      min-height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .utility-card .ut-btn {
      background: rgba(255, 255, 255, 0.92);
      color: #0f172a;
      border-radius: 999px;
      padding: 2px 12px;
      font-size: 0.72rem;
      font-weight: 800;
      margin-top: auto;
    }

    /* 6 Theme màu Gradient cho 6 Tiện ích */
    .ut-vongquay   { background: linear-gradient(145deg, #d97706, #f59e0b); } /* Vòng quay gọi tên - Vàng hổ phách */
    .ut-dongho     { background: linear-gradient(145deg, #0284c7, #38bdf8); } /* Đồng hồ đếm ngược - Xanh dương sáng */
    .ut-phieubaitap{ background: linear-gradient(145deg, #e11d48, #fb7185); } /* In phiếu bài tập A4 - Đỏ hồng */
    .ut-tapviet    { background: linear-gradient(145deg, #059669, #34d399); } /* Tạo vở ô ly tập viết - Xanh ngọc lục */
    .ut-donvido    { background: linear-gradient(145deg, #7c3aed, #a78bfa); } /* Bảng đổi đơn vị đo - Tím violet */
    .ut-tuduy      { background: linear-gradient(145deg, #ea580c, #fb923c); } /* Mê cung tư duy A4 - Cam ấm */

    /* Tabs chuyển đổi Game / Tiện ích Cột giữa */
    .center-tabs-pill {
      display: inline-flex;
      background: #f1f5f9;
      border-radius: 12px;
      padding: 3px;
      gap: 3px;
    }
    .center-tab-btn {
      border: none;
      background: transparent;
      padding: 4px 10px;
      border-radius: 9px;
      font-family: var(--font-brand);
      font-size: 0.8rem;
      font-weight: 800;
      color: #64748b;
      cursor: pointer;
      transition: all 0.2s ease;
      display: inline-flex;
      align-items: center;
      white-space: nowrap;
    }
    .center-tab-btn:hover { color: #0f172a; }
    .center-tab-btn.active {
      background: #ffffff;
      color: #1d4ed8;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    }

    /* CỘT 3: LEADERBOARD */
    .leaderboard-box { display: flex; flex-direction: column; }
    .podium-stage-wrap {
      display: flex;
      align-items: flex-end;
      justify-content: center;
      gap: 8px;
      padding: 10px 0 6px;
      margin-bottom: 10px;
    }
    .podium-slot-col {
      display: flex;
      flex-direction: column;
      align-items: center;
      flex: 1;
      text-align: center;
      min-width: 0;
    }
    .p-avatar-wrap { position: relative; margin-bottom: 4px; }
    .p-avatar-img {
      width: 46px;
      height: 46px;
      border-radius: 50%;
      object-fit: cover;
      border: 2.5px solid #ffffff;
      box-shadow: 0 4px 8px rgba(0,0,0,0.12);
      background: #fff;
    }
    .p-crown-icon {
      position: absolute;
      top: -10px;
      left: 50%;
      transform: translateX(-50%);
      font-size: 1.1rem;
    }
    .p-name-text {
      font-family: var(--font-brand);
      font-weight: 800;
      font-size: 0.82rem;
      color: #0f172a;
      line-height: 1.15;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 92px;
      width: 100%;
      display: block;
      margin: 0 auto 2px;
      padding: 0 2px;
    }
    .p-exp-badge {
      font-size: 0.68rem;
      font-weight: 800;
      color: #64748b;
      margin-bottom: 3px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 92px;
    }
    .p-pillar-block {
      width: 100%;
      border-radius: 10px 10px 6px 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: var(--font-brand);
      font-size: 1.1rem;
      font-weight: 900;
      color: #ffffff;
    }
    .p-slot-1 .p-pillar-block { height: 75px; background: linear-gradient(180deg, #fbc02d 0%, #f59e0b 100%); }
    .p-slot-2 .p-pillar-block { height: 60px; background: linear-gradient(180deg, #cbd5e1 0%, #94a3b8 100%); }
    .p-slot-3 .p-pillar-block { height: 48px; background: linear-gradient(180deg, #fed7aa 0%, #ea580c 100%); }
    .p-slot-1 .p-avatar-img { width: 52px; height: 52px; border-color: #fbc02d; }

    .rank-tabs-pill {
      display: flex;
      background: #f1f5f9;
      border-radius: 12px;
      padding: 3px;
      gap: 3px;
      margin-bottom: 8px;
    }
    .rank-tab-btn-sm {
      flex: 1;
      border: none;
      background: transparent;
      padding: 5px 6px;
      border-radius: 9px;
      font-weight: 800;
      font-size: 0.76rem;
      color: #475569;
      cursor: pointer;
      transition: all 0.2s ease;
      white-space: nowrap;
    }
    .rank-tab-btn-sm.active {
      background: #ffffff;
      color: #1877f2;
      box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    }
    .rank-panel-mini {
      display: flex;
      flex-direction: column;
      gap: 5px;
      margin-bottom: 8px;
      max-height: 360px;
      overflow-y: auto;
      padding-right: 2px;
    }
    .rank-panel-mini::-webkit-scrollbar {
      width: 4px;
    }
    .rank-panel-mini::-webkit-scrollbar-thumb {
      background: #cbd5e1;
      border-radius: 4px;
    }
    .rank-item-mini {
      display: grid;
      grid-template-columns: 24px 28px 1fr auto;
      align-items: center;
      gap: 7px;
      padding: 6px 8px;
      background: #f8fbff;
      border-radius: 10px;
      font-size: 0.8rem;
      border: 1px solid #f1f5f9;
      transition: all 0.15s ease;
    }
    .rank-item-mini:hover {
      background: #f1f7ff;
      border-color: #dbeafe;
    }
    .rank-item-mini img {
      width: 26px;
      height: 26px;
      border-radius: 50%;
      object-fit: cover;
    }
    .rank-item-mini .r-name {
      font-weight: 800;
      color: #0f172a;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .rank-item-mini .r-exp {
      font-weight: 800;
      color: #1877f2;
      font-size: 0.78rem;
    }

    /* Card Xếp Hạng Lớp */
    .class-rank-card-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: #f8fbff;
      border: 1.5px solid #dbeafe;
      border-radius: 12px;
      padding: 7px 10px;
      margin-bottom: 5px;
      transition: all 0.2s ease;
    }
    .class-rank-badge {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      font-weight: 900;
      font-size: 0.74rem;
    }
    .c-rank-1 { background: #ffd700; color: #78350f; }
    .c-rank-2 { background: #e2e8f0; color: #334155; }
    .c-rank-3 { background: #ffedd5; color: #9a3412; }
    .c-rank-other { background: #f1f5f9; color: #64748b; }

    /* ===== GOOGLE ADSENSE CARD CONTAINER ===== */
    .adsense-card-container {
      background: #ffffff;
      border: 1.5px dashed #cbd5e1;
      border-radius: var(--card-radius-lg);
      padding: 10px;
      margin-bottom: 20px;
      text-align: center;
      position: relative;
    }
    .ads-label-tag {
      font-size: 0.64rem;
      font-weight: 800;
      color: #94a3b8;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 4px;
      display: block;
    }

    /* ===== 4. KHO ĐỀ KIỂM TRA (EXAM SECTION & ORIGINAL FILTER BAR) ===== */
    .exam-section-card {
      background: var(--card-white);
      border: 2px solid var(--border-soft);
      border-radius: var(--card-radius-xl);
      padding: 22px 20px;
      box-shadow: var(--shadow-card);
      margin-bottom: 20px;
    }
    .exam-head {
      display: flex;
      justify-content: space-between;
      gap: 14px;
      align-items: flex-start;
      margin-bottom: 14px;
    }
    .exam-intro {
      color: #64748b;
      line-height: 1.6;
      font-size: 0.9rem;
    }

    /* ORIGINAL FILTER BAR STYLING */
    .exam-filter-bar {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: center;
      margin-bottom: 18px;
      background: #f8fbff;
      border: 1.5px solid #deebff;
      border-radius: 16px;
      padding: 12px 16px;
    }
    .exam-filter-bar .form-select,
    .exam-filter-bar .form-control {
      font-size: 0.88rem;
      border-radius: 10px;
      border-color: #cbd5e1;
      font-weight: 700;
      color: #334155;
    }
    .exam-filter-bar .btn {
      font-size: 0.88rem;
      border-radius: 10px;
      font-weight: 800;
    }

    .exam-list-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(200px, 1fr));
      gap: 14px;
    }
    .exam-card-item {
      background: linear-gradient(180deg, #ffffff, #f8fbff);
      border: 1.5px solid #deebff;
      border-radius: 16px;
      padding: 16px;
      box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
      transition: all 0.22s ease;
      position: relative;
      display: flex;
      flex-direction: column;
    }
    .exam-card-item:hover {
      transform: translateY(-3px);
      border-color: #93c5fd;
      box-shadow: 0 12px 28px rgba(15, 23, 42, 0.10);
    }
    .exam-corner-badge {
      position: absolute;
      top: 12px;
      right: 12px;
      border-radius: 999px;
      padding: 4px 10px;
      font-size: 0.72rem;
      font-weight: 900;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      line-height: 1;
    }
    .badge-hot {
      background: linear-gradient(135deg, #ff4e1a, #ff8c42);
      color: #ffffff;
      box-shadow: 0 2px 8px rgba(255, 78, 26, 0.35);
    }
    .badge-new {
      background: linear-gradient(135deg, #10b981, #05d65d);
      color: #ffffff;
      box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
    }
    
    .exam-badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      border-radius: 999px;
      padding: 4px 10px;
      font-size: 0.76rem;
      font-weight: 800;
      margin-bottom: 8px;
      align-self: flex-start;
    }
    .exam-badge.ref { background: #edf5ff; color: #0b5cff; border: 1px solid #bfdbfe; }
    .exam-badge.official { background: #fff3cd; color: #9a6700; border: 1px solid #fde68a; }
    .exam-badge.daily { background: #f3e8ff; color: #7c3aed; border: 1px solid #e9d5ff; }
    .exam-badge.practical { background: #e0f2fe; color: #0284c7; border: 1px solid #bae6fd; }

    .exam-title {
      font-family: var(--font-brand);
      font-size: 1.05rem;
      font-weight: 800;
      color: #0f172a;
      margin-bottom: 6px;
      padding-right: 50px;
      line-height: 1.3;
    }
    .exam-desc {
      min-height: 42px;
      color: #64748b;
      font-size: 0.85rem;
      line-height: 1.45;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      margin-bottom: 8px;
    }
    .exam-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin: 8px 0 10px;
    }
    .exam-meta span {
      display: inline-flex;
      gap: 5px;
      align-items: center;
      background: #ffffff;
      border: 1px solid #e2e8f0;
      border-radius: 8px;
      padding: 4px 8px;
      font-weight: 700;
      font-size: 0.76rem;
      color: #475569;
    }
    .reward-row {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      margin-bottom: 12px;
    }
    .reward-pill {
      border-radius: 999px;
      padding: 4px 10px;
      font-weight: 900;
      font-size: 0.76rem;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }
    .reward-pill.exp {
      background: #fff7ed;
      border: 1px solid #fed7aa;
      color: #c2410c;
    }
    .reward-pill.badge {
      background: #f0fdf4;
      border: 1px solid #bbf7d0;
      color: #166534;
    }
    .btn-start-quiz {
      background: var(--orange-gradient);
      color: #ffffff !important;
      border-radius: 10px;
      font-weight: 900;
      font-size: 0.85rem;
      padding: 8px 14px;
      text-align: center;
      text-decoration: none;
      box-shadow: 0 4px 10px rgba(255, 152, 0, 0.25);
      transition: all 0.2s ease;
      display: block;
    }
    .btn-start-quiz:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 14px rgba(255, 152, 0, 0.35);
      color: #fff !important;
    }
    .exam-pager .btn {
      min-width: 36px;
      border-radius: 999px;
      font-size: 0.85rem;
      padding: 5px 12px;
      font-weight: 800;
    }

    /* ===== 5. SECTION MÔN HỌC & VIDEO HƯỚNG DẪN ===== */
    .edu-showcase-grid {
      display: grid;
      grid-template-columns: 1fr 1.35fr;
      gap: 18px;
      margin-bottom: 20px;
    }
    .edu-panel-card {
      background: var(--card-white);
      border: 2px solid var(--border-soft);
      border-radius: var(--card-radius-xl);
      padding: 20px 18px;
      box-shadow: var(--shadow-card);
    }
    .grade-program-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: #f8fbff;
      border: 1.5px solid #e2eeff;
      border-radius: 12px;
      padding: 8px 12px;
      font-weight: 800;
      color: #0f172a;
      text-decoration: none;
      margin-bottom: 8px;
      transition: all 0.2s ease;
      font-size: 0.85rem;
    }
    .grade-program-row:hover {
      background: #eff6ff;
      color: #1877f2;
      transform: translateX(4px);
    }

    .video-cards-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
    }
    .video-item-box {
      background: #ffffff;
      border: 1.5px solid #e2eeff;
      border-radius: 14px;
      padding: 8px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      transition: transform 0.2s ease;
    }
    .video-item-box:hover {
      border-color: #93c5fd;
      transform: translateY(-3px);
    }
    .video-item-box img {
      width: 100%;
      height: 90px;
      object-fit: cover;
      border-radius: 10px;
      background: #f1f5f9;
      margin-bottom: 6px;
    }
    .video-item-box h6 {
      font-weight: 800;
      font-size: 0.8rem;
      color: #0f172a;
      line-height: 1.25;
      margin-bottom: 6px;
      min-height: 30px;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    /* ===== 6. TOÁN SCRATCH AI & IN A4 ===== */
    .feature-duo-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 18px;
      margin-bottom: 20px;
    }
    .feature-card-banner {
      border-radius: var(--card-radius-xl);
      padding: 20px;
      color: #ffffff;
      box-shadow: var(--shadow-card);
    }
    .banner-scratch { background: linear-gradient(135deg, #0f4c81 0%, #1a73e8 100%); border: 2px solid rgba(255, 255, 255, 0.2); }
    .banner-a4 { background: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%); border: 2px solid rgba(255, 255, 255, 0.2); }

    /* ===== MOBILE BOTTOM DOCK BAR ===== */
    .mobile-bottom-dock {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      background: rgba(255, 255, 255, 0.98);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border-top: 1.5px solid #dbeafe;
      display: none;
      justify-content: space-around;
      align-items: center;
      padding: 6px 4px 8px;
      box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
      z-index: 1050;
    }
    .dock-tab-link {
      display: flex;
      flex-direction: column;
      align-items: center;
      color: #64748b;
      text-decoration: none;
      font-size: 0.7rem;
      font-weight: 800;
      padding: 3px 6px;
      border-radius: 10px;
      transition: all 0.2s ease;
      min-width: 58px;
    }
    .dock-tab-link i { font-size: 1.25rem; margin-bottom: 2px; }
    .dock-tab-link.active, .dock-tab-link:hover {
      color: #1877f2;
    }
    .dock-tab-link.active i {
      transform: scale(1.15);
      color: #1877f2;
    }

    /* Offcanvas Mobile Menu Grid */
    .mobile-drawer-app-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }
    .drawer-app-card {
      background: #f8fbff;
      border: 1.5px solid #dbeafe;
      border-radius: 14px;
      padding: 12px 10px;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      text-decoration: none;
      color: #0f172a;
      transition: all 0.2s ease;
    }
    .drawer-app-card:hover {
      background: #eff6ff;
      transform: translateY(-2px);
      color: #1877f2;
    }
    .drawer-app-card .d-icon {
      font-size: 1.8rem;
      margin-bottom: 6px;
    }
    .drawer-app-card .d-title {
      font-family: var(--font-brand);
      font-weight: 800;
      font-size: 0.85rem;
      line-height: 1.2;
    }

    /* ==========================================================================
       📱 RESPONSIVE ADJUSTMENTS
       ========================================================================== */
    @media (max-width: 1200px) {
      .player-hero-card { grid-template-columns: 1fr 1fr; }
      .dashboard-3col-grid { grid-template-columns: 1fr; }
      .mini-arcade-8grid { grid-template-columns: repeat(4, 1fr); }
      .utility-tools-grid-6 { grid-template-columns: repeat(3, 1fr); gap: 10px; }
      .exam-list-grid { grid-template-columns: repeat(2, 1fr); }
      .edu-showcase-grid { grid-template-columns: 1fr; }
      .feature-duo-grid { grid-template-columns: 1fr; }
    }

    @media (max-width: 768px) {
      body {
        padding-top: 64px;
        padding-bottom: 74px;
      }
      .app-container { padding: 10px 10px 30px; }
      .etan-logo-colorful { font-size: 1.75rem; }
      .mobile-bottom-dock { display: flex; }

      .top-app-bar { padding: 6px 0; }
      .btn-user-reg { padding: 5px 10px; font-size: 0.78rem; }
      .btn-user-login { padding: 5px 12px; font-size: 0.78rem; }

      .player-hero-card {
        grid-template-columns: 1fr;
        padding: 16px 14px;
        gap: 12px;
        border-radius: 20px;
      }
      .player-profile-block { gap: 12px; }
      .mascot-avatar-circle { width: 52px; height: 52px; font-size: 1.9rem; }
      .player-name-big { font-size: 1.35rem; }
      .player-progress-block { padding: 8px 12px; }
      
      .streak-coins-row-mobile {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
      }
      .streak-badge-pill, .coins-badge-pill {
        padding: 8px 10px;
        justify-content: center;
        gap: 8px;
      }
      .streak-text-top, .coin-info-num { font-size: 1.05rem; }

      /* 8 Game trên mobile: 2 cột gọn gàng */
      .mini-arcade-8grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
      }
      .mini-game-card {
        padding: 10px 6px 8px;
      }
      .mini-game-card .mg-icon { font-size: 1.6rem; height: 32px; }
      .mini-game-card .mg-title { font-size: 0.8rem; min-height: 28px; margin-bottom: 4px; }

      /* 6 Tiện ích trên mobile: 2 cột gọn gàng */
      .utility-tools-grid-6, .utility-tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
      }
      .utility-card {
        padding: 10px 6px 8px;
      }
      .utility-card .ut-icon { font-size: 1.6rem; height: 32px; }
      .utility-card .ut-title { font-size: 0.8rem; min-height: 28px; margin-bottom: 4px; }

      .boss-stage-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: center;
      }
      .fighter-box { justify-content: center; }
      .vs-badge-circle { margin: 0 auto; }
      .f-hp-track { width: 100%; max-width: 140px; margin: 3px auto 0; }

      /* Responsive cho Bộ lọc gốc */
      .exam-filter-bar {
        padding: 10px;
        gap: 8px;
      }
      .exam-filter-bar .form-select,
      .exam-filter-bar .input-group {
        width: 100% !important;
        max-width: 100% !important;
      }

      .exam-list-grid { grid-template-columns: 1fr; }
      .video-cards-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
      .video-item-box img { height: 80px; }
    }

    @media (max-width: 420px) {
      .video-cards-grid { grid-template-columns: 1fr; }
      .week-dots-row { gap: 2px; }
      .w-dot { height: 36px; }
      .w-dot .w-name { font-size: 0.58rem; }
      .w-dot .w-date { font-size: 0.68rem; }
    }

/* ==========================================================================
   📖 ETAN ABOUT & SEO INTRO SECTION
   ========================================================================== */
.etan-about-card {
  background: #ffffff;
  border-radius: var(--card-radius-xl);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.etan-about-pillar-box {
  background: #f8fafc;
  border-radius: var(--card-radius-md);
  padding: 1.25rem;
  height: 100%;
  border-left: 4px solid var(--blue-main);
  transition: all 0.2s ease;
}
.etan-about-pillar-box:hover {
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}
.etan-about-pillar-box.border-green { border-left-color: var(--green-main); }
.etan-about-pillar-box.border-orange { border-left-color: var(--orange-main); }
.etan-about-pillar-box.border-purple { border-left-color: var(--purple-main); }
