/* =========================================================
   RGRP (Resurgence RP Story) — Master Stylesheet
   Theme: Original Luxury Metallic Champagne Gold CI
   (Peak-RP Architecture + Metallic Gold & Midnight Obsidian)
   ========================================================= */

@import url('variables.css');
@import url('animations.css');

/* ============ CSS RESET & BASE ============ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  color-scheme: dark;
  background-color: var(--bg-black);
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-black);
  color: var(--fg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.menu-open {
  overflow: hidden;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

ul {
  list-style: none;
}

code {
  font-family: var(--font-mono);
}

/* ============ TACTICAL OVERLAYS ============ */
.tactical-grid {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(to right, rgba(212, 175, 55, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(212, 175, 55, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 1;
}

.vignette-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(120% 90% at 50% 30%, transparent 40%, rgba(5, 7, 11, 0.85) 90%, #05070B 100%);
  pointer-events: none;
  z-index: 2;
}

/* ============ LAYOUT CONTAINER ============ */
.container {
  width: min(1280px, 92%);
  margin-inline: auto;
  position: relative;
  z-index: 3;
}

.section {
  padding-block: clamp(4rem, 7vw, 6.5rem);
  position: relative;
  z-index: 3;
}

.section-head {
  margin-bottom: clamp(2.4rem, 4vw, 3.5rem);
}

.section-head.centered {
  text-align: center;
  margin-inline: auto;
  max-width: 760px;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-bright);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 10px var(--gold-primary);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: var(--fg-bright);
  text-wrap: balance;
}

.section-title .highlight-gold {
  background: var(--grad-gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-lead {
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  margin-top: 0.8rem;
  max-width: 65ch;
  line-height: 1.7;
}

/* ============ BUTTONS (METALLIC GOLD & PEAK-RP PILL STYLING) ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.btn:hover svg {
  transform: translateX(3px);
}

/* Primary Gold Pill Button */
.btn-primary, .btn-gold {
  background: var(--grad-gold-btn);
  color: #0E0B04;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.38);
  border: 1px solid rgba(255, 242, 209, 0.55);
}

.btn-primary::after, .btn-gold::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.5) 50%, transparent 100%);
  animation: sheenSweep 4.5s infinite;
  pointer-events: none;
}

.btn-primary:hover, .btn-gold:hover {
  background: var(--grad-gold-btn-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212, 175, 55, 0.6);
  color: #070603;
}

/* Ghost Glass Pill Button */
.btn-ghost {
  background: rgba(20, 24, 35, 0.75);
  color: var(--fg);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.btn-ghost:hover {
  background: rgba(36, 43, 62, 0.9);
  border-color: var(--gold-bright);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.25);
}

.btn-discord {
  background: rgba(88, 101, 242, 0.15);
  color: #FFFFFF;
  border: 1px solid rgba(88, 101, 242, 0.4);
}

.btn-discord:hover {
  background: rgba(88, 101, 242, 0.3);
  border-color: var(--discord);
  box-shadow: 0 0 20px rgba(88, 101, 242, 0.4);
  transform: translateY(-2px);
}

/* ============ TOP NAVBAR ============ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-h);
  z-index: 100;
  transition: all 0.3s ease;
}

.nav.scrolled {
  background: rgba(8, 10, 15, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  width: auto;
  min-width: 175px;
  flex-shrink: 0;
}

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.45));
  transition: transform 0.3s ease, filter 0.3s ease;
  flex-shrink: 0;
}

.brand:hover .brand-logo {
  transform: scale(1.06);
  filter: drop-shadow(0 0 16px rgba(212, 175, 55, 0.75));
}

/* Morph Text Container (No Shine / No Jitter / Pure Gold) */
.brand-text-morph {
  position: relative;
  display: inline-grid;
  grid-template-areas: "brand-stack";
  align-items: center;
  height: 2.2rem;
  overflow: hidden;
}

.brand-text-short,
.brand-text-full {
  grid-area: brand-stack;
  justify-self: start;
  font-family: var(--font-display);
  background: var(--grad-gold-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: var(--gold-bright);
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.brand-text-short {
  font-size: 1.45rem;
  letter-spacing: 0.08em;
  opacity: 1;
  transform: translateY(0);
}

.brand-text-full {
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  opacity: 0;
  transform: translateY(100%);
  pointer-events: none;
}

/* On Hover: Switch cleanly from RGRP to RESURGENCE RP */
.brand:hover .brand-text-short {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

.brand:hover .brand-text-full {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  flex-wrap: nowrap;
  margin: 0 auto;
}

.nav-link {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap; /* ป้องกันการขึ้นบรรทัดใหม่ 100% */
  transition: color 0.2s ease;
  position: relative;
  padding: 0.35rem 0.25rem;
  text-decoration: none;
  display: inline-block;
}

.nav-link:hover {
  color: var(--gold-bright);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--gold-bright);
  transition: width 0.2s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(20, 24, 35, 0.8);
  border: 1px solid var(--border);
  color: var(--fg);
  align-items: center;
  justify-content: center;
}

/* Mobile Nav Drawer */
.mobile-nav {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  width: 100%;
  background: rgba(8, 10, 15, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-strong);
  padding: 1.8rem 5%;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 99;
}

.mobile-nav.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav a {
  font-size: 1.1rem;
  color: var(--fg);
  font-weight: 500;
  padding-block: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ============ HERO SECTION (PEAK-RP SATELLITE MAP & GOLD DASHBOARD) ============ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(var(--nav-h) + 2rem);
  padding-bottom: 3rem;
  overflow: hidden;
}

/* Easy-to-Swap Background Image Layer (เปลี่ยนรูปพื้นหลังได้ที่นี่) */
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background-color: var(--bg-black);
  background-image: 
    linear-gradient(180deg, rgba(5, 7, 11, 0.65) 0%, rgba(5, 7, 11, 0.8) 50%, #05070B 100%),
    var(--hero-bg-image),
    var(--hero-bg-fallback);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  filter: contrast(1.1) brightness(0.85);
}

.hero-bg-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at 70% 30%, rgba(212, 175, 55, 0.09) 0%, transparent 60%);
  pointer-events: none;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: center;
  position: relative;
  z-index: 3;
}

/* Hero Left Column */
.hero-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.status-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(20, 24, 35, 0.85);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  padding: 0.35rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #FFFFFF;
  margin-bottom: 1.4rem;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.18);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--online);
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(3.8rem, 7.5vw, 6.2rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: #FFFFFF;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}

.hero-heading .gold-row {
  display: block;
  background: var(--grad-gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 25px rgba(212, 175, 55, 0.4));
}

.hero-desc {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--muted);
  line-height: 1.75;
  max-width: 54ch;
  margin-bottom: 2rem;
  font-style: italic;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.2rem;
}

.hero-tags-strip {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}

.hero-tags-strip span {
  color: var(--gold-bright);
}

/* Hero Right Column — Cyber Server Dashboard Card */
.server-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  box-shadow: var(--shadow-card), 0 0 35px rgba(212, 175, 55, 0.14);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  position: relative;
}

.server-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
  box-shadow: 0 0 10px var(--gold-primary);
}

.server-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title-kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.status-pill-online {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: var(--radius-full);
  padding: 0.2rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--online);
}

/* F8 Console Box */
.f8-box {
  background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.f8-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  display: block;
  margin-bottom: 0.2rem;
}

.f8-command {
  font-family: var(--font-mono);
  font-size: 0.96rem;
  color: #FFFFFF;
  font-weight: 600;
}

.f8-command span {
  color: var(--gold-bright);
}

.f8-copy-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--border);
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.f8-copy-btn:hover {
  background: var(--gold-bright);
  color: #05070B;
}

.f8-copy-btn svg {
  width: 16px;
  height: 16px;
}

/* 3-Metrics Grid inside Card */
.server-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.metric-cell {
  background: rgba(20, 24, 35, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.6rem;
  text-align: center;
}

.metric-val {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: #FFFFFF;
  line-height: 1.1;
}

.metric-val .max-slot {
  font-size: 0.9rem;
  color: var(--muted);
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* Main FiveM Launch Button (Matches Peak-RP Image 1) */
.launch-fivem-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  height: 48px;
  padding: 0 1.4rem;
  border-radius: var(--radius-sm);
  background: rgba(18, 24, 36, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: #FFFFFF;
  font-size: 0.95rem;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.03em;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.launch-fivem-btn svg,
.launch-fivem-btn .btn-icon {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  flex-shrink: 0;
  display: inline-block;
  color: var(--gold-bright);
  transition: transform 0.2s ease;
}

.launch-fivem-btn:hover {
  background: var(--grad-gold-btn);
  border-color: rgba(255, 242, 209, 0.6);
  color: #070603;
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.45);
  transform: translateY(-2px);
}

.launch-fivem-btn:hover svg,
.launch-fivem-btn:hover .btn-icon {
  color: #070603;
  transform: scale(1.12);
}

.card-foot-tags {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--faint);
  text-transform: uppercase;
}

/* ============ BOTTOM 5-COLUMN STATS DASHBOARD BAR ============ */
.stats-banner {
  margin-top: 3.5rem;
  position: relative;
  z-index: 3;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  background: rgba(18, 22, 32, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.8rem;
  box-shadow: var(--shadow-card);
}

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

.stat-item + .stat-item {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding-left: 1.2rem;
}

.stat-head {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.stat-num span {
  font-size: 1rem;
  color: var(--faint);
}

.stat-sub {
  font-size: 0.76rem;
  color: var(--online);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* ============ SYSTEMS & FEATURES (PEAK-RP BENTO CARDS) ============ */
.systems-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.bento-card:hover {
  border-color: var(--gold-bright);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7), 0 0 25px rgba(212, 175, 55, 0.22);
  transform: translateY(-4px);
}

/* Bento Wide Featured Card (แถบยาวเต็มจอแบบ 2 ฝั่ง ข้อความซ้าย / ภาพขวา) */
.bento-card-wide {
  grid-column: 1 / -1 !important;
  display: grid;
  grid-template-columns: 1.05fr 1.35fr;
  gap: clamp(1.8rem, 3.5vw, 3rem);
  align-items: center;
  padding: clamp(2rem, 3.5vw, 2.8rem);
}

.bento-card-wide .bento-info {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.bento-card-wide .bento-media {
  margin-top: 0;
  width: 100%;
  height: 100%;
  min-height: 270px;
  aspect-ratio: 16 / 10;
}

@media (max-width: 900px) {
  .bento-card-wide {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.bento-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.bento-chip {
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-bright);
}

.bento-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  color: #FFFFFF;
  letter-spacing: 0.02em;
}

.bento-desc {
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.7;
}

/* Bento Showcase Media Frame (รองรับไฟล์ GIF เคลื่อนไหว, JPG/PNG/WebP และ Video MP4) */
.bento-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9.5;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: #090C12;
  margin-top: auto;
  transform: translateZ(0); /* Hardware accelerated for buttery smooth GIF playback */
}

.bento-img,
.bento-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: auto;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
  will-change: transform;
}

.bento-card:hover .bento-img,
.bento-card:hover .bento-media video {
  transform: scale(1.04);
}

/* Frozen Snapshot Canvas Overlay (สำหรับ Freeze ภาพ GIF เฟรมแรกแบบ 100% แน่นอน) */
.bento-freeze-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.25s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card:hover .bento-freeze-canvas,
.bento-media.is-playing .bento-freeze-canvas {
  opacity: 0;
  transform: scale(1.04);
}

.bento-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 65%, rgba(5, 7, 11, 0.75) 100%);
  pointer-events: none;
  z-index: 2;
}

/* Media Status Badge Indicator (รองรับทั้ง WebM, MP4, GIF และ Static Image) */
.bento-media::before {
  content: attr(data-badge, 'PREVIEW · HOVER TO PLAY');
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(5, 7, 11, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(212, 175, 55, 0.45);
  color: var(--gold-bright);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 3;
}

.bento-media:not([data-badge])::before {
  content: 'WEBM / GIF · HOVER TO PLAY';
}

.bento-media.is-webm::before {
  content: 'WEBM · HOVER TO PLAY';
}

.bento-media.is-gif::before {
  content: 'GIF · HOVER TO PLAY';
}

.bento-card:hover .bento-media::before,
.bento-media.is-playing::before {
  content: '▶ PLAYING';
  background: rgba(16, 185, 129, 0.25);
  border-color: var(--online);
  color: #FFFFFF;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

/* Mockup Viewports inside Cards */
.mockup-viewport {
  background: #090C12;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 1.2rem;
  margin-top: auto;
  position: relative;
  overflow: hidden;
}

/* Mockup 1: Character Creator DNA Sliders */
.dna-mockup {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.2rem;
  align-items: center;
}

.dna-avatar-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--gold-bright);
  background: radial-gradient(circle, rgba(212, 175, 55, 0.25) 0%, #101622 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.dna-avatar-circle svg {
  width: 36px;
  height: 36px;
  color: var(--gold-bright);
}

.dna-controls {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.dna-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dna-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.dna-slider-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.dna-slider-fill {
  height: 100%;
  background: var(--grad-gold);
  border-radius: 99px;
}

/* Mockup 2: Inventory Grid */
.inventory-grid-mockup {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}

.inv-slot {
  aspect-ratio: 1/1;
  background: rgba(20, 24, 35, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xs);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.4rem;
  position: relative;
  transition: all 0.2s ease;
}

.inv-slot.active {
  border-color: var(--gold-bright);
  background: rgba(212, 175, 55, 0.1);
  box-shadow: inset 0 0 10px rgba(212, 175, 55, 0.2);
}

.inv-icon {
  width: 24px;
  height: 24px;
  color: var(--gold-bright);
}

.inv-name {
  font-size: 0.65rem;
  color: var(--fg);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.inv-qty {
  position: absolute;
  top: 3px;
  right: 5px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--faint);
}

/* ============ SECTION 02: STORY & COMMUNITY ============ */
.section-story {
  position: relative;
  background-color: var(--bg-black);
  background-image: 
    linear-gradient(180deg, #05070B 0%, rgba(5, 7, 11, 0.6) 20%, rgba(8, 11, 18, 0.75) 50%, rgba(5, 7, 11, 0.95) 85%, #05070B 100%),
    radial-gradient(circle at 50% 30%, rgba(212, 175, 55, 0.08) 0%, transparent 65%),
    var(--hero-bg-image),
    var(--hero-bg-fallback);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.section-story::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(212, 175, 55, 0.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}

.story-box {
  position: relative;
  z-index: 2;
  background: rgba(14, 18, 28, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 4.5vw, 3.5rem);
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 35px rgba(212, 175, 55, 0.1);
  overflow: hidden;
}

.story-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 10%, rgba(212, 175, 55, 0.05) 0%, transparent 45%);
  pointer-events: none;
  z-index: 0;
}

.story-box-top,
.story-gallery-wrap {
  position: relative;
  z-index: 1;
}

.story-box-top {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 900px) {
  .story-box-top {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }
}

.story-quote {
  font-size: 1.25rem;
  font-style: italic;
  color: #FFFFFF;
  line-height: 1.7;
  border-left: 3px solid var(--gold-bright);
  padding-left: 1.5rem;
  margin-top: 1rem;
}

/* Inner Gallery Sub-blocks inside Story Box */
.story-gallery-wrap {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2.2rem;
}

.story-gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.3rem;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.story-gallery-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--fg);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.story-gallery-title::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 8px var(--gold-bright);
}

.gallery-nav-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gallery-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(14, 18, 28, 0.8);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gallery-nav-btn:hover {
  border-color: var(--gold-bright);
  color: var(--gold-bright);
  background: rgba(212, 175, 55, 0.15);
  transform: scale(1.05);
}

.gallery-nav-btn svg {
  width: 14px;
  height: 14px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  transition: all 0.3s ease;
}

@media (max-width: 850px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

.gallery-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  aspect-ratio: 16/10;
  background: #0B0F17;
  cursor: pointer;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.gallery-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-bright);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.25);
}

.gallery-card img,
.gallery-card video,
.gallery-img,
.gallery-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
  z-index: 1;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-card:hover img,
.gallery-card:hover video,
.gallery-card:hover .gallery-img,
.gallery-card:hover .gallery-video {
  transform: scale(1.06);
}

/* Extra cards hidden by default until View More is pressed */
.gallery-card-extra {
  display: none;
  opacity: 0;
  transform: translateY(15px);
}

.gallery-grid.expanded .gallery-card-extra {
  display: block;
  animation: galleryFadeIn 0.45s ease forwards;
}

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

.gallery-visual {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-visual {
  transform: scale(1.06);
}

.gallery-visual-1 {
  background: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.22) 0%, #0A0E17 80%);
}

.gallery-visual-2 {
  background: radial-gradient(circle at 50% 50%, rgba(147, 51, 234, 0.25) 0%, #0A0E17 80%);
}

.gallery-visual-3 {
  background: radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.22) 0%, #0A0E17 80%);
}

.gallery-visual-4 {
  background: radial-gradient(circle at 50% 50%, rgba(239, 68, 68, 0.25) 0%, #0A0E17 80%);
}

.gallery-visual-5 {
  background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.25) 0%, #0A0E17 80%);
}

.gallery-visual-6 {
  background: radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.25) 0%, #0A0E17 80%);
}

.gallery-visual-code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-xs);
  background: rgba(5, 7, 11, 0.7);
  backdrop-filter: blur(4px);
  margin-bottom: 2rem;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(5, 7, 11, 0.95) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.2rem;
  z-index: 2;
}

/* View More Button Container */
.gallery-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1.8rem;
}

.btn-outline-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.8rem;
  border: 1px solid var(--gold-border);
  background: rgba(212, 175, 55, 0.08);
  color: var(--gold-bright);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-outline-gold:hover {
  background: var(--grad-gold-btn);
  color: #000000;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.btn-outline-gold svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.gallery-grid.expanded ~ .gallery-more-wrap .btn-outline-gold svg {
  transform: rotate(180deg);
}

.gallery-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gold-bright);
  text-transform: uppercase;
}

.gallery-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #FFFFFF;
}

/* ============ SECTION 03: RULES & PHILOSOPHY ============ */
.rules-head-split {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: clamp(2.5rem, 4vw, 3.5rem);
}

@media (max-width: 900px) {
  .rules-head-split {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
  }
}

.rules-head-left {
  max-width: 620px;
}

.rules-head-right {
  max-width: 440px;
  text-align: right;
}

@media (max-width: 900px) {
  .rules-head-right {
    text-align: left;
  }
}

.rules-head-quote {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1.7;
}

/* Flexible Rules Grid (รองรับการเพิ่ม/ลดจำนวนการ์ดได้อิสระ จัดเลย์เอาต์อัตโนมัติ) */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

@media (min-width: 1200px) {
  .rules-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1199px) and (min-width: 641px) {
  .rules-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .rules-grid {
    grid-template-columns: 1fr;
  }
}

.rule-card {
  background: rgba(14, 18, 28, 0.75);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.6rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.rule-card:hover {
  transform: translateY(-5px);
  background: rgba(20, 26, 40, 0.95);
  border-color: var(--gold-bright);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.7), 0 0 25px rgba(212, 175, 55, 0.22);
}

.rule-card-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.rule-card-icon {
  width: 20px;
  height: 20px;
  color: var(--gold-bright);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rule-card-icon svg {
  width: 100%;
  height: 100%;
}

.rule-card-title {
  font-family: var(--font-body);
  font-size: 1.08rem;
  font-weight: 600;
  font-style: italic;
  color: var(--gold-bright);
  letter-spacing: 0.01em;
}

.rule-card-desc {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--muted);
  font-style: italic;
}

.rule-card-foot {
  margin-top: auto;
  padding-top: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  font-size: 0.76rem;
  font-family: var(--font-mono);
  color: var(--gold-bright);
  opacity: 0.65;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.rule-card:hover .rule-card-foot {
  opacity: 1;
  transform: translateX(3px);
}

.rule-card-foot svg {
  width: 13px;
  height: 13px;
}

/* ============ RULE DETAIL MODAL (POPUP) ============ */
body.modal-open {
  overflow: hidden !important;
}

.rule-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 10, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.rule-modal-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.rule-modal-container {
  background: linear-gradient(180deg, rgba(22, 28, 42, 0.98) 0%, rgba(12, 16, 25, 0.98) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.95), 0 0 40px rgba(212, 175, 55, 0.25);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.rule-modal-backdrop.open .rule-modal-container {
  transform: scale(1) translateY(0);
}

.rule-modal-header {
  padding: 1.6rem 1.8rem 1.2rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.rule-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.rule-modal-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rule-modal-icon svg {
  width: 24px;
  height: 24px;
}

.rule-modal-title {
  font-family: var(--font-body);
  font-size: 1.35rem;
  font-weight: 700;
  font-style: italic;
  color: var(--gold-bright);
  line-height: 1.2;
}

.rule-modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.rule-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #EF4444;
  color: #FFFFFF;
  transform: rotate(90deg);
}

.rule-modal-close svg {
  width: 18px;
  height: 18px;
}

.rule-modal-body {
  padding: 1.8rem;
  overflow-y: auto;
  font-size: 1.02rem;
  line-height: 1.8;
  color: #E2E8F0;
  font-style: normal;
}

.rule-modal-body p {
  margin-bottom: 1rem;
}

.rule-modal-body p:last-child {
  margin-bottom: 0;
}

.rule-modal-footer {
  padding: 1.2rem 1.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
  background: rgba(8, 11, 18, 0.6);
}

/* ============ SECTION 04: FAQ ACCORDION ============ */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 860px;
  margin-inline: auto;
}

.acc-item {
  background: rgba(14, 18, 28, 0.75);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s ease;
}

.acc-item.open {
  border-color: var(--gold-bright);
  background: rgba(20, 26, 40, 0.9);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 15px rgba(212, 175, 55, 0.12);
}

.acc-trigger {
  width: 100%;
  padding: 1.2rem 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #FFFFFF;
  text-align: left;
  letter-spacing: 0.02em;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.acc-trigger:hover {
  color: var(--gold-bright);
}

.acc-trigger svg {
  width: 18px;
  height: 18px;
  color: var(--gold-bright);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.acc-item.open .acc-trigger svg {
  transform: rotate(180deg);
}

.acc-content {
  display: none;
  padding: 0 1.6rem 1.4rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.acc-item.open .acc-content {
  display: block;
}

/* ============ CTA BAND ============ */
.cta-band {
  background: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.16) 0%, rgba(14, 17, 26, 0.95) 75%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: clamp(3rem, 6vw, 5rem) 2rem;
  text-align: center;
  margin-block: 4rem;
  box-shadow: 0 0 50px rgba(212, 175, 55, 0.18);
}

.cta-band-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  color: #FFFFFF;
  margin-bottom: 1rem;
}

.cta-band-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 2rem;
}

/* ============ FOOTER ============ */
.footer {
  background: #030508;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 1.2rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #FFFFFF;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--faint);
}

/* ============ COMPREHENSIVE RESPONSIVE MEDIA QUERIES (DESKTOP, IPAD, TABLET & MOBILE) ============ */

/* --- iPad Pro & Large Tablets (1024px - 1199px) --- */
@media (max-width: 1199px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 2.8rem;
  }
  .hero-left {
    max-width: 800px;
    margin-inline: auto;
    text-align: center;
  }
  .hero-desc {
    margin-inline: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-tags-strip {
    justify-content: center;
  }
  .server-card {
    max-width: 680px;
    margin-inline: auto;
  }
  .rules-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .systems-grid {
    grid-template-columns: 1fr 1fr;
  }
  .bento-card-wide {
    grid-column: 1 / -1;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2.5rem;
  }
}

/* --- iPad Air, iPad Mini & Portrait Tablets (768px - 1023px) --- */
@media (max-width: 1023px) {
  .section {
    padding: clamp(3rem, 6vw, 5rem) 0;
  }
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .stat-item:nth-child(4), .stat-item:nth-child(5) {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 0.8rem;
  }
  .story-box {
    grid-template-columns: 1fr;
  }
  .rules-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

/* --- Mobile Landscape & Large Phones (641px - 767px) --- */
@media (max-width: 767px) {
  .nav-links, .nav-actions .btn-discord {
    display: none;
  }
  .nav-actions .btn-primary {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
  }
  .menu-toggle {
    display: flex;
  }
  .hero-heading {
    font-size: clamp(2.4rem, 9.5vw, 3.8rem);
  }
  .hero-desc {
    font-size: 0.98rem;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .stat-item + .stat-item {
    border-left: none;
    padding-left: 0;
  }
  .stat-item:nth-child(3) {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 0.8rem;
  }
  .systems-grid {
    grid-template-columns: 1fr;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .rules-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* --- Smartphones & Mobile Screens (up to 640px) --- */
@media (max-width: 640px) {
  .container {
    padding-inline: 1.1rem;
  }
  .nav-inner {
    padding: 0.75rem 1rem;
  }
  .brand-text {
    font-size: 1.15rem;
  }
  .brand-logo {
    width: 32px;
    height: 32px;
  }
  .nav-actions .btn-primary {
    display: none; /* In mobile header, show only hamburger menu for maximum cleanliness */
  }
  .hero {
    padding: 6.5rem 0 3.5rem;
  }
  .hero-heading {
    font-size: clamp(2.2rem, 11vw, 3.2rem);
    line-height: 1;
    margin-bottom: 1rem;
  }
  .status-badge-pill {
    font-size: 0.76rem;
    padding: 0.35rem 0.85rem;
  }
  .hero-desc {
    font-size: 0.92rem;
    line-height: 1.65;
    margin-bottom: 1.6rem;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1.4rem;
  }
  .hero-tags-strip {
    flex-wrap: wrap;
    font-size: 0.72rem;
    gap: 0.4rem;
  }
  .server-card {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-md);
  }
  .f8-box {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    text-align: center;
  }
  .f8-command {
    word-break: break-all;
    font-size: 0.85rem;
  }
  .copy-btn {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 1rem;
  }
  .stat-num {
    font-size: 1.45rem;
  }
  .stat-label {
    font-size: 0.7rem;
  }
  .section-title {
    font-size: clamp(2rem, 7.5vw, 2.8rem);
  }
  .section-lead {
    font-size: 0.92rem;
  }
  .rule-card {
    padding: 1.2rem 1.1rem;
  }
  .rule-card-title {
    font-size: 1rem;
  }
  .rule-card-desc {
    font-size: 0.85rem;
  }
  /* Rule Modal on Mobile */
  .rule-modal-backdrop {
    padding: 0.6rem;
  }
  .rule-modal-container {
    max-height: 92vh;
    border-radius: var(--radius-md);
  }
  .rule-modal-header {
    padding: 1.1rem 1.1rem 0.8rem;
  }
  .rule-modal-title-wrap {
    gap: 0.65rem;
  }
  .rule-modal-icon {
    width: 36px;
    height: 36px;
  }
  .rule-modal-icon svg {
    width: 20px;
    height: 20px;
  }
  .rule-modal-title {
    font-size: 1.12rem;
  }
  .rule-modal-body {
    padding: 1.1rem;
    font-size: 0.9rem;
    line-height: 1.65;
  }
  .rule-modal-footer {
    padding: 0.8rem 1.1rem;
  }
  .rule-modal-footer .btn {
    width: 100%;
    justify-content: center;
  }
  /* FAQ on Mobile */
  .acc-trigger {
    padding: 1rem 1.1rem;
    font-size: 1.02rem;
    gap: 0.75rem;
  }
  .acc-content {
    padding: 0 1.1rem 1.1rem;
    font-size: 0.88rem;
    line-height: 1.6;
  }
  /* CTA Band on Mobile */
  .cta-band {
    padding: 2.2rem 1.1rem;
    margin-block: 2.5rem;
    border-radius: var(--radius-md);
  }
  .cta-band-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }
  .cta-band-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }
  .cta-band-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* --- Extra Small Screens / Small Phones (under 380px) --- */
@media (max-width: 380px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .hero-heading {
    font-size: 2.1rem;
  }
  .brand-text {
    font-size: 1rem;
  }
}

/* ==========================================================================
   ⭐ MULTI-PAGE & DISCORD FORUM INTEGRATION STYLES
   ========================================================================== */

/* --- Discord Sync Badge & Pulse Dot --- */
.discord-sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1.1rem;
  background: rgba(88, 101, 242, 0.12);
  border: 1px solid rgba(88, 101, 242, 0.35);
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #7983f5;
  letter-spacing: 0.08em;
  margin-bottom: 1.2rem;
  box-shadow: 0 0 15px rgba(88, 101, 242, 0.15);
}

.discord-sync-badge svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  animation: pulseDotAnim 1.8s infinite;
}

@keyframes pulseDotAnim {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 15px #22c55e; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* --- Search and Filter Control Bar --- */
.tales-control-bar {
  max-width: 900px;
  margin: 2.2rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  align-items: center;
}

.search-input-wrap {
  position: relative;
  width: 100%;
  max-width: 650px;
}

.search-icon {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.15rem;
  height: 1.15rem;
  color: var(--muted);
  pointer-events: none;
}

.search-input-wrap input {
  width: 100%;
  padding: 0.95rem 2.8rem 0.95rem 3.2rem;
  background: rgba(11, 15, 23, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  backdrop-filter: blur(10px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-input-wrap input:focus {
  border-color: var(--gold-bright);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
}

.clear-search-btn {
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
}

.tales-filters,
.social-filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.filter-chip {
  padding: 0.5rem 1.1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9999px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.filter-chip:hover {
  border-color: rgba(212, 175, 55, 0.4);
  color: var(--text);
  transform: translateY(-2px);
}

.filter-chip.active {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-bright);
  color: var(--gold-bright);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.25);
}

/* --- Character Tales Grid & Cards --- */
.tales-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin-top: 1rem;
}

.tale-card {
  background: rgba(11, 15, 23, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease, box-shadow 0.35s ease;
  backdrop-filter: blur(10px);
}

.tale-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-bright);
  box-shadow: 0 12px 35px rgba(212, 175, 55, 0.22);
}

.tale-card-media-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9.5;
  background: #090C12;
  overflow: hidden;
}

.tale-card-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.tale-card:hover .tale-card-media {
  transform: scale(1.05);
}

.tale-category-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  padding: 0.3rem 0.75rem;
  background: rgba(5, 7, 11, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  font-size: 0.75rem;
  color: var(--gold-bright);
  backdrop-filter: blur(4px);
  z-index: 2;
}

.tale-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(5, 7, 11, 0.85) 100%);
  pointer-events: none;
}

.tale-card-content {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.tale-author-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.tale-card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.tale-card-headline {
  font-size: 0.9rem;
  color: var(--gold-bright);
  font-weight: 600;
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

.tale-card-desc {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tale-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  margin-bottom: 1.2rem;
}

.tale-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-xs);
  color: #94a3b8;
}

.tale-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tale-stats {
  display: flex;
  gap: 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.tales-cta-box,
.social-cta-box {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.12) 0%, rgba(212, 175, 55, 0.1) 100%);
  border: 1px solid rgba(88, 101, 242, 0.3);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  margin-top: 4rem;
  position: relative;
  overflow: hidden;
}

.tales-cta-content,
.social-cta-content {
  max-width: 650px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

/* --- Tale Modal Customization --- */
.modal-tale-container {
  max-width: 860px;
  max-height: 88vh;
  height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.tale-modal-header {
  padding: 1.5rem 1.8rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  background: rgba(15, 20, 30, 0.95);
  backdrop-filter: blur(10px);
  z-index: 10;
}

.tale-modal-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-bright);
  border-radius: 9999px;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.tale-modal-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.tale-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.tale-chapters-badge {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  padding: 0.3rem 0.75rem;
  background: rgba(11, 15, 23, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 9999px;
  font-size: 0.72rem;
  color: var(--gold-bright);
  backdrop-filter: blur(4px);
  z-index: 2;
}

.tale-modal-body {
  padding: 1.75rem 2rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  font-size: 0.95rem;
  line-height: 1.8;
  color: #cbd5e1;
}

.tale-modal-media {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  overflow: hidden;
  background: #090C12;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tale-modal-media img,
.tale-modal-media video {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  display: block;
}

/* Chapters Timeline Feed */
.chapters-timeline-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.chapter-timeline-node {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
}

.chapter-badge-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.chapter-part-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--gold-bright);
  color: var(--gold-bright);
  border-radius: 4px;
}

.chapter-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.chapter-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.85rem;
}

.story-quote-box {
  border-left: 3px solid var(--gold-bright);
  padding: 0.6rem 1rem;
  margin: 0.85rem 0 1.2rem;
  background: rgba(212, 175, 55, 0.05);
  color: var(--text);
  font-style: italic;
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
}

.chapter-gallery-grid {
  display: grid;
  grid-template-columns: repeat(var(--gallery-cols, 2), 1fr);
  gap: 1rem;
  margin: 1.2rem 0;
}

.chapter-photo-box {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #000;
}

.chapter-photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-p {
  margin-bottom: 0.85rem;
  line-height: 1.8;
  color: #e2e8f0;
}

.story-p:last-child {
  margin-bottom: 0;
}

.chapter-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
}

.tale-modal-footer {
  padding: 1rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  gap: 1rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   ⭐ ROLES & FACTIONS STYLES (roles.html)
   ========================================================================== */
.roles-main-tabs {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin: 2.2rem auto 1.5rem;
  flex-wrap: wrap;
}

.main-tab-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.8rem;
  background: rgba(11, 15, 23, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}

.main-tab-btn:hover {
  transform: translateY(-3px);
  border-color: rgba(212, 175, 55, 0.5);
  color: var(--text);
}

.main-tab-btn.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.18) 0%, rgba(11, 15, 23, 0.95) 100%);
  border-color: var(--gold-bright);
  color: var(--text);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.22);
}

.main-tab-btn .tab-icon {
  font-size: 1.6rem;
}

.tab-title {
  display: block;
  font-weight: 700;
  font-size: 1rem;
}

.tab-sub {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.roles-sub-tabs {
  max-width: 950px;
  margin: 1.5rem auto 0;
  display: flex;
  justify-content: center;
}

.sub-tabs-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1.6rem;
  background: rgba(11, 15, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  backdrop-filter: blur(10px);
}

.sub-tabs-label {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sub-tabs-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

.sub-tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sub-tab-pill:hover {
  border-color: var(--sub-accent, #d4af37);
  color: var(--text);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.07);
}

.sub-tab-pill.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--sub-accent, #d4af37);
  color: #fff;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
}

.sub-pill-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--sub-accent, #d4af37);
  color: #000;
  letter-spacing: 0.05em;
}

.sub-pill-name {
  white-space: nowrap;
}

/* Role Detail Card */
.role-detail-card {
  background: rgba(11, 15, 23, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  backdrop-filter: blur(12px);
}

.role-header-banner {
  padding-left: 1.2rem;
  margin-bottom: 2rem;
}

.role-badge-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.role-org-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.role-org-desc {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
}

/* --- Interactive Organization Tree Chart Diagram --- */
.org-chart-wrapper {
  position: relative;
  width: 100%;
  overflow-x: auto;
  padding: 2.5rem 1rem 3.5rem;
  background: radial-gradient(circle at 50% 30%, rgba(212, 175, 55, 0.05) 0%, rgba(5, 7, 11, 0.8) 75%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.org-chart-scroll-hint {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.org-tree-root {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 750px;
  margin: 0 auto;
}

.org-tree-level {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: relative;
  margin-bottom: 1.5rem;
}

.level-header {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.9rem;
  background: rgba(11, 15, 23, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold-bright);
  margin-bottom: 1.2rem;
  z-index: 2;
}

.level-indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.org-members-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  position: relative;
  z-index: 2;
  margin-bottom: 2rem;
}

/* Connecting Vertical Line from Parent Card down */
.org-members-row::after {
  content: '';
  position: absolute;
  bottom: -2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 2rem;
  background: linear-gradient(180deg, var(--gold-bright) 0%, rgba(212, 175, 55, 0.4) 100%);
  z-index: 1;
}

/* Branch Lines (Connecting Line Fork) */
.org-tree-branch {
  display: flex;
  justify-content: center;
  gap: 2rem;
  position: relative;
  width: 100%;
  padding-top: 1.5rem;
}

.org-tree-branch::before {
  content: '';
  position: absolute;
  top: 0;
  left: calc(100% / (var(--cols, 2) * 2));
  right: calc(100% / (var(--cols, 2) * 2));
  height: 2px;
  background: rgba(212, 175, 55, 0.45);
}

.org-tree-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
}

.org-tree-col::before {
  content: '';
  position: absolute;
  top: -1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 1.5rem;
  background: rgba(212, 175, 55, 0.45);
}

/* --- Person Org Card --- */
.org-person-card {
  width: 230px;
  background: rgba(11, 15, 23, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 3px solid var(--org-color, #d4af37);
  border-radius: var(--radius);
  padding: 0.95rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  backdrop-filter: blur(10px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.org-person-card:hover {
  transform: translateY(-5px) scale(1.03);
  border-color: var(--org-color, #d4af37);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.25);
  z-index: 10;
}

.person-avatar-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 4.8;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 0.75rem;
  background: #090C12;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.person-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.4s ease;
}

.org-person-card:hover .person-avatar-wrap img {
  transform: scale(1.05);
}

.person-avatar-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 65%, rgba(11, 15, 23, 0.85) 100%);
  pointer-events: none;
}

.person-badge-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--org-color, #d4af37);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.4rem;
}

.person-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.person-rank {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold-bright);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.person-duty {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

/* Footer CTA */
.role-tree-footer-cta {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.12) 0%, rgba(212, 175, 55, 0.08) 100%);
  border: 1px solid rgba(88, 101, 242, 0.25);
  border-radius: var(--radius);
  padding: 2rem 2.2rem;
}

.cta-inner-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cta-text h3 {
  font-size: 1.25rem;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.cta-text p {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}

/* ==========================================================================
   ⭐ STORIES & TIMELINE (stories.html)
   ========================================================================== */
.season-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1.2rem;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--gold-bright);
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--gold-bright);
  letter-spacing: 0.08em;
  margin-bottom: 1.2rem;
}

.timeline-wrapper {
  position: relative;
  max-width: 900px;
  margin: 2rem auto 4rem;
  padding: 2rem 0;
}

.timeline-wrapper::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, rgba(212, 175, 55, 0.5) 20%, rgba(212, 175, 55, 0.5) 80%, transparent);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 1.5rem 2.5rem;
  box-sizing: border-box;
}

.timeline-left {
  left: 0;
  text-align: right;
}

.timeline-right {
  left: 50%;
  text-align: left;
}

.timeline-dot {
  position: absolute;
  top: 2rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--dot-color, #d4af37);
  box-shadow: 0 0 12px var(--dot-color, #d4af37);
  z-index: 2;
}

.timeline-left .timeline-dot {
  right: -7px;
}

.timeline-right .timeline-dot {
  left: -7px;
}

.timeline-content {
  background: rgba(11, 15, 23, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 1.5rem;
  backdrop-filter: blur(8px);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

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

.timeline-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.6rem;
}

.timeline-left .timeline-header {
  justify-content: flex-end;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
}

.timeline-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-weight: 600;
}

.timeline-title {
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.timeline-excerpt {
  font-size: 0.88rem;
  color: var(--gold-bright);
  margin-bottom: 0.6rem;
  line-height: 1.5;
}

.timeline-detail {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.6;
}

.discord-event-integration-box {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.75rem;
  background: rgba(88, 101, 242, 0.08);
  border: 1px solid rgba(88, 101, 242, 0.25);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.integration-icon {
  font-size: 2.5rem;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(88, 101, 242, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.discord-event-integration-box code {
  background: rgba(0, 0, 0, 0.4);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: var(--gold-bright);
  font-family: var(--font-mono);
}

/* ==========================================================================
   ⭐ SOCIAL & MEDIA (social.html)
   ========================================================================== */
.social-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.social-card {
  background: rgba(11, 15, 23, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-bright);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
}

.social-media-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #090C12;
  overflow: hidden;
}

.social-card-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.social-card:hover .social-card-media {
  transform: scale(1.06);
}

.social-cat-tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.65rem;
  background: rgba(5, 7, 11, 0.85);
  border-radius: 9999px;
  font-size: 0.72rem;
  color: var(--gold-bright);
  z-index: 2;
}

.social-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.social-card:hover .social-overlay {
  opacity: 1;
}

.social-click-hint {
  font-size: 0.82rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.75);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
}

.social-info-box {
  padding: 1.25rem;
}

.social-author-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.social-post-title {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.social-post-caption {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0.85rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.social-post-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Lightbox Modal */
.modal-lightbox-container {
  max-width: 900px;
  padding: 0;
  overflow: hidden;
}

.lightbox-media-wrap {
  width: 100%;
  max-height: 520px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-media-wrap img,
.lightbox-media-wrap video {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
}

.lightbox-info {
  padding: 1.4rem 1.75rem;
  background: #0B0F17;
}

.lightbox-info h3 {
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.lightbox-info p {
  font-size: 0.9rem;
  color: #cbd5e1;
  margin-bottom: 0.75rem;
}

.lightbox-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ==========================================================================
   ⭐ WHITELIST PORTAL (whitelist.html)
   ========================================================================== */
.whitelist-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 950px;
  margin: 2.5rem auto 0;
}

.step-card {
  background: rgba(11, 15, 23, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 1.75rem 1.4rem;
  text-align: left;
  position: relative;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

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

.step-num {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 800;
  color: rgba(212, 175, 55, 0.3);
  margin-bottom: 0.4rem;
}

.step-card h4 {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.step-card p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.whitelist-action-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.whitelist-box {
  background: rgba(11, 15, 23, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  backdrop-filter: blur(12px);
}

.box-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold-bright);
  letter-spacing: 0.1em;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.checklist li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: #cbd5e1;
}

.checklist svg {
  width: 1.1rem;
  height: 1.1rem;
  color: #22c55e;
  flex-shrink: 0;
}

.status-search-form {
  display: flex;
  gap: 0.75rem;
}

.status-input {
  flex-grow: 1;
  padding: 0.85rem 1.1rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
}

.status-input:focus {
  border-color: var(--gold-bright);
}

.status-checking {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--muted);
}

.status-card-result {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-sm);
  padding: 1.2rem;
}

.status-badge-approved {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #22c55e;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.status-card-result h4 {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.status-card-result p {
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.status-note {
  font-size: 0.78rem !important;
  color: var(--muted) !important;
  margin-top: 0.6rem;
}

/* ==========================================================================
   ⭐ RESPONSIVE FOR NEW PAGES (Mobile & Tablet)
   ========================================================================== */
@media (max-width: 1024px) {
  .tales-grid,
  .social-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .role-body-grid {
    grid-template-columns: 1fr;
  }
  .whitelist-action-grid {
    grid-template-columns: 1fr;
  }
  .whitelist-steps-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .tales-grid,
  .social-grid {
    grid-template-columns: 1fr;
  }
  .timeline-wrapper::before {
    left: 20px;
  }
  .timeline-item {
    width: 100%;
    left: 0 !important;
    padding-left: 45px;
    padding-right: 0;
    text-align: left !important;
  }
  .timeline-dot {
    left: 13px !important;
  }
  .timeline-header {
    justify-content: flex-start !important;
  }
  .status-search-form {
    flex-direction: column;
  }
  .org-rank-item {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
}

