/* ============================================================
   AHAD ONLINE - site theme (Phase 113 W redesign, 2026)
   Original background art in CSS / SVG only (no game pictures): night gradient, slow aurora glow,
   8-point star lattice. Fonts: IBM Plex Sans Arabic (text) + Cairo (headings), Google Fonts.
   Phone first, RTL first. Old class names are kept so every page keeps working.
   ============================================================ */

/* ---------- 1) Tokens ---------- */
:root {
  --bg: #060a15;
  --bg-2: #0b1124;
  --surface: rgba(15, 21, 42, 0.72);
  --surface-2: rgba(22, 30, 60, 0.82);
  --surface-solid: #0f152b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --line-gold: rgba(226, 189, 106, 0.30);
  --gold: #d9b25c;
  --gold-hi: #f3d995;
  --gold-lo: #a67a28;
  --teal: #4fd1c5;
  --violet: #8b7cf6;
  --rose: #f47a8a;
  --text: #eef1f8;
  --text-muted: #9aa3bd;
  --text-dim: #6f7894;
  --ok: #3ddc97;
  --danger: #ff6b6b;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --ring: 0 0 0 3px rgba(217, 178, 92, 0.25);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-heading: 'Cairo', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans Arabic', 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --nav-height: 64px;
  --gutter: 16px;
  /* old names (inline styles / other pages) */
  --bg-dark: var(--bg);
  --bg-mid: var(--bg-2);
  --bg-card: var(--surface);
  --gold-dark: var(--gold-lo);
  --gold-light: var(--gold-hi);
  --glass-bg: var(--surface);
  --glass-border: var(--line-gold);
  --glass-blur: 14px;
  color-scheme: dark;
}

/* ---------- 2) Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--gold-lo) var(--bg);
  scrollbar-width: thin;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (min-width: 768px) { body { font-size: 16px; } }

body.rtl { direction: rtl; text-align: right; }
body.ltr { direction: ltr; text-align: left; }

/* Background: night gradient + aurora (fixed layer) + star lattice that fades out downwards */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}
body::before {
  background:
    radial-gradient(60vmax 45vmax at 85% -10%, rgba(217, 178, 92, 0.16), transparent 60%),
    radial-gradient(55vmax 40vmax at -10% 20%, rgba(79, 209, 197, 0.10), transparent 60%),
    radial-gradient(70vmax 50vmax at 60% 110%, rgba(139, 124, 246, 0.14), transparent 60%),
    linear-gradient(180deg, #070b18 0%, #0a0f22 45%, #060912 100%);
  animation: aurora 26s ease-in-out infinite alternate;
}
body::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%23d9b25c' stroke-width='1'%3E%3Cpath d='M48 26l6.4 15.6L70 48l-15.6 6.4L48 70l-6.4-15.6L26 48l15.6-6.4z' stroke-opacity='.22'/%3E%3Crect x='35' y='35' width='26' height='26' stroke-opacity='.12'/%3E%3Crect x='35' y='35' width='26' height='26' transform='rotate(45 48 48)' stroke-opacity='.12'/%3E%3Cpath d='M0 0l26 26M96 0L70 26M0 96l26-26M96 96L70 70M48 0v26M48 70v26M0 48h26M70 48h26' stroke-opacity='.07'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 96px 96px;
  -webkit-mask-image: radial-gradient(120% 70% at 50% 0%, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 85%);
  mask-image: radial-gradient(120% 70% at 50% 0%, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 85%);
  opacity: 0.9;
}
@keyframes aurora {
  0% { filter: hue-rotate(0deg); transform: scale(1); }
  100% { filter: hue-rotate(-18deg); transform: scale(1.06); }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.3;
  color: var(--text);
}

a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-hi); }
img, svg { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { font: inherit; }
small, .small { font-size: 0.82em; }
.text-danger { color: var(--danger); }

::selection { background: rgba(217, 178, 92, 0.35); color: #fff; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

/* old ember canvas: no longer used */
#particles-canvas { display: none; }

/* ---------- 3) Navigation ---------- */
.main-nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(6, 10, 21, 0.62);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  transition: background var(--transition), box-shadow var(--transition);
}
.main-nav.scrolled { background: rgba(6, 10, 21, 0.88); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35); }

.nav-container {
  max-width: 1180px;
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; color: var(--text); }
.nav-logo img { width: 34px; height: 34px; }
.logo-text { font-family: var(--font-heading); font-weight: 800; font-size: 1.12rem; letter-spacing: 0; color: var(--text); }
.nav-social { display: none !important; }

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a, .nav-links .nav-logout {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover, .nav-links a.active, .nav-links .nav-logout:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav-links a.nav-reserve {
  color: #1a1306;
  background: linear-gradient(135deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
  font-weight: 700;
  margin-inline-start: 6px;
}
.nav-links a.nav-reserve:hover { color: #1a1306; filter: brightness(1.08); }
.lang-switch { border: 1px solid var(--line-strong); }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.nav-toggle span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--text); transition: transform var(--transition), opacity var(--transition); }
.nav-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px var(--gutter) 18px;
    background: rgba(6, 10, 21, 0.97);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  }
  .nav-links.active { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-links a, .nav-links .nav-logout { height: 44px; width: 100%; padding: 0 14px; border-radius: 12px; font-size: 0.98rem; }
  .nav-links li form { width: 100%; }
  .nav-links a.nav-reserve { margin: 4px 0 0; justify-content: center; }
}

/* ---------- 4) Layout ---------- */
.main-content { position: relative; z-index: 1; padding-top: var(--nav-height); }
section { position: relative; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 var(--gutter); }

.section-title {
  text-align: center;
  font-size: clamp(1.45rem, 4.6vw, 2.1rem);
  margin-bottom: 10px;
  color: var(--text);
}
.section-title::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  margin: 12px auto 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--teal), var(--gold));
}
.section-subtitle, .section-lead {
  text-align: center;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 28px;
  font-size: 0.95rem;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-gold);
  background: rgba(217, 178, 92, 0.08);
  color: var(--gold-hi);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  direction: ltr;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); }

/* ---------- 5) Hero ---------- */
.hero {
  min-height: min(calc(100svh - var(--nav-height)), 820px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 36px var(--gutter) 48px;
  overflow: hidden;
}
.hero-art {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(820px, 150vw);
  aspect-ratio: 1;
  transform: translate(-50%, -54%);
  pointer-events: none;
  opacity: 0.55;
  z-index: 0;
}
.hero-art .spin { transform-origin: 50% 50%; animation: spin 160s linear infinite; }
.hero-art .spin-rev { transform-origin: 50% 50%; animation: spin 220s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero-content { position: relative; z-index: 1; width: 100%; max-width: 760px; }
.hero-title {
  margin: 18px 0 6px;
  font-size: clamp(2.6rem, 12vw, 5.2rem);
  font-weight: 900;
  line-height: 1.15;
  background: linear-gradient(180deg, #fff6dc 0%, var(--gold-hi) 38%, var(--gold) 70%, var(--gold-lo) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 8px 30px rgba(217, 178, 92, 0.25));
}
.hero-subtitle { color: var(--text-muted); font-size: clamp(0.98rem, 3.6vw, 1.18rem); max-width: 520px; margin: 0 auto 26px; }

/* Countdown (data-target + ids unchanged; only the look is new) */
.countdown-wrap { margin: 0 auto 24px; max-width: 460px; }
.countdown-label { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 10px; letter-spacing: 0.02em; }
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.time-unit {
  position: relative;
  padding: 12px 4px 8px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.time-unit::after {
  content: "";
  position: absolute;
  inset-inline: 22%;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.time-value {
  display: block;
  font-family: 'IBM Plex Sans Arabic', var(--font-heading);
  font-size: clamp(1.6rem, 7.5vw, 2.3rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.time-label { display: block; margin-top: 4px; font-size: 0.72rem; color: var(--text-muted); }

/* Hero buttons */
.hero-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 4px; }
.hero-buttons > * { flex: 1 1 140px; max-width: 220px; }
.hero-buttons > .btn-reserve { flex-basis: 100%; max-width: 452px; min-height: 50px; font-size: 1.05rem; }
.reserve-note { margin-top: 14px; font-size: 0.85rem; color: var(--text-muted); }
.reserve-note strong { color: var(--ok); font-weight: 600; }

/* ---------- 6) Buttons ---------- */
.btn, .btn-primary, .btn-secondary, .btn-danger, .btn-reserve {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition), color var(--transition), filter var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.btn:active, .btn-primary:active, .btn-secondary:active, .btn-reserve:active { transform: translateY(1px) scale(0.99); }
.btn-primary, .btn-reserve {
  color: #1a1306;
  background: linear-gradient(135deg, var(--gold-hi) 0%, var(--gold) 50%, var(--gold-lo) 100%);
  box-shadow: 0 8px 24px rgba(217, 178, 92, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-primary:hover, .btn-reserve:hover { color: #1a1306; filter: brightness(1.07); box-shadow: 0 10px 30px rgba(217, 178, 92, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.btn-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line-strong);
}
.btn-secondary:hover { color: var(--text); background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.24); }
.btn-danger { color: #fff; background: linear-gradient(135deg, #e5484d, #b4232a); }
.btn-danger:hover { color: #fff; filter: brightness(1.08); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 0.85rem; border-radius: 10px; }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn-primary[disabled], .btn-reserve[disabled] { opacity: 0.6; cursor: default; filter: none; }

.btn-reserve { position: relative; overflow: hidden; }
.btn-reserve::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: sheen 3.6s ease-in-out infinite;
}
@keyframes sheen { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.btn-reserve.is-reserved {
  color: var(--ok);
  background: rgba(61, 220, 151, 0.1);
  border-color: rgba(61, 220, 151, 0.45);
  box-shadow: none;
  cursor: default;
}
.btn-reserve.is-reserved::before { display: none; }
.btn-reserve.is-reserved:hover { color: var(--ok); filter: none; }

/* ---------- 7) Cards / panels ---------- */
.panel, .form-card, .legal-card, .contact-card, .rankings-card, .account-card, .package-card, .platform-card, .news-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow);
}

.band { padding: 56px var(--gutter); }
@media (min-width: 768px) { .band { padding: 80px var(--gutter); } }
.band-inner { max-width: 1100px; margin: 0 auto; }

/* Reserve band: count + milestones + gift pack */
.prereg-grid { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 26px; }
@media (min-width: 860px) { .prereg-grid { grid-template-columns: 1fr 1.35fr; } }
.prereg-counter, .prereg-gifts { padding: 22px 20px; text-align: center; }
.prereg-counter h3, .prereg-gifts h3 { font-size: 1rem; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }
.counter-number, .prereg-count {
  font-family: 'IBM Plex Sans Arabic', var(--font-heading);
  font-size: clamp(2.4rem, 10vw, 3.4rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--gold-hi);
  font-variant-numeric: tabular-nums;
}
.prereg-label { color: var(--text-muted); font-size: 0.9rem; }

.milestone-bar {
  position: relative;
  height: 8px;
  margin: 26px 8px 34px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
}
.milestone-progress, .milestone-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-start: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  box-shadow: 0 0 14px rgba(217, 178, 92, 0.45);
}
.milestone-marker {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px -7px 0;
  transform: rotate(45deg);
  border-radius: 3px;
  background: var(--surface-solid);
  border: 2px solid var(--text-dim);
}
.milestone-marker.reached { background: var(--gold); border-color: var(--gold-hi); box-shadow: 0 0 12px rgba(217, 178, 92, 0.6); }
.milestone-count {
  position: absolute;
  top: 16px;
  left: 16px;
  transform: rotate(-45deg);
  transform-origin: 0 0;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.milestone-marker-label { font-size: 0.7rem; color: var(--text-muted); }

.gift-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 14px; text-align: start; }
@media (min-width: 560px) { .gift-list { grid-template-columns: repeat(3, 1fr); } }
.gift-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  font-size: 0.84rem;
  line-height: 1.4;
}
.gift-list li::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  transform: rotate(45deg);
  border-radius: 2px;
  background: linear-gradient(135deg, var(--gold-hi), var(--gold-lo));
}
.gift-note { margin-top: 12px; font-size: 0.82rem; color: var(--text-muted); }
.gift-soon { color: var(--gold-hi); font-weight: 600; margin-top: 8px; }

/* Steps */
.steps { display: grid; gap: 10px; grid-template-columns: 1fr; margin-top: 14px; counter-reset: step; }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-align: start; }
.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  margin-bottom: 8px;
  font-weight: 700;
  color: #1a1306;
  background: linear-gradient(135deg, var(--gold-hi), var(--gold));
}
.step h4 { font-size: 0.98rem; margin-bottom: 2px; }
.step p { font-size: 0.86rem; color: var(--text-muted); }

/* ---------- 8) Classes ---------- */
.classes-section, .features-section, .news-preview, .faq-section { padding: 56px var(--gutter); }
@media (min-width: 768px) { .classes-section, .features-section, .news-preview, .faq-section { padding: 76px var(--gutter); } }
.classes-grid { max-width: 1100px; margin: 26px auto 0; display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .classes-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.class-card {
  position: relative;
  padding: 18px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition);
}
.class-card::after {
  content: "";
  position: absolute;
  inset-inline-end: -40px;
  top: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent, rgba(217, 178, 92, 0.22)), transparent 70%);
  pointer-events: none;
}
.class-card:hover { transform: translateY(-3px); border-color: var(--line-gold); }
.class-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 12px;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  color: var(--gold-hi);
  background: rgba(217, 178, 92, 0.1);
  border: 1px solid var(--line-gold);
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
}
.class-title { font-size: 1.05rem; margin-bottom: 4px; color: var(--text); }
.class-desc { font-size: 0.84rem; color: var(--text-muted); line-height: 1.65; }
@media (max-width: 420px) { .class-card { padding: 14px 12px; } .class-desc { font-size: 0.8rem; } }

/* ---------- 9) Features ---------- */
.features-grid { max-width: 1100px; margin: 26px auto 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.feature-item, .feature-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color var(--transition), transform var(--transition);
}
.feature-item:hover, .feature-card:hover { border-color: var(--line-gold); transform: translateY(-2px); }
.feature-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: var(--teal);
  background: rgba(79, 209, 197, 0.08);
  border: 1px solid rgba(79, 209, 197, 0.25);
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-title { font-size: 1rem; margin-bottom: 2px; }
.feature-desc { font-size: 0.86rem; color: var(--text-muted); line-height: 1.65; }

/* ---------- 10) News ---------- */
.news-grid, .news-preview-grid, .news-list-grid { max-width: 1100px; margin: 26px auto 0; display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .news-grid, .news-preview-grid, .news-list-grid { grid-template-columns: repeat(2, 1fr); } }
.news-card { padding: 18px; overflow: hidden; transition: border-color var(--transition), transform var(--transition); }
.news-card:hover { border-color: var(--line-gold); transform: translateY(-2px); }
.news-card h3 { font-size: 1.05rem; margin: 6px 0 4px; }
.news-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 12px; }
.news-category, .category-badge, .badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--teal);
  background: rgba(79, 209, 197, 0.1);
  border: 1px solid rgba(79, 209, 197, 0.25);
}
.news-date, .news-card-date { font-size: 0.8rem; color: var(--text-dim) !important; }
.news-detail { max-width: 820px; margin: 0 auto; }
.news-detail-content p, .article-body p { margin-bottom: 1em; }
.article-body { line-height: 1.9; }

/* ---------- 11) FAQ ---------- */
.faq-section { max-width: 780px; margin: 0 auto; }
.faq-section .section-title { margin-bottom: 22px; }
.faq-item {
  margin-top: 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item.active { border-color: var(--line-gold); }
.faq-question {
  position: relative;
  padding: 14px 16px;
  padding-inline-end: 46px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
}
.faq-question::after {
  content: "";
  position: absolute;
  inset-inline-end: 18px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -6px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
  transition: transform var(--transition), margin var(--transition);
}
.faq-item.active .faq-question::after { transform: rotate(-135deg); margin-top: -1px; }
.faq-answer { max-height: 0; overflow: hidden; padding: 0 16px; color: var(--text-muted); font-size: 0.9rem; transition: max-height 0.35s ease, padding 0.35s ease; }
.faq-item.active .faq-answer { max-height: 400px; padding: 0 16px 16px; }

/* ---------- 12) Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 40px;
  padding: 34px var(--gutter) calc(26px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(5, 8, 17, 0.7);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer-container { max-width: 1100px; margin: 0 auto; }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--font-heading); font-weight: 800; color: var(--text); font-size: 1.05rem; }
.footer-brand img { width: 30px; height: 30px; }
.footer-legal-links { margin: 14px 0; display: flex; justify-content: center; gap: 6px 18px; flex-wrap: wrap; font-size: 0.88rem; }
.footer-legal-links a { color: var(--text-muted); }
.footer-legal-links a:hover { color: var(--text); }
.footer-links, .footer-social { display: flex; justify-content: center; gap: 10px; margin: 14px 0; }
.footer-links a, .footer-social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: var(--text-muted);
  transition: color var(--transition), border-color var(--transition);
}
.footer-links a svg { width: 18px; height: 18px; }
.footer-links a:hover, .footer-social a:hover { color: var(--gold); border-color: var(--line-gold); }
.footer-support a { color: var(--teal); word-break: break-all; }
.footer-copy, .footer-copyright { margin-top: 8px; font-size: 0.8rem; color: var(--text-dim); }

/* ---------- 13) Forms (compact, elegant) ---------- */
.form-page {
  min-height: calc(100svh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px var(--gutter) 48px;
}
.form-card { width: 100%; max-width: 380px; padding: 26px 22px; }
.form-card:has(.register-form) { max-width: 460px; }
.form-header { text-align: center; margin-bottom: 18px; }
.form-header::before {
  content: "";
  display: block;
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  background: url("/img/brand/emblem.svg") center/contain no-repeat;
}
.form-title, .form-card h2 { font-size: 1.3rem; color: var(--text); margin-bottom: 4px; }
.form-subtitle { font-size: 0.84rem; color: var(--text-muted); line-height: 1.6; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; margin-bottom: 5px; font-size: 0.8rem; font-weight: 500; color: var(--text-muted); }
.form-group input, .form-group select, .form-group textarea, .field {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: rgba(3, 6, 14, 0.55);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.92rem;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.form-group textarea { height: auto; min-height: 110px; padding: 10px 12px; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus, .field:focus { outline: none; border-color: var(--gold); box-shadow: var(--ring); background: rgba(3, 6, 14, 0.75); }
.form-group input::placeholder, .form-group textarea::placeholder, .field::placeholder { color: var(--text-dim); }
.form-hint { display: block; margin-top: 4px; font-size: 0.74rem; color: var(--text-dim); }
.form-row { gap: 10px !important; }
@media (max-width: 400px) { .form-row { grid-template-columns: 1fr !important; } }
.form-actions { margin-top: 18px !important; }
.form-footer { margin-top: 16px !important; font-size: 0.86rem; color: var(--text-muted); }
.form-error { color: var(--danger); font-size: 0.82rem; margin-top: 4px; }
.form-success { color: var(--ok); }
.captcha-group input { max-width: 160px; }
.captcha-group label strong { color: var(--gold-hi) !important; }

/* ---------- 14) Alerts ---------- */
.alert, .flash {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 14px;
  margin-bottom: 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.6;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}
.alert-success { border-color: rgba(61, 220, 151, 0.4); background: rgba(61, 220, 151, 0.08); color: #c9f7e2; }
.alert-error, .flash.bad { border-color: rgba(255, 107, 107, 0.4); background: rgba(255, 107, 107, 0.08); color: #ffd1d1; }
.alert-info { border-color: rgba(79, 209, 197, 0.4); background: rgba(79, 209, 197, 0.08); color: #cdf5f1; }

/* ---------- 15) Inner pages ---------- */
.account-page, .download-page, .rankings-page, .topup-page, .legal-page, .contact-page, .news-list-page, .news-detail-page, .news-list {
  padding: 32px var(--gutter) 56px;
}
.account-page h2 { color: var(--text); }
.account-info-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.account-info-card { padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.account-info-card h3 { font-size: 0.9rem; color: var(--text-muted); }
.legal-card, .contact-card { padding: 24px 20px; }
.legal-content h2, .legal-content h3 { margin: 1.2em 0 0.4em; font-size: 1.1rem; color: var(--gold-hi); }
.legal-content p, .legal-content li { color: var(--text-muted); margin-bottom: 0.6em; }
.legal-content ul { list-style: disc; padding-inline-start: 1.2em; }
.download-platforms { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.platform-card { padding: 22px 18px; text-align: center; transition: border-color var(--transition), transform var(--transition); }
.platform-card:hover { border-color: var(--line-gold); transform: translateY(-2px); }
.package-card { transition: border-color var(--transition), transform var(--transition); }
.package-card:hover { border-color: var(--line-gold); transform: translateY(-2px); }

.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
.rankings-table, .character-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.rankings-table th, .character-table th {
  padding: 11px 12px;
  text-align: start;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.rankings-table td, .character-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rankings-table tr:hover td, .character-table tr:hover td { background: rgba(255, 255, 255, 0.03); }
.rank-badge { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 8px; font-weight: 700; font-size: 0.85rem; }
.rank-badge.gold { color: #1a1306; background: linear-gradient(135deg, var(--gold-hi), var(--gold)); }
.rank-badge.silver { color: #11141c; background: linear-gradient(135deg, #f0f3f8, #a9b1c2); }
.rank-badge.bronze { color: #1b0f05; background: linear-gradient(135deg, #f0b27a, #a8653a); }
.rank-badge.normal { color: var(--text-muted); background: rgba(255, 255, 255, 0.06); }

/* ---------- 16) Reserve window (Phase 113 W) ---------- */
.rsv-dialog {
  width: min(360px, calc(100vw - 2 * var(--gutter)));
  max-width: none;
  margin: auto;
  padding: 0;
  border: 1px solid var(--line-gold);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(20, 27, 54, 0.98), rgba(10, 14, 30, 0.98));
  color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.rsv-dialog::backdrop { background: rgba(3, 5, 12, 0.72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.rsv-dialog[open] { animation: pop 0.22s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
.rsv-body { padding: 20px 18px 18px; }
.rsv-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.rsv-head img { width: 34px; height: 34px; flex: none; }
.rsv-head h2 { font-size: 1.08rem; line-height: 1.3; }
.rsv-head p { font-size: 0.76rem; color: var(--text-muted); line-height: 1.4; }
.rsv-close {
  margin-inline-start: auto;
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.rsv-close:hover { color: var(--text); }
.rsv-step[hidden] { display: none; }
.rsv-msg { font-size: 0.82rem; margin-bottom: 10px; padding: 8px 10px; border-radius: 10px; }
.rsv-msg:empty { display: none; }
.rsv-msg.err { color: #ffd1d1; background: rgba(255, 107, 107, 0.1); border: 1px solid rgba(255, 107, 107, 0.3); }
.rsv-msg.info { color: #cdf5f1; background: rgba(79, 209, 197, 0.08); border: 1px solid rgba(79, 209, 197, 0.28); }
.form-group input.rsv-code {
  height: 50px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.45em;
  direction: ltr;
  font-variant-numeric: tabular-nums;
}
.rsv-links { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; font-size: 0.8rem; }
.rsv-links button { background: none; border: 0; color: var(--gold); cursor: pointer; padding: 0; font-size: inherit; }
.rsv-done { text-align: center; padding: 8px 0 4px; }
.rsv-done .seal {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  color: var(--ok);
  background: rgba(61, 220, 151, 0.12);
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
}
.rsv-done .seal svg { width: 30px; height: 30px; }
.rsv-done h3 { font-size: 1.3rem; color: var(--ok); }
.rsv-done p { font-size: 0.85rem; color: var(--text-muted); margin-top: 6px; }

/* ---------- 17) Motion ---------- */
.fade-in-up { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in-up.visible { opacity: 1; transform: none; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.anim-float { animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .fade-in-up { opacity: 1; transform: none; }
}

/* ---------- 18) Utilities ---------- */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a3150; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-lo); }
