﻿/* ---- CSS VARIABLES ---- */

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


:root {
  --bg: url('../Webpic/Training/background.png');
  --surface: #ffffff;
  --surface2: #e4f1f5;
  --border: #b8d9e2;
  --accent: #107094;
  --accent2: #6bacb4;
  --warn: #dd7226;
  --gold: #9a7000;
  --red: #b83252;
  --text: #0d2d38;
  --muted: #4d8999;
  --green: #22c55e;
  /* ── Game UI shared palette ── */
  --primary: #1a6582;       /* dark teal — gradient start (panel headers, main buttons) */
  --primary2: #2e8fa8;      /* teal — gradient end */
  --accent-light: #1a8aad;  /* lighter accent — small button gradient end */
  --win: #27ae60;           /* win / TP green */
  --fire: #e67e22;          /* streak / fire orange */
  --chart-bg: #131722;      /* TradingView chart dark background */
  --buy: #157fa5;           /* buy button gradient start */
  --buy2: #10bfa7;          /* buy button gradient end */
}

/* ---- RESET ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ---- INLINE ICON IMAGES ---- */
img[src*="Webpic/icon/"] {
  display: inline-block;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* ---- BASE ---- */
body {
  background: url('Webpic/background.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Background grid */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,229,160,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,160,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ---- GLOW ORBS ---- */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
.orb-1 { width: 400px; height: 400px; background: rgba(0,229,160,0.06); top: -100px; left: -100px; }
.orb-2 { width: 300px; height: 300px; background: rgba(0,180,216,0.06); bottom: 100px; right: -50px; }

/* ---- CONTAINER ---- */
.container {
  position: relative;
  z-index: 1;
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 0px 40px 40px 40px;
}

/* ---- AUTH CONTAINER (Login / Register / Forgot Password) ---- */
.container-auth {
  position: relative;
  z-index: 1;
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 40px 40px 40px 40px;
}

/* ---- NAVBAR ---- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  margin: 0 -40px;
  background: linear-gradient(135deg, #1a6582 0%, #2e8fa8 45%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(119, 220, 232, 0.18);
  box-shadow: 0 4px 32px rgba(0,0,0,0.28);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 24px;
}

.navbar-divider {
  width: 1px;
  height: 22px;
  background: rgba(119, 220, 232, 0.22);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  font-family: 'Sarabun', sans-serif;
}
.nav-link:hover {
  color: #fff;
}
.nav-link.active {
  color: #ffffff;
}

.logo {
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.logo span { color: #ffffff; }

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

/* ---- NAVBAR RIGHT SIDE ---- */
.navbar-end {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---- HAMBURGER BUTTON (hidden on desktop) ---- */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}
.nav-hamburger:hover { background: rgba(255,255,255,0.18); }
.nav-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: rgba(255,255,255,0.9);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- SIDE DRAWER OVERLAY ---- */
.nav-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.nav-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ---- SIDE DRAWER PANEL ---- */
.nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(300px, 85vw);
  z-index: 999;
  background: linear-gradient(180deg, #0d5572 0%, #0a3442 100%);
  border-right: 1px solid rgba(119, 220, 232, 0.2);
  box-shadow: 4px 0 40px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.nav-drawer.open { transform: translateX(0); }

.nav-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(119, 220, 232, 0.15);
  flex-shrink: 0;
}
.nav-drawer-close {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.nav-drawer-close:hover { background: rgba(255,255,255,0.2); color: #fff; }

.nav-drawer-links {
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 4px;
  flex: 1;
}
.nav-drawer-link {
  display: block;
  padding: 12px 16px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  font-family: 'Sarabun', sans-serif;
  transition: background 0.18s, color 0.18s;
}
.nav-drawer-link:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav-drawer-link.active {
  background: rgba(119, 220, 232, 0.14);
  color: #fff;
  font-weight: 700;
  border-left: 3px solid var(--accent);
  padding-left: 13px;
}

.nav-drawer-footer {
  border-top: 1px solid rgba(119, 220, 232, 0.15);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}
.nav-drawer-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  background: rgba(255,255,255,0.07);
  border-radius: 10px;
  margin-bottom: 4px;
}
.nav-drawer-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(119,220,232,0.35);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.nav-drawer-uname { font-size: 14px; font-weight: 700; color: #fff; }
.nav-drawer-role  { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 2px; }

.nav-drawer-actions { display: flex; flex-direction: column; gap: 4px; }
.nav-drawer-action-link {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 14px;
  font-family: 'Sarabun', sans-serif;
  transition: background 0.18s, color 0.18s;
}
.nav-drawer-action-link:hover  { background: rgba(255,255,255,0.1); color: #fff; }
.nav-drawer-action-link.admin  { color: #77dce8; font-weight: 700; }
.nav-drawer-action-link.logout { color: rgba(220,100,100,0.85); }
.nav-drawer-action-link.logout:hover { background: rgba(220,100,100,0.12); color: #e87c7c; }
.nav-drawer-extra { padding: 4px 0; }

/* ---- USER HEADER AREA ---- */
.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}
.user-menu {
  position: relative;
}
.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0);
  padding: 5px 12px;
  font-family: 'Sarabun', sans-serif;
  font-size: 13px;
  color: var(--text);
  font-weight: 700;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.user-pill:hover {
  color: rgb(183, 228, 255);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
}
.user-pill:focus-visible {
  outline: 2px solid rgba(255,255,255,0.45);
  outline-offset: 2px;
}
.user-pill-toggle {
  cursor: pointer;
}
.user-pill-toggle.open {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.34);
}
.user-pill-toggle .user-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-pill-chevron {
  font-size: 10px;
  color: rgba(255,255,255,0.88);
  transition: transform 0.18s ease;
}
.user-pill-toggle.open .user-pill-chevron {
  transform: rotate(180deg);
}
.user-pill .user-icon { font-size: 15px; }
.user-pill .user-name { color: #ffffff; }
.user-avatar-mini {
  width: 30px; height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid rgba(119,220,232,0.4);
}
.user-avatar-initials {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), #2e8fa8);
  color: #fff; font-size: 12px; font-weight: 700; letter-spacing: -0.02em;
}
.user-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  width: min(320px, calc(100vw - 32px));
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, rgb(8 89 119 / 98%), rgba(10, 52, 66, 0.98));
  box-shadow: 0 18px 40px rgba(0,0,0,0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 80;
}
.user-menu.open .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.user-dropdown-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 12px;
}
.user-avatar-large {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.18);
  flex-shrink: 0;
}
.user-avatar-large.user-avatar-initials {
  font-size: 15px;
}
.user-dropdown-name {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}
.user-dropdown-role-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: #d9f5ff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.user-dropdown-meta {
  display: grid;
  gap: 10px;
}
.user-dropdown-row {
  display: grid;
  gap: 3px;
}
.user-dropdown-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(217, 245, 255, 0.72);
}
.user-dropdown-value {
  font-size: 13px;
  color: #ffffff;
  word-break: break-word;
}
.user-dropdown-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.user-dropdown-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.08);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}
.user-dropdown-link:hover {
  background: rgba(255,255,255,0.41%);
  border-color: rgba(255,255,255,0.24);
  transform: translateY(-1px);
}
.user-dropdown-link.logout {
    background: rgb(255 2 2 / 41%);
    border-color: rgba(255, 120, 148, 0.25);
}
.user-dropdown-link.logout:hover {
  background: rgba(184, 50, 82, 0.28);
  border-color: rgba(255, 120, 148, 0.38);
}
.btn-admin-edit {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgb(255, 161, 60);
  border: 1px solid rgba(255,160,60,0.35);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #000000;
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  white-space: nowrap;
}
.btn-admin-edit:hover {
  background: rgba(255, 161, 60, 0.756);
  border-color: rgba(255,160,60,0.6);
  transform: translateY(-1px);
}
.logout-btn {
  display: flex;
  align-items: center;
  border-radius: 20px;
  padding: 5px 16px;
  font-family: 'Sarabun', sans-serif;
  font-size: 13px;
  color: #ffffff;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.logout-btn:hover {
  background: rgba(184,50,82,0.28);
  border-color: rgba(184,50,82,0.55);
}
.login-btn {
  display: flex;
  border: #000000 10px;
  align-items: center;
  border-radius: 16px;
  padding: 5px 18px;
  font-family: 'Sarabun', sans-serif;
  background: #ffffffcc;
  font-size: 13px;
  font-weight: 600;
  color: #0d2d38;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
  align-items: center;
  justify-content: center;
}
.login-btn:hover {
  background: rgba(255, 255, 255, 0.326);
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(119,220,232,0.08);
  border: 1px solid rgba(119,220,232,0.2);
  border-radius: 20px;
  padding: 5px 14px;
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 12px;
  transition: background 0.2s, border-color 0.2s;
}
.stat-pill:hover {
  background: rgba(119,220,232,0.14);
  border-color: rgba(119,220,232,0.35);
}
.stat-pill .label { color: rgba(255,255,255,0.5); }
.stat-pill .value { color: #77dce8; font-weight: 700; }
.streak-fire { font-size: 14px; }

/* ---- HERO (main.php) ---- */
.hero {
  text-align: left;
  font-family: inherit;
  position: relative;
  padding: 48px 0 0;
  overflow: hidden;
  min-height: 360px;
}
.hero-ghost {
  position: absolute;
  top: -24px; right: -32px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 300px; line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(16,112,148,0.09);
  letter-spacing: 0.04em;
  pointer-events: none; user-select: none;
  white-space: nowrap;
  z-index: 0;
}
.hero::before {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(16,112,148,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16,112,148,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(transparent, var(--bg, #d1e8f2));
  pointer-events: none; z-index: 1;
}

/* ---- Candle Rain ---- */
#rainWrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.rain-candle {
  position: absolute;
  top: -80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: candleFall linear infinite;
  will-change: transform, opacity;
}
@keyframes candleFall {
  0%   { transform: translateY(0);                opacity: 0; }
  8%   { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateY(calc(100vh + 120px)); opacity: 0; }
}
.rc-wick {
  width: 2px;
  border-radius: 2px;
}
.rc-body {
  width: 10px;
  border-radius: 2px;
}
.hero-inner {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 0 120px;
}
.hero-left { min-width: 0; }
.hero-eyebrow {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
}
.eyebrow-line { width: 28px; height: 0.8px; background: var(--muted); }
.eyebrow-text {
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(16,112,148,0.1);
  border: 1px solid rgba(16,112,148,0.2);
  border-radius: 20px;
  padding: 3px 10px;
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent);
}
.badge-pulse {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.3; transform:scale(0.8); }
}
.hero-h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18vh;
  line-height: 1;
  letter-spacing: 0.03em;
}
.h1-line1 { display: block; color: #3186a3; text-shadow: -6px 4px 2px #2a6e854d;
  animation: heroLineIn 0.7s 0.05s cubic-bezier(0.22,1,0.36,1) both;font-weight: 700;font-size: 15vh; }
.h1-line2 {
  font-weight: 700;
  display: block;
  color: #226278;
  text-shadow: -6px 4px 2px #2a6e854d;
  animation: heroLineIn 0.7s 0.2s cubic-bezier(0.22,1,0.36,1) both;
}
.h1-line3 { display: block; color: #3186a3; text-shadow: -6px 4px 2px #2a6e854d;
  animation: heroLineIn 0.7s 0.35s cubic-bezier(0.22,1,0.36,1) both;font-weight: 700;font-size: 15vh; }
.hero-sub {
    font-size: 15px;
    color: #0f5465;
    line-height: 1.75;
    max-width: 380px;
    margin-bottom: 20px;
    font-weight: 700;
}
.hpill {
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 4px;
  border: 1px solid;
  transition: all .18s;
  cursor: default;
}
.hp-blue  { color:var(--accent); border-color:rgba(16,112,148,0.28); background:rgba(16,112,148,0.07); }
.hp-grey  { color:var(--muted);  border-color:rgba(77,137,153,0.22); background:rgba(77,137,153,0.05); }
.hpill:hover { transform: translateY(-1px); }
.hp-blue:hover { background:rgba(16,112,148,0.13); border-color:rgba(16,112,148,0.45); }
.hp-grey:hover { background:rgba(77,137,153,0.1);  border-color:rgba(77,137,153,0.35); }
.hero-card {
  height: 100%;
  width: 80%;
  background: rgb(255, 255, 255);
  border: 1px solid rgba(184,217,226,0.9);
  border-radius: 0 0 14px 14px;
  backdrop-filter: blur(14px);
  box-shadow: 0 -6px 28px rgba(16,112,148,0.1), inset 0 1px 0 rgba(255,255,255,0.8);
  margin-left: 15vh;
  padding: 20px 18px 22px;
  position: relative; overflow: hidden;
}
.hero-card::before {
  content: '';
  position: absolute; top:0; left:0; right:0; height:3px;
  background: linear-gradient(90deg, var(--accent), #2e8fa8);
  border-radius: 14px 14px 0 0;
}
.card-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.card-user-avatar {
  width: 45px; height: 45px; flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #2e8fa8);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 20px; color: #fff;
  letter-spacing: 0.05em;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  border: 2px solid rgba(119,220,232,0.25);
}
.card-user-avatar:hover {
  box-shadow: 0 0 0 3px rgba(16,112,148,0.35);
  transform: scale(1.06);
}

/* ---- HERO CARD CONTENT ---- */
.card-user-info { flex: 1; min-width: 0; }
.card-user-name {
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 25px; font-weight: 700;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-user-badge {
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent);
  margin-top: 2px;
}
.card-user-status {
  display: flex; align-items: center; gap: 5px;
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px; color: var(--muted);
  white-space: nowrap;
}
.card-user-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #27ae60;
  box-shadow: 0 0 5px rgba(39,174,96,0.6);
  animation: pulse 2s ease-in-out infinite;
}
.card-title {
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 11px; font-weight: 1000;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.card-title::before { content: ''; width:12px; height:1.5px; background: #2e8fa8; }
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 14px;
}
.stat-box {
  background: rgba(16,112,148,0.06);
  border: 1px solid rgba(16,112,148,0.14);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
}
.stat-box-label {
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted);
}
.stat-box-val {
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 24px; font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 4px;
}
.stat-box-sub {
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}
.val-streak { color: var(--accent); }
.val-wr     { color: #27ae60; }
.val-rounds { color: var(--accent); }
.val-rank   { color: var(--gold); }
.card-divider { height: 1px; background: var(--border); margin-bottom: 14px; }
.card-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 9px;
}
.card-row:last-child { margin-bottom: 0; }
.card-row-label { font-size: 14px; color: var(--muted); }
.card-row-val {
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px; font-weight: 600;
  color: var(--text);
}
.card-row-val.up   { color: var(--accent); }
.card-row-val.warn { color: #e67e22; }
.card-spark { margin-top: 14px; height: 36px; position: relative; }
.card-spark svg { width:100%; height:100%; }
.card-continue {
  display: block;
  margin: 12px 0 0;
  padding: 9px 0;
  text-align: center;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none;
  transition: background .18s, transform .18s;
}
.card-continue:hover { background: #0d8ab0; transform: translateY(-1px); }


.progress-bar-wrapper {
  margin-top: 20px;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.progress-bar {
  width: 100%;
  height: 50px;
  background: var(--surface2);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: repeating-linear-gradient(
    -55deg,
    #0e7b8e 0px,
    #0e7b8e 10px,
    #178ea3 10px,
    #178ea3 19px
  );
  background-size: 200% 100%;
  width: 0%;
  transition: width 0.7s ease;
  animation: stripe-move 0.6s linear infinite;
  position: relative;
  overflow: hidden;
}

.progress-fill::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(0deg, rgba(255,255,255,0.3), rgba(255,255,255,0.1), transparent);
  animation: water-flow 2s linear infinite;
  pointer-events: none;
}

@keyframes stripe-move {
  from { background-position: 0 0; }
  to   { background-position: 22px 0; }
}

.progress-text {
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

/* ---- AVATAR MODAL ---- */
.avatar-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  width: 92%; max-width: 400px;
  overflow: hidden;
  box-shadow: 0 28px 72px rgba(0,0,0,0.28), 0 0 0 1px rgba(119,220,232,0.12);
  transform: translateY(40px) scale(0.95);
  transition: transform 0.38s cubic-bezier(0.34,1.56,0.64,1), opacity 0.25s;
  opacity: 0;
  position: relative;
}
.modal-overlay.show .avatar-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.avatar-modal .modal-close-btn {
  position: absolute; top: 12px; right: 14px;
  width: 30px; height: 30px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  border-radius: 50%; font-size: 14px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
  z-index: 2;
}
.avatar-modal .modal-close-btn:hover { background: rgba(255,255,255,0.32); }

.avatar-modal-header {
  background: linear-gradient(135deg, #0d4f6b 0%, #1a6582 50%, #1e7a9e 100%);
  border-bottom: 1px solid rgba(119, 220, 232, 0.15);
  box-shadow: 0 4px 24px rgba(0,0,0,0.22);
  padding: 36px 24px 28px;
  display: flex; flex-direction: column; align-items: center; gap: 15px;
}

.avatar-modal-preview {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.25), rgba(255,255,255,0.08));
  display: flex; align-items: center; justify-content: center;
  overflow: visible;
  border: 3px solid rgba(255,255,255,0.55);
  font-size: 36px; font-weight: 700;
  color: #fff;
  font-family: 'Sarabun', sans-serif;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
  cursor: default;
}
.avatar-modal-preview > img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 50%;
  pointer-events: none;
}

.avatar-modal-camera {
  position: absolute;
  bottom: -2px; right: -2px;
  width: 30px; height: 30px;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  transition: transform 0.2s, background 0.2s;
  z-index: 2;
  pointer-events: auto;
}
.avatar-modal-camera:hover { transform: scale(1.15); background: #e8f6fb; }

.avatar-modal-name {
  font-family: 'Sarabun', sans-serif;
  font-size: 17px; font-weight: 700; color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.15);
  margin-top: 4px;
}
.avatar-modal-role {
  font-size: 12px; color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px; padding: 2px 10px;
}

.avatar-modal-body {
  padding: 20px 20px 12px;
  display: flex; flex-direction: column; gap: 12px;
}
.avatar-modal-body .upload-drop-area { margin: 0; }

.avatar-upload-status {
  font-size: 13px; color: var(--muted);
  min-height: 16px; text-align: center;
  background: linear-gradient(45deg, #e6ffe6e0, #d1facc91);
  border: 1px solid rgba(6,214,160,0.35);
  border-radius: 8px; padding: 10px 10px;
}

.avatar-modal-close-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 20px;
  font-size: 14px; color: var(--text);
  cursor: pointer; transition: background 0.2s;
  font-family: 'Sarabun', sans-serif;
}
.avatar-modal-close-btn:hover { background: #d0eaf2; }

.btn-danger-sm {
  background: rgb(228 42 42 / 80%);
  border: 1px solid rgba(220, 50, 50, 0.28);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.2s;
  font-family: 'Sarabun', sans-serif;
}
.btn-danger-sm:hover { background: rgba(220,50,50,0.2); }

/* ---- SECTION TITLE ---- */
.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 3px;
  background: var(--border);
}

/* ---- DIFFICULTY CARDS ---- */
.difficulty-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.diff-card {
  position: relative;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.25s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.diff-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--overlay-gradient);
  z-index: 1;
}

.diff-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--card-glow);
  opacity: 0;
  transition: opacity 0.25s;
  z-index: 2;
}

.diff-card:hover { border-color: var(--card-color); transform: translateY(-4px); box-shadow: 0 16px 48px rgba(0,0,0,0.1); }
.diff-card:hover::after { opacity: 1; }
.diff-card.active { border-color: var(--card-color); box-shadow: 0 0 0 1px var(--card-color), 0 16px 48px rgba(0,0,0,0.1); }
.diff-card.active::after { opacity: 1; }

/* ---- Level Locked diff-card ---- */
.diff-card.level-locked {
  cursor: not-allowed !important;
  filter: grayscale(0.75);
  opacity: 0.55;
  user-select: none;
}
.diff-card.level-locked:hover {
  transform: none !important;
  border-color: var(--border) !important;
  box-shadow: none !important;
}
.diff-card.level-locked:hover::after { opacity: 0 !important; }

.diff-lock-badge {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  background: rgb(10, 20, 30);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  padding: 14px 22px;
  text-align: center;
  color: #e8f4f8;
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  backdrop-filter: blur(10px);
  white-space: nowrap;
  pointer-events: none;
}
.diff-lock-badge .lock-icon {
  font-size: 24px;
  display: block;
  margin-bottom: 5px;
}

.diff-card[data-level="basic"] { 
  --card-color: #ffffff;
  --card-glow: linear-gradient(135deg, rgba(82, 231, 231, 0.6) 0%, transparent 60%);
  --overlay-gradient: linear-gradient(145deg, #349cc7 0%, #0f3a50d6 100%);
  background-image: url(Webpic/Training/Basic_Training.png);
  background-size: cover;
  background-position: center;
}
.diff-card[data-level="intermediate"] { 
  --card-color: #ffffff;
  --card-glow: linear-gradient(135deg, rgb(247 203 97 / 93%) 0%, transparent 60%);
  --overlay-gradient: linear-gradient(145deg, #f9ac5c 0%, #5b3610d6 100%);
  background-image: url(Webpic/Training/Inter_Training.png);
  background-size: cover;
  background-position: center;
}
.diff-card[data-level="advance"] { 
  --card-color: #ffffff;
  --card-glow: linear-gradient(135deg, rgb(235 71 71 / 91%) 0%, transparent 60%);
  --overlay-gradient: linear-gradient(145deg, #df3059 0%, #3e0f1add 100%);
  background-image: url(Webpic/Training/Advanced_Training.png);
  background-size: cover;
  background-position: center;
}

.diff-icon {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
  color: white;
  display: block;
  position: relative;
  z-index: 3;
}

.diff-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 55px;
  letter-spacing: 1.28px;
  color: white;
  margin-bottom: 6px;
  position: relative;
  z-index: 3;
}

.diff-desc {
  font-size: 16px;
  color: white;
  line-height: 1.5;
  margin-bottom: 16px;
  position: relative;
  z-index: 3;
}

.diff-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  position: relative;
  z-index: 3;
}
.tag {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 4px;
  background: rgba(10, 45, 68, 0.658);
  border: 1px solid rgba(255,255,255,0.08);
  color: white;
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  position: relative;
  z-index: 3;
}

.diff-level-bar {
  margin-top: 16px;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  z-index: 3;
}
.diff-level-fill {
  height: 100%;
  background: var(--card-color);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--card-color);
  position: relative;
  z-index: 3;
}

/* ---- MODE CARDS ---- */
.mode-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 30px;
}

/* ---- Backtest mode card ---- */
.mode-card {
  background: linear-gradient(135deg, #0a1e2e 0%, #0d2a3e 45%, #071929 100%);
  border-radius: 16px;
  border: 1px solid rgba(0,212,232,0.25);
  padding: 36px 32px 32px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

/* speed lines â€” always visible */
.mode-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    110deg,
    transparent 0px, transparent 22px,
    rgba(0,212,232,0.04) 22px,
    rgba(0,212,232,0.04) 23px
  );
  pointer-events: none;
  z-index: 0;
}

/* shimmer sweep on hover */
.mode-card::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 55%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.07), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
  z-index: 0;
}

.mode-card:hover {
  border-color: rgba(0,212,232,0.6);
  box-shadow: 0 0 36px rgba(0,212,232,0.2), 0 10px 40px rgba(0,0,0,0.4);
  transform: translateY(-3px);
}
.mode-card:hover::after { left: 140%; }
.mode-card:active       { transform: scale(0.98) translateY(-1px); }

/* flag â€” left teal bar */
.mode-card-flag {
  position: absolute;
  left: 0; top: 15%; height: 70%;
  width: 4px;
  border-radius: 0 3px 3px 0;
  background: #00d4e8;
  box-shadow: 0 0 12px #00d4e8;
  z-index: 2;
  transition: box-shadow 0.25s;
}
.mode-card:hover .mode-card-flag { box-shadow: 0 0 20px #00d4e8; }

/* icon */
.mode-card-icon {
  font-size: 36px;
  line-height: 1;
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease;
}
.mode-card:hover .mode-card-icon { transform: scale(1.15) translateY(-2px); }

/* label */
.mode-card-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 2;
}
.mode-card-main {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 65px;
  letter-spacing: 0.1em;
  line-height: 1;
  color: #fff;
  transition: letter-spacing 0.3s ease;
}
.mode-card:hover .mode-card-main { letter-spacing: 0.18em; }
.mode-card-sub {
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #00d4e8;
  opacity: 0.7;
}

/* desc */
.mode-card-desc {
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  line-height: 1.65;
  position: relative;
  z-index: 2;
  max-width: 500px;
}

/* chevrons */
.mode-card-chevrons {
  display: flex;
  align-items: center;
  gap: 2px;
  position: relative;
  z-index: 2;
}

/* accent â€” bottom teal line */
.mode-card-accent {
  position: absolute;
  bottom: 0; left: 20%; right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00d4e8, transparent);
  opacity: 0.5;
  transition: opacity 0.25s, left 0.3s, right 0.3s;
  z-index: 2;
}
.mode-card:hover .mode-card-accent {
  opacity: 1;
  left: 5%;
  right: 5%;
}

/* chevron colors + hover (reuse .chev) */
.mode-card-chevrons .chev {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  line-height: 1;
  color: rgba(255,255,255,0.2);
  transition: transform 0.25s ease, color 0.25s ease;
}
.mode-card-chevrons .chev:nth-child(2) { color: rgba(255,255,255,0.4); transition-delay: 0.04s; }
.mode-card-chevrons .chev:nth-child(3) { color: rgba(255,255,255,0.65); transition-delay: 0.08s; }
.mode-card:hover .mode-card-chevrons .chev              { color: rgba(0,212,232,0.45); transform: translateX(2px); }
.mode-card:hover .mode-card-chevrons .chev:nth-child(2) { color: rgba(0,212,232,0.7);  transform: translateX(4px); }
.mode-card:hover .mode-card-chevrons .chev:nth-child(3) { color: #00d4e8;              transform: translateX(6px); }

/* ---- LEADERBOARD PANEL ---- */
.lb-panel-grid-override { grid-column: 1 / -1; }
.lb-panel-soon {
  opacity: 0.7;
}

/* ── Coming-soon card ── */
.mode-card-soon {
  background: linear-gradient(135deg, #111827 0%, #1a2233 60%, #0e1520 100%);
  border-color: rgba(148,163,184,0.15);
  cursor: default;
  pointer-events: none;
}
.mode-card-soon::before {
  background: repeating-linear-gradient(
    110deg,
    transparent 0px, transparent 22px,
    rgba(148,163,184,0.03) 22px,
    rgba(148,163,184,0.03) 23px
  );
}
.mode-card-soon:hover {
  border-color: rgba(148,163,184,0.15);
  box-shadow: none;
  transform: none;
}
.mode-card-flag-soon {
  background: #64748b;
  box-shadow: 0 0 10px #64748b;
}
.mode-card-soon-badge {
  position: absolute;
  top: 16px; right: 16px;
  background: rgba(100,116,139,0.18);
  border: 1px solid rgba(100,116,139,0.35);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.06em;
  z-index: 3;
}
.mode-card-main-soon {
  color: #475569;
}
.mode-card-sub-soon {
  color: #64748b;
  opacity: 1;
}
.mode-card-desc-soon {
  color: rgba(148,163,184,0.4);
}
.mode-card-accent-soon {
  background: linear-gradient(90deg, transparent, #475569, transparent);
  opacity: 0.3;
}

.lb-panel {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, #ffffff 0%, #e8f4f8 60%, #d4ecf4 100%);
  border-color: var(--border) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 4px 20px rgba(16,112,148,0.08);
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: default;
}
.lb-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(16,112,148,0.2);
}
.lb-panel-header > span:first-child {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.lb-panel-sub {
  font-size: 10px;
  color: var(--muted);
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.lb-panel-table {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.lb-panel-row {
  display: grid;
  grid-template-columns: 28px 1fr 50px 50px 60px;
  align-items: center;
  gap: 6px;
  padding: 7px 6px;
  border-radius: 6px;
  font-size: 13px;
  transition: background 0.15s;
}
.lb-panel-row:hover:not(.lb-panel-head) {
  background: rgba(16,112,148,0.07);
}

.lb-panel-head {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  padding-bottom: 6px;
  border-radius: 0;
}
.lb-panel-head:hover { background: transparent; }
.lb-panel-head span:nth-child(1) { text-align: center; }
.lb-panel-head span:nth-child(n+3) { text-align: right; }
.lb-sort-col {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}
.lb-sort-col:hover { color: var(--accent); }
.lb-sort-col.lb-sort-active {
  color: var(--accent);
  font-weight: 700;
  position: relative;
}
.lb-sort-col.lb-sort-active::after {
  content: ' ▼';
  font-size: 8px;
  opacity: 0.7;
}

.lb-panel-row .rank {
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  text-align: center;
  color: var(--muted);
}
.lb-panel-row .lb-name {
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 7px;
}
.lb-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 1px rgba(16,112,148,0.18);
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.lb-avatar-init {
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.lb-panel-row .lb-winrate {
  text-align: right;
  color: var(--accent);
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 12px;
  font-weight: 700;
}
.lb-panel-row .lb-streak {
  text-align: right;
  color: var(--warn);
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 12px;
  font-weight: 700;
}
.lb-panel-row .lb-pnl {
  text-align: right;
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.lb-panel-row .lb-pnl.green { color: #16a34a; }
.lb-panel-row .lb-pnl.red   { color: #dc2626; }

/* Top 3 rank colors */
.lb-panel-row .rank.rank-1 { color: #b8860b; font-size: 18px; }
.lb-panel-row .rank.rank-2 { color: #808080; font-size: 18px; }
.lb-panel-row .rank.rank-3 { color: #a0522d; font-size: 17px; }

/* Logged-in user highlight */
.lb-panel-row.lb-me-row {
  background: rgba(16,112,148,0.10);
  border: 1px solid rgba(16,112,148,0.25);
  border-radius: 6px;
}
.lb-panel-row.lb-me-row:hover { background: rgba(16,112,148,0.15); }
.lb-panel-row.lb-me-row .lb-name { color: var(--accent); font-weight: 700; }

.lb-panel-loading {
  color: var(--muted);
  font-style: italic;
  font-size: 12px;
  padding: 20px 0;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════
   LEADERBOARD MODAL — shared (backtest + main)
═══════════════════════════════════════════════════════ */

.lb-modal {
  width: 80vh;
  padding: 0;
  overflow: hidden;
  gap: 0;
  height: 80vh;
}

/* ── GRADIENT HEADER ── */
.lb-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px 20px;
  background: linear-gradient(135deg, #0d4f6b 0%, #1a6582 50%, #1e7a9e 100%);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.lb-modal-title-wrap { display: flex; align-items: center; gap: 14px; }
.lb-modal-trophy { font-size: 36px; line-height: 1; filter: drop-shadow(0 0 8px rgba(255,200,0,0.5)); }
.lb-modal-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px; letter-spacing: 0.12em; color: #fff; line-height: 1;
}
.lb-modal-subtitle {
  font-size: 11px; color: rgba(255,255,255,0.55);
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase; letter-spacing: 0.12em; margin-top: 3px;
}
.lb-modal-header .hist-close-btn {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.7);
}
.lb-modal-header .hist-close-btn:hover { background: rgba(255,255,255,0.22); color: #fff; }

/* ── STATS BAR ── */
.lb-stats-bar {
  display: flex; gap: 16px; padding: 8px 22px 6px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  font-family: 'Sarabun', sans-serif; font-size: 12px;
  color: var(--muted); min-height: 30px; align-items: center;
}
.lb-stat-item b { color: var(--muted); }
.lb-stat-item + .lb-stat-item::before { content: '·'; margin-right: 16px; }
.lb-stat-rank { color: var(--accent) !important; }
.lb-stat-badge {
  margin-left: auto;
  background: rgba(200,160,0,0.15); border: 1px solid rgba(200,160,0,0.35);
  border-radius: 20px; padding: 2px 10px;
  font-size: 11px; font-weight: 700; color: #c8a800;
}

/* ── TABLE AREA ── */
.lb-modal .hist-table-wrap { max-height: 100%; border-radius: 0; border: none; }

/* ── RANK CELLS ── */
.lb-rank-cell { text-align: center; }
.lb-medal { font-size: 20px; line-height: 1; display: inline-block; }
.lb-rank-num { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; color: var(--muted); }

/* ── TOP-3 ROW HIGHLIGHTING ── */
.lb-table tbody tr.lb-rank-gold   { background: linear-gradient(90deg, rgba(200,160,0,0.12), transparent); }
.lb-table tbody tr.lb-rank-silver { background: linear-gradient(90deg, rgba(160,160,160,0.10), transparent); }
.lb-table tbody tr.lb-rank-bronze { background: linear-gradient(90deg, rgba(160,82,45,0.10), transparent); }
.lb-table tbody tr.lb-rank-gold   td { border-bottom-color: rgba(200,160,0,0.15); }
.lb-table tbody tr.lb-rank-silver td { border-bottom-color: rgba(160,160,160,0.12); }
.lb-table tbody tr.lb-rank-bronze td { border-bottom-color: rgba(160,82,45,0.12); }

/* ── USER'S OWN ROW ── */
.lb-table tbody tr.lb-me {
  background: rgba(16,112,148,0.12);
  outline: 1px solid rgba(16,112,148,0.3); outline-offset: -1px;
}
.lb-table tbody tr.lb-me td { color: var(--accent); }
.lb-table tbody tr.lb-me.lb-rank-gold { background: linear-gradient(90deg, rgba(200,160,0,0.18), rgba(16,112,148,0.10)); }

/* ── NAME CELL ── */
.lb-name-cell { font-size: 13px; color: var(--text); overflow: hidden; }
.lb-name-wrap { display: flex; align-items: center; gap: 8px; overflow: hidden; }
.lb-name-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lb-name-cell b { color: var(--accent); }
/* override 28px mini-panel avatar → 26px no-border inside full modal */
.lb-modal .lb-avatar      { width: 26px; height: 26px; border: none; box-shadow: none;}
.lb-modal .lb-avatar-init { width: 26px; height: 26px; border-radius: 50%; }

/* ── PNL CELL ── */
.lb-pnl-cell { text-align: right; padding-right: 14px !important; }
.lb-pnl-main { display: block; font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;; font-size: 13px; font-weight: 700; }
.lb-pnl-main.green { color: #27ae60; }
.lb-pnl-main.red   { color: #b83252; }
.lb-pnl-sub        { display: block; font-size: 9.5px; color: var(--muted); margin-top: 1px; }

/* ── YOU BADGE ── */
.lb-you-badge {
  display: inline-block; margin-left: 6px; padding: 1px 7px 3px;
  background: var(--accent); color: #fff;
  border-radius: 20px; font-size: 9.5px; font-weight: 700; vertical-align: middle;
}

/* ── LB SPINNER ── */
@keyframes spin { to { transform: rotate(360deg); } }
.lb-loading { vertical-align: middle; }
.lb-spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.7s linear infinite;
  margin-right: 8px; vertical-align: middle;
}

.mode-icon-wrap {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  position: relative;
  z-index: 3;
}
.mode-card[data-mode="backtest"] .mode-icon-wrap { background: rgba(0,229,160,0.1);   border-color: rgba(0,229,160,0.2); }
.mode-card[data-mode="compete"]  .mode-icon-wrap { background: rgba(255,209,102,0.1); border-color: rgba(255,209,102,0.2); }

.mode-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 50px;
  letter-spacing: 0.06em;
  color: #ffffff;
  margin-bottom: 6px;
  position: relative;
  z-index: 3;
  width: 100%;
  text-align: center;
}
.mode-name-th {
  font-size: 14px;
  color: #ffffff;
  margin-bottom: 12px;
  font-weight: 700;
  position: relative;
  z-index: 3;
  width: 100%;
  text-align: center;
}
.mode-desc {
  font-size: 13px;
  color: #ffffff;
  line-height: 1.6;
  position: relative;
  z-index: 3;
  width: 100%;
  text-align: center;
}

.mode-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #ffffff;
}
.feat-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--mode-color);
}

/* ---- WIN STREAK BADGE ---- */
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(255,209,102,0.15), rgba(255,107,53,0.1));
  border: 1px solid rgba(255,209,102,0.3);
  color: var(--gold);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  margin-top: 16px;
}

/* ---- START BUTTON ---- */
.start-section {
  text-align: center;
  margin-bottom: 20px;
}

.btn-start {
  position: relative;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 12px;
  padding: 18px 56px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}

.btn-start::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.btn-start:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,229,160,0.4); }
.btn-start:hover::before { opacity: 1; }
.btn-start:active { transform: scale(0.98); }
.btn-start:disabled { background: var(--surface2); color: var(--muted); cursor: not-allowed; box-shadow: none; transform: none; }

.btn-hint {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

/* ---- LEADERBOARD ---- */
.leaderboard-section {
  margin-bottom: 64px;
}

.lb-table {
  background: var(--surface);
  overflow: hidden;
}

.lb-row {
  display: grid;
  grid-template-columns: 48px 1fr auto auto auto;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  gap: 12px;
}
.lb-row:last-child { border-bottom: none; }
.lb-row:hover { background: rgba(255,255,255,0.02); }
.lb-row.header {
  background: var(--surface2);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.rank {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 19px;
  text-align: center;
}
.rank-1 { color: var(--gold); }
.rank-2 { color: #c0c0c0; }
.rank-3 { color: #cd7f32; }

.lb-name { font-size: 14px; font-weight: 500; }
.lb-level {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.lb-level.basic        { background: rgba(6,214,160,0.15);  color: var(--green); }
.lb-level.intermediate { background: rgb(255, 255, 255);  color: var(--accent2); }
.lb-level.advance      { background: rgba(255,107,53,0.15); color: var(--warn); }

.lb-streak {
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: var(--gold);
  font-weight: 700;
  text-align: right;
}
.lb-winrate {
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: var(--green);
  text-align: right;
}
.lb-rounds {
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: var(--muted);
  text-align: right;
}

/* Highlight logged-in user */
.lb-me-row {
  background: rgba(16,112,148,0.10);
  border-left: 3px solid var(--accent);
}
.lb-me-row .lb-name { color: var(--accent); }

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgb(25 54 73 / 74%);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.show {
  opacity: 1;
  pointer-events: all;
}

/* ---- LESSON MODAL (new design) ---- */
.lesson-modal-box {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  width: 90%;
  max-width: 520px;
  overflow: hidden;
  transform: translateY(30px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 32px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,229,160,0.08);
}
.modal-overlay.show .lesson-modal-box {
  transform: translateY(0) scale(1);
}

.lm-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 28px 28px 24px 28px;
  background: linear-gradient(135deg, rgb(87 215 255 / 27%) 0%, rgba(0, 229, 160, 0.03) 100%);
  border-bottom: 1px solid var(--border);
}
.lm-icon-wrap {
  font-size: 48px;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(0,229,160,0.3));
}
.lm-header-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lm-badge {
  display: inline-block;
  background: rgba(0,229,160,0.12);
  border: 1px solid rgba(0,229,160,0.3);
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.12em;
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  font-weight: 600;
  width: fit-content;
}
.lm-title {
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
  line-height: 1;
  align-items: center;
}
.lm-subtitle {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.lm-body {
  padding: 24px 28px;
}
.lm-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.lm-intro {
  font-size: 14px;
  color: var(--text);
  line-height: 1.75;
  background: var(--bg);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin: 0 0 20px 0;
}
.lm-points {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lm-point-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  transition: border-color 0.2s;
}
.lm-point-item:hover {
  border-color: rgba(0,229,160,0.35);
}
.lm-point-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.lm-footer {
  padding: 0 28px 28px 28px;
}
.lm-btn-start {
  width: 100%;
  font-weight: 500;
  background: linear-gradient(145deg, rgba(16, 113, 148, 0.9) 0%, rgba(2, 77, 117, 0.7) 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 20px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(0,229,160,0.25);
}
.lm-btn-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,229,160,0.4);
}

/* ---- QUIZ MODAL (original) ---- */
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  width: 90%;
  max-width: 90%;
  height: 90%;
  max-height: 90%;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}
.modal-overlay.show .modal { transform: translateY(0); }

.modal-title {
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 1.28px;
  margin-bottom: 8px;
  color: var(--accent);
}
.modal-sub { color: var(--muted); font-size: 14px; margin-bottom: 28px; }

.modal-chart {
  background: var(--bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  height: 200px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  gap: 4px;
  overflow: hidden;
  position: relative;
}

.chart-bar {
  flex: 1;
  border-radius: 3px 3px 0 0;
  transition: opacity 0.2s;
  min-width: 0;
}
.chart-bar:hover { opacity: 0.8; }

.modal-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
}
.info-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}
.info-box .ib-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
  letter-spacing: 1.28px;
  text-transform: uppercase;
}
.info-box .ib-val {
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17.6px;
  font-weight: 700;
}
.ib-val.green { color: var(--green); }
.ib-val.red   { color: var(--red); }
.ib-val.gold  { color: var(--gold); }

.modal-actions { display: flex; gap: 12px; }

.btn-modal-primary {
  flex: 1;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 19px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-modal-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,229,160,0.3); }

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border-radius: 6px;
}
.modal-close-btn:hover {
  background: var(--surface2);
  color: var(--accent);
}

/* ---- ANIMATIONS ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroLineIn {
  from { opacity: 0; transform: translateX(-48px) skewX(-6deg); }
  to   { opacity: 1; transform: translateX(0)     skewX(0deg); }
}
.hero            { animation: fadeUp 0.6s ease both; }
.difficulty-grid { animation: fadeUp 0.6s 0.1s ease both; }
.mode-grid       { animation: fadeUp 0.6s 0.2s ease both; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    padding: 0 24px;
    gap: 24px;
  }
  .hero-h1 { font-size: 15vh; }
  .h1-line1 { font-size: 12vh; }
  .h1-line3 { font-size: 12vh; }
  .hero-ghost { display: none; }
  .hero-card { width: 100%; max-width: 480px; margin: 0 auto; }
    .difficulty-grid { grid-template-columns: 1fr; }
  .mode-grid       { grid-template-columns: 1fr; }
  .header-stats    { display: none; }

  /* show hamburger, hide desktop nav links */
  .nav-hamburger   { display: flex; }
  .navbar-divider,
  .navbar-links    { display: none; }

  /* hide username text + admin btn from header (both live in drawer) */
  .header-user .user-name,
  .header-user .user-pill-chevron,
  .header-user .btn-admin-edit { display: none; }
  .user-pill { padding: 4px 6px; }

  .header-user {
    width: auto;
    justify-content: flex-end;
  }
  .user-dropdown {
    right: 0;
    width: min(320px, calc(100vw - 24px));
  }
  .hero-inner { padding: 0 16px; }
  .hero-h1    { font-size: 18vw; }
  .h1-line1 { font-size: 15vw; }
  .h1-line3 { font-size: 15vw; }

  .mode-card          { padding: 24px 20px 20px; gap: 10px; }
  .mode-card-main     { font-size: 44px; }
  .mode-card-sub      { font-size: 13px; }
  .mode-card-icon     { font-size: 28px; }
}



@media (orientation: landscape) and (max-height: 300px) {
  /* ซ่อน header ยกเว้น main และ lesson (backtest ฯลฯ) — ไม่แสดง main/lesson */
  header:not([data-nav="main"]):not([data-nav="lesson"]) { display: none; }

  header[data-nav="main"],
  header[data-nav="lesson"] {
    height: 44px;
    padding: 0 16px;
    margin: 0 -40px;
  }

  /* ซ่อนบางส่วนของ nav links (override max-width query) */
  header[data-nav="main"] .navbar-links,
  header[data-nav="lesson"] .navbar-links   { display: flex !important; }

  /* แสดง divider */
  header[data-nav="main"] .navbar-divider,
  header[data-nav="lesson"] .navbar-divider { display: block !important; }

  /* ซ่อน hamburger และ nav links */
  header[data-nav="main"] .nav-hamburger,
  header[data-nav="lesson"] .nav-hamburger  { display: none !important; }

  /* ซ่อน username/chevron/admin-btn */
  header[data-nav="main"] .user-name,
  header[data-nav="lesson"] .user-name,
  header[data-nav="main"] .user-pill-chevron,
  header[data-nav="lesson"] .user-pill-chevron,
  header[data-nav="main"] .btn-admin-edit,
  header[data-nav="lesson"] .btn-admin-edit { display: none !important; }

  /* ปรับขนาด logo */
  header[data-nav="main"] .logo img,
  header[data-nav="lesson"] .logo img       { height: 30px; }
  header[data-nav="main"] .logo,
  header[data-nav="lesson"] .logo           { font-size: 15px; }

  .mode-grid          { grid-template-columns: repeat(2, 1fr); margin-bottom: 16px; }
  .mode-card          { padding: 16px 14px; gap: 6px; }
  .mode-card-main     { font-size: 32px; }
  .mode-card-icon     { font-size: 22px; }
  .mode-card-desc     { display: none; }
}
