/* ==========================================================================
   XĂM HƯỜNG — Imperial Huế Design System
   Website: xamhuong.beeca.vn
   ========================================================================== */

@font-face {
  font-family: 'NVN Morning Calm';
  src: url('../assets/fonts/NVNMorningCalm.ttf') format('truetype'),
       url('../assets/fonts/NVNMorningCalm.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-deep: #0E0916;
  --bg-surface: #181024;
  --bg-card: rgba(30, 20, 44, 0.72);
  --bg-card-hover: rgba(42, 27, 60, 0.88);
  --crimson: #D4213D;
  --crimson-bright: #FF2E4C;
  --crimson-dark: #8B1427;
  --gold: #E8C567;
  --gold-bright: #FFD700;
  --gold-dim: rgba(232, 197, 103, 0.25);
  --jade: #5D9C8C;
  --jade-light: #82B9AA;
  --jade-dark: #38685B;
  --ivory: #FAF4E6;
  --text-primary: #F7F1E5;
  --text-secondary: #BFB4CC;
  --text-muted: #8B7E9E;
  --border-gold: rgba(232, 197, 103, 0.22);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-gold: 0 0 36px rgba(232, 197, 103, 0.14);
  --shadow-crimson: 0 12px 32px rgba(212, 33, 61, 0.35);
  --font-display: 'NVN Morning Calm', Georgia, serif;
  --font-body: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: #120810;
  background-image:
    radial-gradient(ellipse 85% 55% at 50% -12%, rgba(168, 22, 46, 0.36), transparent 64%),
    radial-gradient(ellipse 55% 42% at 88% 28%, rgba(180, 128, 36, 0.14), transparent 60%),
    radial-gradient(ellipse 50% 42% at 12% 68%, rgba(122, 22, 48, 0.22), transparent 60%),
    radial-gradient(ellipse 65% 45% at 50% 105%, rgba(93, 156, 140, 0.10), transparent 62%);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Typography & Common Utilities
   ========================================================================== */
.display-font {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}

.gold-text {
  background: linear-gradient(135deg, #FFF3B0 0%, #FFD700 45%, #D4A12A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section {
  padding: 96px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.section-eyebrow::before,
.section-eyebrow::after {
  content: '';
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.section-eyebrow::after {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.18;
  margin-bottom: 16px;
  color: var(--gold);
  text-shadow: 0 4px 24px rgba(232, 197, 103, 0.18);
}

.section-subtitle {
  font-size: 1.04rem;
  color: var(--text-secondary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.96rem;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--crimson) 0%, #A9162E 100%);
  color: #FFF;
  border: 1px solid rgba(255, 215, 0, 0.45);
  box-shadow: var(--shadow-crimson), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(212, 33, 61, 0.5), 0 0 20px rgba(255, 215, 0, 0.25);
}

.btn-gold {
  background: linear-gradient(135deg, #F5D576 0%, #D9A431 100%);
  color: #1A0E06;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(232, 197, 103, 0.3);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(232, 197, 103, 0.48);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border: 1px solid var(--border-gold);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  background: rgba(232, 197, 103, 0.12);
  border-color: var(--gold);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 9px 18px;
  font-size: 0.86rem;
}

/* ==========================================================================
   Header / Navbar
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 9, 22, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-gold);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 16px;
}

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

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  object-fit: cover;
  border: 1.5px solid rgba(255, 215, 0, 0.45);
  box-shadow: 0 4px 16px rgba(212, 33, 61, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.brand-domain {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

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

.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
  position: relative;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 3px;
}

.lang-btn {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.2s;
}

.lang-btn.active {
  background: var(--gold);
  color: #1A0E06;
}

.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-gold);
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--gold);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  position: relative;
  padding: 72px 0 88px;
  overflow: hidden;
}

.hero-bg-ngo-mon {
  position: absolute;
  inset: 0;
  background: url('../assets/images/ngo_mon_hue.png') center 12% / min(980px, 95vw) no-repeat;
  opacity: 0.16;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 20%, rgba(0,0,0,0) 88%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 20%, rgba(0,0,0,0) 88%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(212, 33, 61, 0.16);
  border: 1px solid rgba(255, 215, 0, 0.35);
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.1rem, 6.8vw, 5.2rem);
  line-height: 1.05;
  margin-bottom: 12px;
  background: linear-gradient(180deg, #FFF5C0 0%, #FFD54F 48%, #E65C3A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 8px 28px rgba(212, 33, 61, 0.35));
}

.hero-subtitle {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  color: var(--gold);
  font-weight: 500;
  font-style: italic;
  margin-bottom: 18px;
}

.hero-desc {
  font-size: 1.04rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: 30px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 36px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--gold);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Hero App Phone Mockup */
.hero-phone-stage {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-phone-frame {
  position: relative;
  width: min(300px, 76vw);
  padding: 12px;
  border-radius: 36px;
  background: linear-gradient(145deg, rgba(232, 197, 103, 0.35), rgba(30, 20, 44, 0.92));
  border: 2px solid rgba(255, 215, 0, 0.45);
  box-shadow:
    0 28px 64px rgba(0, 0, 0, 0.7),
    0 0 48px rgba(212, 33, 61, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-phone-frame:hover {
  transform: translateY(-6px);
  box-shadow:
    0 34px 72px rgba(0, 0, 0, 0.78),
    0 0 56px rgba(232, 197, 103, 0.32);
}

.hero-phone-frame img {
  width: 100%;
  border-radius: 25px;
  display: block;
}

.hero-phone-play-pill {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(14, 9, 22, 0.9);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.65);
}

.play-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--crimson);
  color: #FFF;
  font-size: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Video Showcase Section */
.video-showcase {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0D0814;
  border: 2px solid var(--border-gold);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65), var(--shadow-gold);
}

.video-frame video,
.video-frame iframe {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

.video-frame .hidden {
  display: none !important;
}

.video-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.video-placeholder-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: blur(2px);
}

.video-placeholder-inner {
  position: relative;
  z-index: 2;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.video-play-circle {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--crimson), #9B152A);
  border: 2.5px solid var(--gold);
  color: #FFF;
  font-size: 1.8rem;
  padding-left: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 36px rgba(212, 33, 61, 0.55), 0 0 24px rgba(255, 215, 0, 0.3);
}

.video-placeholder-inner h3 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.85rem);
  color: var(--gold);
}

.video-placeholder-inner p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.video-placeholder-inner code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 7px;
  border-radius: 6px;
  color: var(--gold);
  font-size: 0.84rem;
}

.howto-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.howto-step {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 20px 18px;
}

.step-num {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--gold);
  margin-bottom: 6px;
}

.howto-step h4 {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.howto-step p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

@media (max-width: 900px) {
  .howto-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .howto-steps { grid-template-columns: 1fr; }
}
.hero-bowl-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.porcelain-bowl {
  position: relative;
  width: min(370px, 84vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 34%, #95C8BA 0%, #6DA798 42%, #477E70 76%, #2C5349 100%);
  border: 9px solid #C6A44F;
  box-shadow:
    inset 0 18px 40px rgba(0, 0, 0, 0.48),
    inset 0 -10px 24px rgba(255, 255, 255, 0.16),
    0 24px 60px rgba(0, 0, 0, 0.65),
    0 0 0 2px rgba(255, 215, 0, 0.35),
    0 0 48px rgba(232, 197, 103, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
  user-select: none;
}

.porcelain-bowl::before {
  content: '';
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 1.5px dashed rgba(255, 240, 200, 0.24);
  pointer-events: none;
}

.porcelain-bowl:hover {
  transform: scale(1.02);
  box-shadow:
    inset 0 18px 40px rgba(0, 0, 0, 0.45),
    0 28px 65px rgba(0, 0, 0, 0.7),
    0 0 0 2px rgba(255, 215, 0, 0.55),
    0 0 60px rgba(232, 197, 103, 0.28);
}

.hero-dice-cluster {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 14px;
  padding: 12px;
  position: relative;
  z-index: 2;
}

.hero-bowl-result {
  text-align: center;
  min-height: 54px;
}

.hero-combo-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  border-radius: 999px;
  background: rgba(24, 16, 36, 0.9);
  border: 1px solid var(--border-gold);
  font-weight: 600;
  color: var(--gold);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.hero-bowl-hint {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ==========================================================================
   3D-Style Ivory Dice Component
   ========================================================================== */
.xh-die {
  background: linear-gradient(145deg, #FFFDF8 0%, #EFE6D2 100%);
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 7px;
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.42),
    inset 0 2px 3px rgba(255, 255, 255, 0.95),
    inset 0 -3px 5px rgba(170, 150, 118, 0.45);
  border: 1.5px solid #D9CCB3;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
  user-select: none;
}

.xh-die--sm { width: 34px; height: 34px; padding: 4px; border-radius: 7px; }
.xh-die--md { width: 54px; height: 54px; padding: 7px; border-radius: 12px; }
.xh-die--lg { width: 66px; height: 66px; padding: 9px; border-radius: 14px; }

.xh-die--clickable { cursor: pointer; }
.xh-die--clickable:hover {
  transform: translateY(-4px) scale(1.06);
  border-color: var(--gold);
}

.xh-die--huong {
  background: linear-gradient(145deg, #FFF9F5 0%, #FDE8E4 100%);
}

.xh-die--highlight {
  box-shadow:
    0 0 0 2.5px var(--gold-bright),
    0 0 18px rgba(255, 215, 0, 0.65),
    0 8px 18px rgba(0, 0, 0, 0.45);
  transform: translateY(-2px);
}

.xh-die.rolling {
  animation: dieTumble 0.55s ease-in-out;
}

@keyframes dieTumble {
  0% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(0.82) rotate(-140deg) translateY(-16px); }
  60% { transform: scale(1.08) rotate(210deg) translateY(6px); }
  100% { transform: scale(1) rotate(360deg); }
}

.pip-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pip {
  width: 72%;
  height: 72%;
  border-radius: 50%;
  box-shadow: inset 0 1.5px 2px rgba(0, 0, 0, 0.45);
}

.xh-die--sm .pip { width: 78%; height: 78%; }
.pip-red { background: radial-gradient(circle at 35% 35%, #FF4757, #C9142B); }
.pip-black { background: radial-gradient(circle at 35% 35%, #3B3544, #14101A); }

/* ==========================================================================
   Cards Grid (Origin & Features)
   ========================================================================== */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.imperial-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 28px;
  backdrop-filter: blur(12px);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.imperial-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.45), transparent);
}

.imperial-card:hover {
  transform: translateY(-5px);
  background: var(--bg-card-hover);
  border-color: rgba(255, 215, 0, 0.45);
  box-shadow: var(--shadow-gold);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: linear-gradient(135deg, rgba(212, 33, 61, 0.24), rgba(232, 197, 103, 0.14));
  border: 1px solid rgba(232, 197, 103, 0.3);
  margin-bottom: 18px;
}

.imperial-card h3 {
  font-size: 1.18rem;
  color: var(--gold);
  margin-bottom: 10px;
  font-weight: 700;
}

.imperial-card p {
  font-size: 0.94rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Screenshots Showcase
   ========================================================================== */
.gallery-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.phone-shot {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: 20px;
  padding: 10px;
  cursor: pointer;
  transition: transform 0.28s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.phone-shot:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--gold);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.6), 0 0 24px rgba(232, 197, 103, 0.2);
}

.phone-shot img {
  width: 100%;
  aspect-ratio: 9 / 19.5;
  object-fit: cover;
  border-radius: 13px;
}

.phone-shot figcaption {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
  font-weight: 500;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(8, 5, 14, 0.92);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.open { display: flex; }

.lightbox-content {
  position: relative;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.lightbox-content img {
  max-height: 80vh;
  width: auto;
  border-radius: 22px;
  border: 2px solid var(--border-gold);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--crimson);
  color: #FFF;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gold);
}

/* Detailed Rules Guide & FAQ */
.rules-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.rules-guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 26px 28px;
}

.rules-guide-card--full {
  grid-column: 1 / -1;
}

.rules-guide-card h3 {
  font-size: 1.12rem;
  color: var(--gold);
  margin-bottom: 14px;
}

.rules-guide-card h4 {
  font-size: 0.96rem;
  color: #FFE082;
  margin-bottom: 10px;
}

.rules-guide-card ul,
.rules-guide-card ol {
  margin-left: 18px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rules-guide-card strong {
  color: var(--text-primary);
}

.rules-special-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.faq-list {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  transition: border-color 0.2s;
}

.faq-item[open] {
  border-color: var(--gold);
  background: var(--bg-card-hover);
}

.faq-item summary {
  font-weight: 700;
  font-size: 1rem;
  color: var(--gold);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.35rem;
  line-height: 1;
  color: var(--gold);
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item p {
  margin-top: 12px;
  font-size: 0.93rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.faq-item strong {
  color: var(--text-primary);
}

@media (max-width: 820px) {
  .rules-guide-grid,
  .rules-special-cols {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   63-Token Grid & Combos Reference Table
   ========================================================================== */
.tokens-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.token-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 18px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.token-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold);
}

.token-img-wrap {
  width: 78px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.token-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.55));
}

.token-card-name {
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--text-primary);
}

.token-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.token-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-secondary);
}

.token-pill--gold {
  background: rgba(232, 197, 103, 0.18);
  color: var(--gold);
  border: 1px solid rgba(232, 197, 103, 0.35);
}

/* Steal Rule Callout */
.steal-callout {
  background: linear-gradient(135deg, rgba(212, 33, 61, 0.16), rgba(232, 197, 103, 0.09));
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 36px;
}

.steal-callout-icon {
  font-size: 1.9rem;
  flex-shrink: 0;
}

.steal-callout h4 {
  color: var(--gold);
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.steal-callout p {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

/* Combo Filter Bar */
.combo-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

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

.filter-tab {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s;
}

.filter-tab:hover {
  border-color: var(--border-gold);
  color: var(--text-primary);
}

.filter-tab.active {
  background: var(--gold);
  color: #1A0E06;
  border-color: var(--gold);
}

.combo-search {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  padding: 9px 18px;
  color: var(--text-primary);
  font-size: 0.9rem;
  min-width: 260px;
  outline: none;
}

.combo-search:focus {
  border-color: var(--gold-bright);
  background: rgba(255, 255, 255, 0.09);
}

.combo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.combo-row {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s, transform 0.2s;
}

.combo-row:hover {
  border-color: var(--border-gold);
  transform: translateY(-2px);
}

.combo-row--epic {
  border-color: rgba(255, 215, 0, 0.35);
  background: linear-gradient(135deg, rgba(212, 33, 61, 0.14), rgba(30, 20, 44, 0.8));
}

.combo-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.combo-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--gold);
}

.combo-pts {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(212, 33, 61, 0.24);
  color: #FFE082;
  border: 1px solid rgba(255, 215, 0, 0.35);
  white-space: nowrap;
}

.combo-dice-line {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.combo-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Interactive Tester Section
   ========================================================================== */
.tester-box {
  background: linear-gradient(160deg, rgba(32, 18, 48, 0.9), rgba(18, 12, 28, 0.95));
  border: 1.5px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), var(--shadow-gold);
}

.tester-dice-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 26px 0 18px;
}

.tester-result-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 32px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-gold);
  min-width: 300px;
  margin: 8px auto 24px;
}

.tester-result-name {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--gold);
}

.tester-result-pts {
  font-size: 1.05rem;
  font-weight: 700;
  color: #FF8A80;
}

.tester-result-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.tester-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 14px;
}

.tester-tip {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Download / CTA Section
   ========================================================================== */
.download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 780px;
  margin: 0 auto;
}

.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.download-card--featured {
  background: linear-gradient(135deg, rgba(212, 33, 61, 0.28), rgba(40, 22, 54, 0.92));
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}

.download-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-bright);
}

.download-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  flex-shrink: 0;
}

.download-card h3 {
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 4px;
}

.download-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-gold);
  background: rgba(10, 6, 16, 0.92);
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-size: 0.9rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--gold);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 22px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.footer-bottom--beeca {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.beeca-credit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.beeca-credit:hover {
  transform: translateY(-2px);
  border-color: var(--border-gold);
  background: rgba(255, 255, 255, 0.07);
}

.beeca-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
}

/* ==========================================================================
   Policy Pages (privacy.html / terms.html)
   ========================================================================== */
.policy-wrap {
  max-width: 820px;
  margin: 48px auto 80px;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.5);
}

.policy-wrap h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  color: var(--gold);
  text-align: center;
  margin-bottom: 8px;
}

.policy-meta {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.policy-wrap h2 {
  color: var(--gold);
  font-size: 1.15rem;
  margin: 28px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-gold);
}

.policy-wrap p {
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.policy-wrap ul {
  margin: 8px 0 16px 20px;
  color: var(--text-secondary);
}

.policy-wrap li {
  margin-bottom: 6px;
}

.policy-wrap a {
  color: var(--gold);
  text-decoration: underline;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
.ms-icon {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

.ms-sm { font-size: 1.05rem; }
.ms-xs { font-size: 0.9rem; }

.card-icon .ms-icon {
  font-size: 1.65rem;
  color: var(--gold);
}

.steal-callout-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(212, 33, 61, 0.28), rgba(232, 197, 103, 0.16));
  border: 1px solid rgba(255, 215, 0, 0.35);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.steal-callout-icon .ms-icon {
  font-size: 1.55rem;
}

.heading-with-icon {
  display: flex;
  align-items: center;
  gap: 10px;
}

.heading-with-icon .ms-icon {
  font-size: 1.35rem;
  color: var(--gold);
}

.hero-desc,
.imperial-card p,
.howto-step p,
.rules-guide-card li,
.steal-callout p,
.faq-item p,
.policy-wrap p,
.policy-wrap li {
  text-align: justify;
  text-justify: inter-word;
}

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-stats { max-width: 560px; margin: 0 auto; }
  .gallery-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tokens-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .download-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(14, 9, 22, 0.97);
    border-bottom: 1px solid var(--border-gold);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
  }
  .nav-links.open { display: flex; }
  .mobile-menu-btn { display: inline-flex; }
  .nav-play-btn { display: none; }
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .cards-3 { grid-template-columns: 1fr; }
  .combo-grid { grid-template-columns: 1fr; }
  .gallery-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tokens-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .combo-search { width: 100%; }
  .tester-box { padding: 28px 18px; }
  .policy-wrap { padding: 28px 20px; margin: 28px 16px 60px; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   IMPERIAL HUẾ MOTION, ORNAMENTS & PRO VISUAL EFFECTS
   ========================================================================== */

/* Floating Gold Dust & Lantern Embers Ambient Canvas */
#imperialDustCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.72;
}

main, .site-footer {
  position: relative;
  z-index: 1;
}

/* Golden Scroll Progress Bar */
.scroll-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2.5px;
  width: 0%;
  background: linear-gradient(90deg, var(--crimson), #FFD700, #FFF3B0);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.75);
  transition: width 0.08s linear;
  z-index: 10;
}

/* Animated Gold Leaf Shimmer on Hero Display Title */
.hero-title {
  background: linear-gradient(
    110deg,
    #E65C3A 0%,
    #F2C55A 22%,
    #FFF7C2 42%,
    #FFD54F 58%,
    #E65C3A 82%,
    #FFF3B0 100%
  );
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: imperialGoldShimmer 7s ease-in-out infinite;
}

@keyframes imperialGoldShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Imperial Huế Fretwork Section Dividers */
.imperial-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px;
  opacity: 0.75;
}

.imperial-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 197, 103, 0.55), transparent);
}

.imperial-divider-emblem {
  color: var(--gold);
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-shadow: 0 0 16px rgba(255, 215, 0, 0.6);
}

/* Hero 3D Phone Stage with Floating Royal Tokens & Sheen */
.hero-phone-stage {
  position: relative;
  perspective: 1100px;
}

.hero-float-token {
  position: absolute;
  width: 74px;
  height: 74px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 18px rgba(255, 215, 0, 0.28));
  z-index: 3;
}

.hero-float-token--1 {
  top: 24px;
  left: -10px;
  animation: floatImperialA 5.6s ease-in-out infinite;
}

.hero-float-token--2 {
  bottom: 48px;
  right: -8px;
  width: 66px;
  height: 66px;
  animation: floatImperialB 6.4s ease-in-out infinite;
}

@keyframes floatImperialA {
  0%, 100% { transform: translateY(0px) rotate(-7deg); }
  50% { transform: translateY(-14px) rotate(4deg); }
}

@keyframes floatImperialB {
  0%, 100% { transform: translateY(0px) rotate(8deg); }
  50% { transform: translateY(12px) rotate(-5deg); }
}

.hero-phone-frame {
  transform-style: preserve-3d;
  will-change: transform;
  overflow: hidden;
  animation: heroPhoneBreath 6s ease-in-out infinite;
}

@keyframes heroPhoneBreath {
  0%, 100% {
    box-shadow:
      0 28px 64px rgba(0, 0, 0, 0.72),
      0 0 42px rgba(212, 33, 61, 0.28),
      0 0 0 1px rgba(255, 215, 0, 0.35);
  }
  50% {
    box-shadow:
      0 34px 72px rgba(0, 0, 0, 0.78),
      0 0 60px rgba(232, 197, 103, 0.36),
      0 0 0 1px rgba(255, 215, 0, 0.6);
  }
}

.hero-phone-sheen {
  position: absolute;
  inset: -40%;
  background: linear-gradient(120deg, transparent 36%, rgba(255, 245, 200, 0.16) 50%, transparent 64%);
  transform: translateX(-120%);
  animation: phoneSheenSweep 5.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes phoneSheenSweep {
  0%, 60% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

/* Imperial Corner Filigree & Interactive Cursor Gold Spotlight on Cards */
.imperial-card,
.rules-guide-card,
.token-card,
.download-card,
.howto-step {
  --mx: 50%;
  --my: 50%;
  position: relative;
  overflow: hidden;
}

.imperial-card::before,
.rules-guide-card::before,
.token-card::before,
.download-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    360px circle at var(--mx) var(--my),
    rgba(255, 215, 0, 0.14),
    rgba(212, 33, 61, 0.05) 45%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.imperial-card:hover::before,
.rules-guide-card:hover::before,
.token-card:hover::before,
.download-card:hover::before {
  opacity: 1;
}

/* Subtle Royal Corner Accent on Featured Boxes */
.rules-guide-card,
.video-frame,
.steal-callout {
  background-image:
    linear-gradient(to right, var(--gold) 12px, transparent 12px),
    linear-gradient(to bottom, var(--gold) 12px, transparent 12px),
    linear-gradient(to left, var(--gold) 12px, transparent 12px),
    linear-gradient(to top, var(--gold) 12px, transparent 12px);
  background-repeat: no-repeat;
  background-position: top left, top left, bottom right, bottom right;
  background-size: 16px 2px, 2px 16px, 16px 2px, 2px 16px;
}

/* Video Play Circle Pulse Ring */
.video-play-circle {
  position: relative;
  transition: transform 0.25s ease;
}

.video-play-circle::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(255, 215, 0, 0.55);
  animation: playPulseRing 2.4s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

@keyframes playPulseRing {
  0% { transform: scale(0.95); opacity: 0.85; }
  100% { transform: scale(1.45); opacity: 0; }
}

/* Scroll-Choreographed Reveal Animations */
.reveal-item {
  opacity: 0;
  transform: translateY(26px) scale(0.985);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (max-width: 768px) {
  .hero-float-token { width: 54px; height: 54px; }
  .hero-float-token--1 { left: 4px; }
  .hero-float-token--2 { right: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-title, .hero-float-token, .hero-phone-frame, .hero-phone-sheen, .video-play-circle::after {
    animation: none !important;
  }
  .reveal-item {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  #imperialDustCanvas { display: none; }
}
