@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=Dancing+Script:wght@700&family=Noto+Serif+Display:ital,wght@0,700;0,800;1,700;1,800&display=swap');

:root {
  /* Default Theme: Hỏa Phong Nguyệt Dạ (Maple Crimson & Royal Gold — Dịu mắt) */
  --bg-deep: #0d1018;
  --bg-hero-url: url('../bg/hero_maple_moon.jpg');
  --nav-bg: rgba(14, 13, 20, 0.80);
  --nav-border: rgba(235, 175, 100, 0.22);

  --card-bg: rgba(24, 20, 29, 0.74);
  --card-bg-solid: rgba(26, 21, 31, 0.92);
  --card-inner-bg: rgba(255, 255, 255, 0.055);
  --card-inner-hover: rgba(255, 255, 255, 0.09);
  --card-border: rgba(242, 188, 108, 0.48);
  --card-glow: rgba(235, 130, 62, 0.28);

  --input-bg: rgba(15, 13, 22, 0.62);
  --input-border: rgba(255, 232, 205, 0.16);
  --input-focus-border: rgba(245, 189, 106, 0.78);
  --input-focus-glow: rgba(236, 132, 65, 0.25);

  --text-primary: #f9f3eb;
  --text-secondary: #cfc5bc;
  --text-muted: #9a8f88;

  --gold-light: #fff0c2;
  --gold-main: #f3c46b;
  --gold-deep: #c98a35;

  --accent-start: #d86b28;
  --accent-mid: #b93125;
  --accent-end: #8e1c22;
  --accent-rim: #ffcf87;
  --accent-glow: rgba(226, 92, 46, 0.46);
  --splash-aura: rgba(196, 38, 32, 0.72);

  --hex-top: rgba(158, 42, 32, 0.88);
  --hex-bottom: rgba(74, 19, 20, 0.92);
  --hex-stroke: #f0be67;

  --ribbon-left: rgba(110, 25, 22, 0.90);
  --ribbon-center: rgba(164, 46, 32, 0.94);
  --scene-overlay: linear-gradient(
    90deg,
    rgba(10, 12, 20, 0.24) 0%,
    rgba(10, 12, 20, 0.10) 42%,
    rgba(11, 13, 22, 0.56) 68%,
    rgba(10, 12, 20, 0.74) 100%
  );
  --section-bg: linear-gradient(180deg, #0e121b 0%, #141824 50%, #0d1018 100%);
}

/* Second Palette: Ngọc Bích Thiên Sơn (Đồng bộ UI trong game JX2) */
[data-palette="jade"] {
  --bg-deep: #0b141a;
  --bg-hero-url: url('../bg/hero_jade_moon.jpg');
  --nav-bg: rgba(11, 20, 26, 0.80);
  --nav-border: rgba(124, 222, 188, 0.24);

  --card-bg: rgba(15, 26, 33, 0.75);
  --card-bg-solid: rgba(16, 28, 36, 0.92);
  --card-border: rgba(224, 190, 118, 0.48);
  --card-glow: rgba(72, 189, 152, 0.26);

  --input-bg: rgba(10, 19, 25, 0.65);
  --input-focus-border: rgba(114, 224, 186, 0.78);
  --input-focus-glow: rgba(72, 189, 152, 0.25);

  --accent-start: #3ca985;
  --accent-mid: #237d64;
  --accent-end: #175849;
  --accent-rim: #aef5da;
  --accent-glow: rgba(62, 186, 147, 0.44);
  --splash-aura: rgba(34, 138, 108, 0.68);

  --hex-top: rgba(33, 112, 92, 0.88);
  --hex-bottom: rgba(16, 56, 49, 0.92);
  --hex-stroke: #e8c476;

  --ribbon-left: rgba(18, 66, 57, 0.90);
  --ribbon-center: rgba(34, 112, 92, 0.94);
  --section-bg: linear-gradient(180deg, #0b141a 0%, #101f28 50%, #0a1218 100%);
}

/* Soothing Light Mode ("Sáng" toggle switch on top-right) */
[data-mode="light"] {
  --nav-bg: rgba(247, 241, 230, 0.86);
  --nav-border: rgba(180, 132, 62, 0.28);

  --card-bg: rgba(250, 245, 236, 0.84);
  --card-bg-solid: rgba(250, 245, 236, 0.95);
  --card-inner-bg: rgba(145, 104, 52, 0.07);
  --card-inner-hover: rgba(145, 104, 52, 0.13);
  --card-border: rgba(188, 134, 56, 0.55);
  --card-glow: rgba(204, 142, 62, 0.22);

  --input-bg: rgba(255, 252, 246, 0.88);
  --input-border: rgba(140, 104, 58, 0.26);
  --input-focus-border: rgba(186, 112, 38, 0.82);

  --text-primary: #261e18;
  --text-secondary: #54463a;
  --text-muted: #7d6d5f;

  --scene-overlay: linear-gradient(
    90deg,
    rgba(24, 18, 15, 0.18) 0%,
    rgba(24, 18, 15, 0.08) 45%,
    rgba(245, 238, 225, 0.34) 72%,
    rgba(245, 238, 225, 0.52) 100%
  );
  --section-bg: linear-gradient(180deg, #f3ede1 0%, #ebe2d1 50%, #f4efe4 100%);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input {
  font-family: inherit;
}

/* =========================================================
   FULL-SCREEN PARTICLE CANVAS (FALLING LEAVES & EMBERS)
   ========================================================= */
#fx-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 25;
}

/* =========================================================
   TOP TRANSLUCENT NAVBAR (MATCHES REFERENCE STYLE)
   ========================================================= */
.top-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 66px;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--nav-border);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.32);
  transition: background 0.35s ease, border-color 0.35s ease;
}

.nav-container {
  max-width: 1480px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  white-space: nowrap;
}

.brand-mini-emblem {
  position: relative;
  padding: 4px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.brand-mini-emblem::before {
  content: '';
  position: absolute;
  inset: 2px;
  background: radial-gradient(circle, var(--splash-aura) 0%, transparent 72%);
  filter: blur(6px);
  z-index: -1;
}

.brand-mini-script {
  font-family: 'Dancing Script', cursive;
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(180deg, #fff6d6 0%, #f5c469 52%, #c97f28 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.75));
  letter-spacing: 0.3px;
}

.brand-divider {
  width: 1px;
  height: 28px;
  background: linear-gradient(180deg, transparent, rgba(235, 188, 112, 0.45), transparent);
}

.brand-domain-info {
  display: flex;
  flex-direction: column;
}

.brand-domain {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.2px;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* Center Menu */
.nav-links {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 2px;
  flex-shrink: 0;
}

.nav-item {
  position: relative;
  height: 100%;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-secondary);
  transition: color 0.25s ease;
}

.nav-item svg {
  width: 16px;
  height: 16px;
  opacity: 0.85;
  transition: transform 0.25s ease, color 0.25s ease;
}

.nav-item:hover {
  color: var(--gold-main);
}

.nav-item:hover svg {
  transform: translateY(-1px);
  color: var(--gold-main);
}

.nav-item.active {
  color: var(--gold-light);
  background: linear-gradient(180deg, transparent 25%, rgba(226, 116, 48, 0.20) 100%);
}

[data-palette="jade"] .nav-item.active {
  background: linear-gradient(180deg, transparent 25%, rgba(56, 178, 140, 0.22) 100%);
}

[data-mode="light"] .nav-item.active {
  color: #9e4516;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, transparent, var(--gold-main), var(--accent-rim), var(--gold-main), transparent);
  box-shadow: 0 -2px 12px var(--accent-glow);
}

/* Right Action Buttons & Theme Switches */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-nav-outline {
  padding: 6px 13px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(235, 188, 112, 0.36);
  transition: all 0.25s ease;
  cursor: pointer;
}

.btn-nav-outline:hover {
  border-color: var(--gold-main);
  background: rgba(243, 196, 107, 0.12);
  box-shadow: 0 0 14px rgba(243, 196, 107, 0.2);
}

.btn-nav-glow {
  position: relative;
  padding: 6px 14px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  color: #fff9ef;
  background: linear-gradient(135deg, var(--accent-start) 0%, var(--accent-mid) 55%, var(--accent-end) 100%);
  border: 1px solid var(--accent-rim);
  box-shadow: 0 3px 14px var(--accent-glow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  cursor: pointer;
  overflow: hidden;
}

.btn-nav-glow:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 20px var(--accent-glow);
}

/* Palette Switch Pill */
.palette-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-main);
  background: rgba(243, 196, 107, 0.09);
  border: 1px solid rgba(243, 196, 107, 0.3);
  cursor: pointer;
  transition: all 0.25s ease;
}

[data-mode="light"] .palette-pill {
  color: #8f5419;
  background: rgba(186, 122, 42, 0.12);
}

.palette-pill:hover {
  background: rgba(243, 196, 107, 0.18);
  transform: translateY(-1px);
}

.palette-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-start), var(--gold-main));
  box-shadow: 0 0 8px var(--accent-glow);
}

/* Light/Dark Toggle Switch (Exact match to top-right "🌙 [● ] Sáng" in reference) */
.mode-switch-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 4px;
  cursor: pointer;
  user-select: none;
}

.mode-icon-moon {
  width: 15px;
  height: 15px;
  color: var(--text-secondary);
}

.mode-track {
  position: relative;
  width: 40px;
  height: 21px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-mode="light"] .mode-track {
  background: linear-gradient(90deg, #e29b3e, #c86d28);
  border-color: #f3c46b;
}

.mode-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff8eb;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.45);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-mode="light"] .mode-thumb {
  transform: translateX(19px);
}

.mode-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* =========================================================
   HERO STAGE (100VH FULL-BLEED WUXIA SCENE + PARALLAX)
   ========================================================= */
.hero-stage {
  position: relative;
  min-height: 100vh;
  padding: 96px 28px 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg-layer {
  position: absolute;
  inset: -28px;
  background-image: url('../bg/hero_maple_moon.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  transform: translate3d(var(--px-bg, 0px), var(--py-bg, 0px), 0) scale(1.04);
  transition: background-image 0.45s ease, filter 0.4s ease;
  z-index: 1;
}

[data-palette="jade"] .hero-bg-layer {
  background-image: url('../bg/hero_jade_moon.jpg');
}

[data-mode="light"] .hero-bg-layer {
  filter: brightness(1.06) saturate(0.95);
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background: var(--scene-overlay);
  z-index: 2;
  pointer-events: none;
}

/* Ambient Moon & Waterfall Mist Pulse */
.hero-ambient-glow {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(circle at 48% 18%, rgba(255, 243, 212, 0.16) 0%, transparent 32%),
    radial-gradient(circle at 26% 64%, var(--accent-glow) 0%, transparent 38%);
  animation: ambientBreath 6s ease-in-out infinite alternate;
}

@keyframes ambientBreath {
  0% { opacity: 0.65; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.04); }
}

/* Bottom soft mist fade */
.hero-bottom-mist {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 130px;
  background: linear-gradient(180deg, transparent 0%, rgba(13, 16, 24, 0.88) 100%);
  z-index: 4;
  pointer-events: none;
}

[data-mode="light"] .hero-bottom-mist {
  background: linear-gradient(180deg, transparent 0%, rgba(243, 237, 225, 0.9) 100%);
}

/* Main 2-Column Hero Grid */
.hero-grid {
  position: relative;
  z-index: 15;
  width: 100%;
  max-width: 1340px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 44px;
}

/* =========================================================
   LEFT COLUMN: HEROIC EMBLEM + RIBBON + 4 HEXAGON BADGES
   ========================================================= */
.hero-left-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 560px;
  padding-top: 210px; /* Leaves upper space clear so the Wuxia couple faces shine unobstructed! */
  text-align: center;
  transform: translate3d(var(--px-fg, 0px), var(--py-fg, 0px), 0);
}

/* 3D Metallic Calligraphic Title Block */
.hero-emblem-wrap {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 14px;
}

/* Fiery / Jade Brush Aura Behind Logo */
.emblem-brush-aura {
  position: absolute;
  inset: -18px -48px;
  background: radial-gradient(ellipse at center, var(--splash-aura) 0%, rgba(0, 0, 0, 0.45) 54%, transparent 75%);
  filter: blur(12px);
  z-index: -1;
  animation: auraPulse 4s ease-in-out infinite alternate;
}

@keyframes auraPulse {
  0% { transform: scale(0.96); opacity: 0.85; }
  100% { transform: scale(1.05); opacity: 1; }
}

.emblem-sub-crown {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 3.2px;
  text-transform: uppercase;
  color: #ffe8b3;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
  margin-bottom: 4px;
}

.emblem-main-title {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(40px, 4.4vw, 64px);
  font-weight: 700;
  line-height: 1.04;
  white-space: nowrap;
  padding: 4px 18px;
  background: linear-gradient(
    180deg,
    #fffdf2 0%,
    #ffe79e 26%,
    #f3b848 54%,
    #fff0b8 72%,
    #c6781e 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter:
    drop-shadow(0 3px 0 #59260b)
    drop-shadow(0 6px 14px rgba(0, 0, 0, 0.88))
    drop-shadow(0 0 26px var(--accent-glow));
  animation: emblemFloat 5s ease-in-out infinite;
}

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

/* Ornate Ribbon Banner ("KIẾM HIỆP KINH ĐIỂN - TÁI HIỆN GIANG HỒ") */
.ornate-ribbon {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 9px 34px;
  margin-bottom: 24px;
  background: linear-gradient(90deg, var(--ribbon-left) 0%, var(--ribbon-center) 50%, var(--ribbon-left) 100%);
  border-top: 1.5px solid var(--gold-main);
  border-bottom: 1.5px solid var(--gold-main);
  clip-path: polygon(16px 0%, calc(100% - 16px) 0%, 100% 50%, calc(100% - 16px) 100%, 16px 100%, 0% 50%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), 0 0 22px var(--accent-glow);
  overflow: hidden;
}

/* Periodic shimmer sweep across ribbon */
.ornate-ribbon::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 65%;
  height: 100%;
  background: linear-gradient(110deg, transparent, rgba(255, 244, 206, 0.32), transparent);
  animation: ribbonSweep 4.8s ease-in-out infinite;
}

@keyframes ribbonSweep {
  0%, 35% { left: -120%; }
  75%, 100% { left: 160%; }
}

.ribbon-diamond {
  color: var(--gold-light);
  font-size: 12px;
  text-shadow: 0 0 8px var(--gold-main);
}

.ribbon-text {
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #fff6df;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

/* 4 Hexagonal Feature Medallions Row */
.hex-badges-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hex-spark {
  color: var(--gold-main);
  font-size: 14px;
  opacity: 0.85;
  text-shadow: 0 0 10px var(--gold-main);
  animation: sparkTwinkle 2.4s ease-in-out infinite alternate;
}

@keyframes sparkTwinkle {
  0% { opacity: 0.45; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1.18); }
}

.hex-medal {
  position: relative;
  width: 112px;
  height: 122px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), filter 0.28s ease;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.55));
}

.hex-medal:hover {
  transform: translateY(-7px) scale(1.04);
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.68)) drop-shadow(0 0 16px var(--accent-glow));
}

.hex-svg-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hex-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hex-icon {
  width: 28px;
  height: 28px;
  color: var(--gold-light);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.65));
  margin-bottom: 2px;
}

.hex-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff8ea;
  line-height: 1.2;
}

.hex-sub {
  font-size: 11.5px;
  font-weight: 500;
  color: #f3d7a2;
  line-height: 1.2;
}

/* =========================================================
   RIGHT COLUMN: ORNATE GLOWING FROSTED-GLASS CARD
   ========================================================= */
.ornate-card {
  position: relative;
  width: 100%;
  max-width: 490px;
  margin-left: auto;
  padding: 36px 38px 32px;
  border-radius: 26px;
  background: var(--card-bg);
  backdrop-filter: blur(20px) saturate(145%);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
  border: 1.5px solid var(--card-border);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.58),
    0 0 38px var(--card-glow),
    inset 0 1px 0 rgba(255, 244, 214, 0.24);
  overflow: hidden;
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

/* Subtle pulsing golden rim aura */
.ornate-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 26px;
  padding: 1.5px;
  background: linear-gradient(
    145deg,
    rgba(255, 236, 179, 0.85) 0%,
    rgba(235, 168, 84, 0.2) 30%,
    rgba(235, 168, 84, 0.15) 70%,
    rgba(255, 236, 179, 0.85) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* 4 Glowing Filigree Corner Ornaments */
.corner-ornament {
  position: absolute;
  width: 58px;
  height: 58px;
  pointer-events: none;
  z-index: 4;
  color: var(--gold-main);
  filter: drop-shadow(0 0 8px rgba(248, 202, 112, 0.65));
}
.corner-tl { top: 4px; left: 4px; }
.corner-tr { top: 4px; right: 4px; transform: scaleX(-1); }
.corner-bl { bottom: 4px; left: 4px; transform: scaleY(-1); }
.corner-br { bottom: 4px; right: 4px; transform: scale(-1, -1); }

/* Coiled Dragon Watermark in Upper Right Inside Card */
.card-dragon-watermark {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 175px;
  height: 175px;
  opacity: 0.085;
  pointer-events: none;
  z-index: 1;
  color: var(--gold-light);
}

[data-mode="light"] .card-dragon-watermark {
  color: #8c5a20;
  opacity: 0.10;
}

.card-inner {
  position: relative;
  z-index: 3;
}

/* Card Header Mini Logo + Heading */
.card-emblem-header {
  text-align: center;
  margin-bottom: 22px;
}

.card-mini-logo {
  display: inline-block;
  font-family: 'Dancing Script', cursive;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  padding: 0 12px;
  margin-bottom: 8px;
  background: linear-gradient(180deg, #fff9de 0%, #f5c260 55%, #c5761e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 14px var(--accent-glow));
}

.card-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.card-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Form Elements */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.field-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.field-label svg {
  width: 15px;
  height: 15px;
  color: var(--gold-main);
}

[data-mode="light"] .field-label svg {
  color: #b4691e;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input {
  width: 100%;
  height: 46px;
  padding: 0 44px 0 16px;
  border-radius: 11px;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.auth-input::placeholder {
  color: var(--text-muted);
}

.auth-input:focus {
  border-color: var(--input-focus-border);
  box-shadow: 0 0 0 3px var(--input-focus-glow);
}

.btn-eye-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.btn-eye-toggle:hover {
  color: var(--gold-main);
}

/* Remember & Forgot Row */
.form-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  margin-top: -2px;
}

.remember-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  user-select: none;
}

.remember-check input {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  border-radius: 5px;
  background: var(--input-bg);
  border: 1.5px solid rgba(243, 196, 107, 0.55);
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.remember-check input:checked {
  background: linear-gradient(135deg, #f3c46b, #d88928);
  border-color: #fff0c2;
}

.remember-check input:checked::after {
  content: '✓';
  font-size: 11px;
  font-weight: 900;
  color: #1f140a;
}

.forgot-link {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
  cursor: pointer;
}

.forgot-link:hover {
  color: var(--gold-main);
}

/* Big Glowing Pill CTA Button (Exact reference style!) */
.btn-cta-pill {
  position: relative;
  width: 100%;
  height: 50px;
  margin-top: 4px;
  border-radius: 999px;
  border: 1.5px solid var(--accent-rim);
  background: linear-gradient(90deg, var(--accent-start) 0%, var(--accent-mid) 52%, var(--accent-end) 100%);
  color: #fffaf0;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow:
    0 6px 24px var(--accent-glow),
    0 0 18px var(--accent-glow),
    inset 0 1px 1px rgba(255, 255, 255, 0.38);
  overflow: hidden;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.btn-cta-pill:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 30px var(--accent-glow),
    0 0 28px var(--accent-glow),
    inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.btn-cta-pill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 55%;
  height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  animation: btnShimmer 3.6s ease-in-out infinite;
}

@keyframes btnShimmer {
  0%, 40% { left: -100%; }
  85%, 100% { left: 160%; }
}

.btn-cta-pill svg {
  width: 18px;
  height: 18px;
}

/* Ornamental Gold Flourish Divider at Bottom of Card */
.card-flourish-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 20px 0 14px;
  opacity: 0.8;
}

.flourish-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(243, 196, 107, 0.55), transparent);
}

.flourish-lotus {
  color: var(--gold-main);
  font-size: 14px;
}

.card-bottom-switch {
  text-align: center;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.switch-highlight {
  color: var(--gold-main);
  font-weight: 700;
  margin-left: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.2s ease, color 0.2s ease;
}

[data-mode="light"] .switch-highlight {
  color: #b85c14;
}

.switch-highlight:hover {
  color: var(--gold-light);
  transform: translateX(2px);
}

/* View Switching Animation inside Auth Card */
.auth-panel-view {
  display: none;
  animation: panelFadeIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-panel-view.active {
  display: block;
}

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

/* Logged-in Account Dashboard Preview Grid (inside ID Card) */
.account-stat-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 13px;
  background: var(--card-inner-bg);
  border: 1px solid rgba(243, 196, 107, 0.28);
  margin-bottom: 14px;
}

.stat-np-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--gold-main);
}

.quick-id-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.quick-id-tile {
  padding: 12px;
  border-radius: 12px;
  background: var(--card-inner-bg);
  border: 1px solid rgba(243, 196, 107, 0.18);
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: all 0.22s ease;
}

.quick-id-tile:hover {
  background: var(--card-inner-hover);
  border-color: var(--gold-main);
  transform: translateY(-2px);
}

.quick-id-tile strong {
  font-size: 13px;
  color: var(--text-primary);
}

.quick-id-tile span {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* =========================================================
   HOMEPAGE (VOHIEPTHIENSON.COM) HERO COMMAND CARD & SECTIONS
   ========================================================= */
.home-command-card {
  max-width: 515px;
}

.server-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #e6fff4;
  background: rgba(34, 152, 106, 0.24);
  border: 1px solid rgba(98, 232, 175, 0.45);
  margin-bottom: 10px;
}

[data-mode="light"] .server-live-pill {
  color: #165e43;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ef0a8;
  box-shadow: 0 0 10px #4ef0a8;
  animation: liveBlink 1.6s infinite;
}

@keyframes liveBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.home-quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 12px;
}

.btn-quick-glass {
  padding: 10px 8px;
  border-radius: 12px;
  background: var(--card-inner-bg);
  border: 1px solid rgba(243, 196, 107, 0.24);
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.22s ease;
}

.btn-quick-glass svg {
  width: 18px;
  height: 18px;
  color: var(--gold-main);
}

.btn-quick-glass:hover {
  background: var(--card-inner-hover);
  border-color: var(--gold-main);
  transform: translateY(-2px);
}

/* Mini News List inside Hero Right Card */
.hero-mini-news {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-news-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold-main);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 2px;
}

[data-mode="light"] .mini-news-head {
  color: #9e5414;
}

.mini-news-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border-radius: 10px;
  background: var(--card-inner-bg);
  border: 1px solid transparent;
  font-size: 12.5px;
  transition: all 0.2s ease;
}

.mini-news-item:hover {
  background: var(--card-inner-hover);
  border-color: rgba(243, 196, 107, 0.3);
  transform: translateX(3px);
}

.news-badge {
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.badge-hot { background: rgba(224, 78, 56, 0.24); color: #ff9c8a; border: 1px solid rgba(224, 78, 56, 0.4); }
.badge-event { background: rgba(235, 178, 72, 0.22); color: #ffd98a; border: 1px solid rgba(235, 178, 72, 0.4); }
.badge-guide { background: rgba(68, 188, 152, 0.22); color: #8af0cf; border: 1px solid rgba(68, 188, 152, 0.4); }

[data-mode="light"] .badge-hot { color: #b02a18; }
[data-mode="light"] .badge-event { color: #8f570d; }
[data-mode="light"] .badge-guide { color: #16684f; }

.mini-news-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.mini-news-date {
  font-size: 11.5px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* =========================================================
   BELOW-THE-FOLD SECTIONS ON INDEX.HTML (VOHIEPTHIENSON.COM)
   ========================================================= */
.content-realm {
  position: relative;
  z-index: 20;
  background: var(--section-bg);
  padding: 64px 28px 80px;
}

.realm-container {
  max-width: 1340px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.section-heading {
  text-align: center;
  margin-bottom: 28px;
}

.section-heading h2 {
  font-family: 'Noto Serif Display', serif;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  background: linear-gradient(180deg, #fff5d4 0%, #f0bd60 65%, #c27b26 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

[data-mode="light"] .section-heading h2 {
  background: linear-gradient(180deg, #8f4912 0%, #5c2d0c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-heading p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* News + Ranking + Activity 3-Panel Grid */
.portal-bento-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 26px;
}

.glass-panel {
  position: relative;
  padding: 28px;
  border-radius: 22px;
  background: var(--card-bg-solid);
  border: 1px solid var(--card-border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.34), 0 0 24px var(--card-glow);
}

.panel-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(243, 196, 107, 0.2);
}

.panel-header-bar h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--gold-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

[data-mode="light"] .panel-header-bar h3 {
  color: #964e14;
}

.filter-tabs {
  display: flex;
  gap: 6px;
}

.filter-tab {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--card-inner-bg);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-tab.active, .filter-tab:hover {
  color: #fff8eb;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-mid));
  border-color: var(--accent-rim);
}

.featured-banner-box {
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(216, 107, 40, 0.18), rgba(142, 28, 34, 0.16));
  border: 1px solid rgba(243, 196, 107, 0.34);
  margin-bottom: 14px;
}

[data-palette="jade"] .featured-banner-box {
  background: linear-gradient(135deg, rgba(60, 169, 133, 0.2), rgba(23, 88, 73, 0.18));
}

.featured-banner-box h4 {
  font-size: 15.5px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.featured-banner-box p {
  font-size: 13px;
  color: var(--text-secondary);
}

.news-full-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

/* Ranking & Schedule Table */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.rank-row {
  display: grid;
  grid-template-columns: 30px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 11px;
  background: var(--card-inner-bg);
  border: 1px solid rgba(243, 196, 107, 0.12);
  font-size: 13px;
}

.rank-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.rank-1 .rank-num { background: linear-gradient(135deg, #ffe28a, #c97f1e); color: #1d1206; }
.rank-2 .rank-num { background: linear-gradient(135deg, #e4ebf2, #8d9aa8); color: #161c22; }
.rank-3 .rank-num { background: linear-gradient(135deg, #f0b88a, #9e5827); color: #1f1107; }

.rank-name { font-weight: 700; color: var(--text-primary); }
.rank-sect { font-size: 12px; color: var(--text-muted); }
.rank-lvl { font-size: 12.5px; font-weight: 700; color: var(--gold-main); }
[data-mode="light"] .rank-lvl { color: #9c5214; }

/* Interactive 10 Sects Showcase (Using real jm_phai icons!) */
.sects-selector-strip {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.sect-btn {
  padding: 10px 6px;
  border-radius: 14px;
  background: var(--card-inner-bg);
  border: 1px solid rgba(243, 196, 107, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.24s ease;
}

.sect-btn img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  transition: transform 0.24s ease;
}

.sect-btn span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.sect-btn:hover, .sect-btn.active {
  background: var(--card-inner-hover);
  border-color: var(--gold-main);
  box-shadow: 0 6px 20px var(--card-glow);
  transform: translateY(-3px);
}

.sect-btn.active span {
  color: var(--gold-main);
}

[data-mode="light"] .sect-btn.active span {
  color: #9e4f12;
}

.sect-btn:hover img, .sect-btn.active img {
  transform: scale(1.09);
}

.sect-detail-stage {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 24px 30px;
  border-radius: 18px;
  background: var(--card-inner-bg);
  border: 1px solid rgba(243, 196, 107, 0.28);
}

.sect-stage-badge {
  width: 92px;
  height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px var(--accent-glow));
}

.sect-stage-info h4 {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold-main);
  margin-bottom: 6px;
}

[data-mode="light"] .sect-stage-info h4 {
  color: #964c12;
}

.sect-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.sect-tag {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(243, 196, 107, 0.12);
  border: 1px solid rgba(243, 196, 107, 0.32);
  color: var(--text-primary);
}

.sect-desc {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 680px;
}

/* Footer */
.site-footer {
  padding: 28px;
  text-align: center;
  border-top: 1px solid var(--nav-border);
  background: rgba(9, 11, 16, 0.92);
  color: var(--text-muted);
  font-size: 13px;
}

[data-mode="light"] .site-footer {
  background: #e6dcc8;
  color: #5e5043;
}

/* Toast Notification */
.jx-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  padding: 13px 20px;
  border-radius: 13px;
  background: var(--card-bg-solid);
  border: 1.5px solid var(--gold-main);
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 18px var(--accent-glow);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.jx-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Responsive Design */
@media (max-width: 1120px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero-left-showcase {
    min-height: auto;
    padding-top: 140px;
  }
  .ornate-card {
    margin: 0 auto;
  }
  .portal-bento-grid {
    grid-template-columns: 1fr;
  }
  .sects-selector-strip {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 820px) {
  .nav-links {
    display: none;
  }
  .sect-detail-stage {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
}
