@import url('https://fonts.googleapis.com/css2?family=Lilita+One&family=Nunito:wght@400;600;700;800&family=Cinzel:wght@700&display=swap');

:root {
  /* Core Dungeon Slate & Obsidian Palette (Deep, dark, high contrast) */
  --bg-deep: #05070c;
  --bg-surface: #0c1018;
  --bg-surface-elevated: #111622;
  --bg-surface-translucent: rgba(12, 16, 24, 0.96);
  --border-tactical: #1c2536;
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-highlight: rgba(230, 138, 30, 0.4);

  /* Rich Golden Amber & Torchlight Gold (High contrast, bold, easy to read) */
  --color-amber: #e68a1e;
  --color-amber-light: #ffb13b;
  --color-amber-glow: #f0b548;
  --color-amber-deep: #965608;

  /* Royal Spider Banner Plum / Wine */
  --color-banner-plum: #4a183f;
  --color-banner-wine: #682357;
  --color-banner-deep: #2e0e29;

  /* Tactical Mana Cyan (from splashscreen loading bar) */
  --color-cyan: #00c2ff;
  --color-cyan-glow: #38bdf8;
  --color-cyan-deep: #0284c7;

  /* Crisp, Balanced Typography (Maximum legibility against dark slate) */
  --color-cream: #edf0f7;
  --color-muted: #9aa5b8;
  --color-text-secondary: #cdd5e3;

  /* Combat Role Accents */
  --color-frontliner: #f43f5e;
  --color-frontliner-bg: rgba(244, 63, 94, 0.12);
  --color-ranged: #0284c7;
  --color-ranged-bg: rgba(2, 132, 199, 0.12);
  --color-specialist: #10b981;
  --color-specialist-bg: rgba(16, 185, 129, 0.12);
  --color-spellcaster: #8b5cf6;
  --color-spellcaster-bg: rgba(139, 92, 246, 0.12);

  /* Legacy aliases for backwards compatibility */
  --color-gold: var(--color-amber);
  --color-gold-light: var(--color-amber-light);
  --color-gold-bright: var(--color-amber-glow);
  --color-gold-deep: var(--color-amber-deep);
  --color-stone: var(--bg-deep);
  --color-stone-dark: #030407;
  --color-wood: var(--bg-surface);
  --color-wood-dark: #080a10;
  --color-wood-deepest: #030407;
  --color-wood-border: var(--border-tactical);
}

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

* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-amber-deep) #0c1018;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0c1018;
}

::-webkit-scrollbar-thumb {
  background-color: var(--color-amber-deep);
  border-radius: 4px;
}

html {
  background-color: #05070c;
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(74, 24, 63, 0.15) 0%, transparent 65%),
    linear-gradient(rgba(255, 255, 255, 0.01) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.01) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
  color: var(--color-cream);
  font-family: 'Nunito', sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  line-height: 1.6;
}

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

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

/* Typography Utility Classes */
.font-display {
  font-family: 'Lilita One', cursive;
  letter-spacing: 0.02em;
}

.font-label {
  font-family: 'Cinzel', serif;
}

.font-body {
  font-family: 'Nunito', sans-serif;
}

/* Textures & Panels */
.stone-bg {
  background-color: var(--bg-deep);
}

.wood-panel {
  background: var(--bg-surface-translucent);
  border: 1px solid var(--border-tactical);
  border-top: 1px solid var(--border-highlight);
  border-radius: 12px;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* Modern Clean Gaming Buttons (No fuzzy glow) */
.game-btn {
  font-family: 'Lilita One', cursive;
  background: #182030;
  border: 1px solid var(--border-tactical);
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
  color: var(--color-cream);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0.7rem 1.6rem;
  font-size: 0.95rem;
  position: relative;
  text-decoration: none;
}

.game-btn:hover {
  background: #222d42;
  border-color: #3f4e6e;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

.game-btn:active {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* Primary CTA: Rich Burnished Fantasy Gold (Strong contrast, no neon glare) */
.game-btn-gold {
  background: linear-gradient(180deg, #c7861b 0%, #945708 100%);
  border: 1px solid rgba(255, 215, 120, 0.4);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.game-btn-gold:hover {
  background: linear-gradient(180deg, #d99624 0%, #a3620c 100%);
  border-color: rgba(255, 230, 150, 0.65);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  color: #ffffff;
}

.game-btn-gold:active {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.game-btn-discord {
  background: #5865f2;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
}

.game-btn-discord:hover {
  background: #4752c4;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  color: #ffffff;
}

.game-btn-discord:active {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* Animations */
@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes scrollLine {
  0% {
    transform: translateY(-100%);
  }

  60% {
    transform: translateY(250%);
  }

  100% {
    transform: translateY(250%);
  }
}

/* Layout Containers */
.site-container {
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Navigation Header */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.3s ease, border-bottom 0.3s ease, box-shadow 0.3s ease;
  background: transparent;
}

.site-nav.scrolled {
  background: rgba(9, 12, 20, 0.88);
  border-bottom: 1px solid var(--border-tactical);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(14px);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-amber-light);
  font-size: 1.35rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  transition: opacity 0.2s ease;
}

.nav-brand:hover {
  opacity: 0.9;
}

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

.nav-link {
  font-family: 'Lilita One', cursive;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  text-transform: uppercase;
}

.nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-cta {
  font-family: 'Lilita One', cursive;
  background: linear-gradient(180deg, #c7861b 0%, #945708 100%);
  border: 1px solid rgba(255, 215, 120, 0.4);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  padding: 0.45rem 1.15rem;
  border-radius: 6px;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
}

.nav-cta:hover {
  background: linear-gradient(180deg, #d99624 0%, #a3620c 100%);
  border-color: rgba(255, 230, 150, 0.65);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
  color: #ffffff;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding-top: 4rem;
  padding-bottom: 14vh;
}

.hero-bg-wrapper {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transform: scale(1.06);
  transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  image-rendering: -webkit-optimize-contrast;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 35%, rgba(5, 7, 12, 0.08) 0%, rgba(5, 7, 12, 0.55) 75%, #05070c 100%),
    linear-gradient(180deg, rgba(5, 7, 12, 0.6) 0%, transparent 20%, transparent 70%, #05070c 100%);
  pointer-events: none;
}

.hero-corner {
  position: absolute;
  width: 5rem;
  height: 5rem;
  opacity: 0.45;
  z-index: 2;
  pointer-events: none;
}

.hero-corner-tl {
  top: 0;
  left: 0;
  background: rgba(18, 22, 34, 0.6);
  border-right: 1px solid var(--border-tactical);
  border-bottom: 1px solid var(--border-tactical);
}

.hero-corner-tr {
  top: 0;
  right: 0;
  background: rgba(18, 22, 34, 0.6);
  border-left: 1px solid var(--border-tactical);
  border-bottom: 1px solid var(--border-tactical);
}

.hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem;
  margin-top: -15vh;
}

.hero-logo {
  height: clamp(5.2rem, 14.4vw, 12rem);
  width: auto;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.9));
  animation: float 4s ease-in-out infinite;
}

.hero-tagline {
  color: var(--color-cream);
  font-size: clamp(1.4rem, 3.2vw, 2.25rem);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.95), 0 1px 4px rgba(0, 0, 0, 0.9);
  line-height: 1.3;
  margin-bottom: 2rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  right: 2.5rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.scroll-indicator-track {
  width: 3px;
  height: 40px;
  overflow: hidden;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
}

.scroll-indicator-bar {
  width: 100%;
  height: 45%;
  border-radius: 9999px;
  background: var(--color-amber-light);
  animation: scrollLine 2s ease-in-out infinite;
}

/* Section Header Divider */
.section-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 3.5rem;
}

.section-diamond {
  display: none;
}

.section-title {
  color: var(--color-amber-light);
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  white-space: nowrap;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 1px 3px rgba(0, 0, 0, 0.9);
}

.section-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-tactical) 0%, rgba(217, 130, 43, 0.35) 50%, var(--border-tactical) 100%);
  opacity: 0.7;
}

/* Game Overview Section */
.game-section {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

.game-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 768px) {
  .game-grid {
    grid-template-columns: 0.92fr 1.08fr;
    gap: 3.5rem;
    align-items: center;
  }
}

.phone-mockup-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

.phone-img {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: auto;
  max-height: 740px;
  object-fit: contain;
  filter: drop-shadow(0 18px 48px rgba(0, 0, 0, 0.9));
}

.game-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.game-headline {
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  color: var(--color-amber-light);
  letter-spacing: 0.03em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 1px 3px rgba(0, 0, 0, 0.9);
  line-height: 1;
  margin-bottom: 1rem;
}

.game-desc {
  font-size: 0.95rem;
  color: var(--color-cream);
  opacity: 0.9;
  line-height: 1.7;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.feature-card {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: border-color 0.2s ease;
}

.feature-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
}

.feature-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feature-icon {
  font-size: 1.25rem;
}

.feature-label {
  color: var(--color-amber-light);
  font-size: 0.95rem;
}

.feature-text {
  font-size: 0.8rem;
  color: var(--color-muted);
  line-height: 1.5;
}

/* Unit Gallery Section */
.units-section {
  padding-top: 6rem;
  padding-bottom: 6rem;
  border-top: 1px solid var(--border-tactical);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.filter-btn {
  font-family: 'Lilita One', cursive;
  padding: 0.6rem 1.3rem;
  border-radius: 8px;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.18s ease;
  background: #141926;
  border: 1px solid var(--border-tactical);
  color: var(--color-muted);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.filter-btn:hover {
  color: #ffffff;
  border-color: #3b4964;
  background: #1c2335;
}

.filter-btn[data-filter="All"].active {
  background: linear-gradient(180deg, #c7861b 0%, #945708 100%);
  border-color: rgba(255, 215, 120, 0.5);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.filter-btn[data-filter="Frontliner"].active {
  background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%);
  border-color: #fca5a5;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.filter-btn[data-filter="Ranged"].active {
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
  border-color: #7dd3fc;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.filter-btn[data-filter="Specialist"].active {
  background: linear-gradient(180deg, #059669 0%, #065f46 100%);
  border-color: #6ee7b7;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.filter-btn[data-filter="Spellcaster"].active {
  background: linear-gradient(180deg, #7c3aed 0%, #5b21b6 100%);
  border-color: #c4b5fd;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.unit-counter {
  margin-left: auto;
  color: var(--color-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.units-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

@media (max-width: 1024px) {
  .units-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .units-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.unit-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  cursor: pointer;
  background: rgba(18, 22, 34, 0.9);
  border: 1px solid var(--border-tactical);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.unit-card:hover {
  border-color: rgba(217, 130, 43, 0.6);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.card-abilities-preview {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 0.7rem;
  flex-wrap: wrap;
}

.card-ability-pill {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0d1017;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(217, 130, 43, 0.35);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  flex-shrink: 0;
}

.card-ability-pill:hover {
  transform: scale(1.15);
  border-color: var(--color-amber-light);
  box-shadow: 0 0 8px rgba(217, 130, 43, 0.6);
}

.card-ability-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.card-inspect-hint {
  font-size: 0.72rem;
  color: var(--color-amber-light);
  text-align: center;
  margin-top: 0.65rem;
  letter-spacing: 0.05em;
  opacity: 0.8;
  transition: opacity 0.15s ease;
}

.unit-card:hover .card-inspect-hint {
  opacity: 1;
  text-decoration: underline;
}

/* Hero Codex Modal Dialog */
.hero-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 14, 0.88);
  backdrop-filter: blur(12px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease-in-out;
}

.hero-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.game-modal-frame {
  position: relative;
  width: 100%;
  max-width: 410px;
  background: #111522;
  border: 1px solid var(--border-tactical);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.9);
  padding: 20px 18px 18px 18px;
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 94vh;
  overflow-y: auto;
}

.hero-modal-backdrop.open .game-modal-frame {
  transform: scale(1);
}

/* Close Button */
.game-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-tactical);
  color: var(--color-muted);
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.15s ease;
}

.game-modal-close:hover {
  transform: scale(1.05);
  background: rgba(239, 68, 68, 0.25);
  border-color: var(--color-frontliner);
  color: #ffffff;
}

/* Modal Title */
.game-modal-title {
  text-align: center;
  font-size: 1.75rem;
  color: var(--color-amber-light);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 1px 3px rgba(0, 0, 0, 0.9);
  margin: 0 0 14px 0;
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-transform: uppercase;
}

/* Top Section: Left Portrait/Backpack + Right Stats Grid */
.game-modal-top {
  display: grid;
  grid-template-columns: 114px 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

/* Left Column: Portrait */
.game-modal-char-col {
  display: flex;
  flex-direction: column;
}

.game-modal-portrait-box {
  background: #0d1017;
  border: 1px solid var(--border-tactical);
  border-radius: 10px;
  height: 100%;
  min-height: 154px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.6);
  padding: 6px;
}

.game-modal-portrait-img {
  max-width: 92%;
  max-height: 92%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center center;
  margin: auto;
  display: block;
}

/* Right Column: 6 Ingame Stats Grid */
.game-stats-grid {
  background: #0d1017;
  border: 1px solid var(--border-tactical);
  border-radius: 10px;
  padding: 8px 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

.game-stat-badge {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 46px;
}

.game-stat-icon {
  position: absolute;
  left: -2px;
  width: 34px;
  height: 34px;
  object-fit: contain;
  z-index: 2;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
  pointer-events: none;
}

.game-stat-box {
  margin-left: 18px;
  flex: 1;
  background: #141a26;
  border-radius: 6px;
  padding: 2px 4px 3px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-tactical);
}

.game-stat-label {
  font-family: 'Lilita One', cursive;
  font-size: 0.72rem;
  color: var(--color-muted);
  letter-spacing: 0.06em;
  line-height: 1;
  margin-bottom: 2px;
}

.game-stat-val {
  font-family: 'Lilita One', cursive;
  font-size: 1.1rem;
  color: #ffffff;
  line-height: 1;
}

/* Equipment View Container (Dedicated container right above description) */
.game-modal-equipment-box {
  display: block !important;
  background: #0d1017;
  border: 1px solid var(--border-tactical);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

.equipment-title {
  font-size: 0.72rem;
  color: var(--color-amber-light);
  letter-spacing: 0.08em;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.equipment-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.equipment-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
}

.equipment-slot {
  color: var(--color-amber);
  font-size: 0.74rem;
  font-weight: 600;
}

.equipment-name {
  color: var(--color-cream);
  font-size: 0.82rem;
}

/* Description Box */
.game-modal-desc-box {
  background: #0d1017;
  border: 1px solid var(--border-tactical);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  min-height: 80px;
  max-height: 110px;
  overflow-y: auto;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

.game-modal-desc-text {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--color-cream);
  margin: 0;
}

/* Special Actions Banner & Box */
.game-actions-banner {
  background: #141926;
  border: 1px solid var(--border-tactical);
  border-radius: 8px;
  padding: 7px 10px;
  text-align: center;
  color: var(--color-amber-light);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.game-actions-banner-sub {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--color-gold-light);
  margin-left: 6px;
  opacity: 0.85;
}

.game-actions-box {
  background: #0d1017;
  border: 1px solid var(--border-tactical);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 12px;
  min-height: 70px;
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

.game-action-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(22, 28, 40, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  user-select: none;
}

.game-action-item:hover,
.game-action-item:focus-visible {
  background: rgba(30, 38, 56, 0.9);
  border-color: rgba(217, 130, 43, 0.6);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  transform: translateY(-1px);
  outline: none;
}

.game-action-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.game-action-item:hover .game-action-circle {
  transform: scale(1.06);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}

.action-sprite-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
  display: block;
}

.action-svg-icon {
  width: 20px;
  height: 20px;
  color: var(--color-amber-light);
}

.game-action-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.game-action-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.game-action-name {
  color: #ffffff;
  font-size: 0.95rem;
  line-height: 1.1;
}

.game-action-tag {
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 4px;
  background-color: rgba(217, 130, 43, 0.15);
  border: 1px solid rgba(217, 130, 43, 0.4);
  color: var(--color-amber-light);
  font-weight: 700;
}

.game-action-tag.passive {
  background-color: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.game-action-desc {
  font-size: 0.78rem;
  color: var(--color-muted);
  line-height: 1.4;
  margin: 0;
}

.game-action-play-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(217, 130, 43, 0.12);
  border: 1px solid rgba(217, 130, 43, 0.35);
  color: var(--color-amber-light);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.action-play-icon {
  width: 9px;
  height: 9px;
}

.game-action-item:hover .game-action-play-pill {
  background: var(--color-amber-primary);
  color: #111522;
  border-color: var(--color-amber-primary);
  transform: scale(1.04);
  box-shadow: none;
}

/* Ability GIF Preview Modal (Layered above Hero Codex) */
.ability-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.ability-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.ability-modal-frame {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #111522;
  border: 1px solid var(--border-tactical);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.95);
  padding: 20px 18px 18px 18px;
  display: flex;
  flex-direction: column;
  transform: scale(0.92);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 92vh;
  overflow-y: auto;
}

.ability-modal-backdrop.open .ability-modal-frame {
  transform: scale(1);
}

.ability-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-tactical);
  color: var(--color-muted);
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.15s ease;
}

.ability-modal-close:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.6);
  color: #fca5a5;
  transform: scale(1.06);
}

.ability-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-right: 36px;
}

.ability-modal-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.ability-modal-icon-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
  display: block;
}

.ability-modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ability-modal-title {
  color: #ffffff;
  font-size: 1.25rem;
  line-height: 1.1;
  margin: 0;
  letter-spacing: 0.04em;
}

/* GIF Media Screen */
.ability-gif-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 380px;
  background: #080a10;
  border: 1px solid var(--border-tactical);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 0 24px rgba(0, 0, 0, 0.8),
    0 8px 24px rgba(0, 0, 0, 0.5);
}

.ability-gif-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.ability-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg,
      rgba(0, 0, 0, 0.12) 0px,
      rgba(0, 0, 0, 0.12) 1px,
      transparent 1px,
      transparent 3px);
  opacity: 0.45;
}

/* Loading & Fallback */
.ability-gif-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--color-amber-light);
  padding: 2rem;
  text-align: center;
}

.tactical-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(217, 130, 43, 0.2);
  border-top-color: var(--color-amber-light);
  border-radius: 50%;
  animation: tactical-spin 0.8s linear infinite;
}

@keyframes tactical-spin {
  to {
    transform: rotate(360deg);
  }
}

.loader-text {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--color-amber-light);
}

.ability-gif-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  gap: 10px;
}

.fallback-radar-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px dashed rgba(217, 130, 43, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  box-shadow: 0 0 16px rgba(217, 130, 43, 0.15);
  animation: radar-rotate 12s linear infinite;
}

@keyframes radar-rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.fallback-icon-img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: contain;
}

.fallback-heading {
  color: #ffffff;
  font-size: 0.98rem;
  letter-spacing: 0.05em;
  margin: 0;
}

.fallback-sub {
  color: var(--color-muted);
  font-size: 0.78rem;
  line-height: 1.4;
  max-width: 300px;
  margin: 0;
}

.fallback-badge {
  margin-top: 4px;
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(217, 130, 43, 0.15);
  border: 1px solid rgba(217, 130, 43, 0.4);
  color: var(--color-amber-light);
  font-weight: 700;
}

/* Description & Footer */
.ability-modal-desc-box {
  margin-top: 12px;
  background: #0d1017;
  border: 1px solid var(--border-tactical);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.ability-modal-desc-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  margin-bottom: 4px;
}

.ability-modal-desc {
  color: var(--color-cream);
  font-size: 0.85rem;
  line-height: 1.45;
  margin: 0;
}

.ability-modal-footer {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

/* Bottom Try It Button */
.game-try-btn {
  align-self: center;
  width: 60%;
  background: #a3620c;
  border: 1px solid rgba(255, 215, 120, 0.4);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  padding: 8px 0;
  text-align: center;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.18s ease;
}

.game-try-btn:hover {
  background: #b87010;
  border-color: rgba(255, 230, 150, 0.65);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

.unit-card.hidden {
  display: none;
}

.unit-portrait {
  height: 190px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-tactical);
  overflow: hidden;
  background: radial-gradient(circle at center, #1a2233 0%, #0d111a 100%);
}

.unit-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  transition: transform 0.22s ease;
  pointer-events: none;
}

.unit-card:hover .unit-portrait-img {
  transform: scale(1.08);
}

.unit-lvl-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(9, 12, 20, 0.85);
  border: 1px solid var(--border-tactical);
  color: var(--color-amber-light);
  z-index: 3;
}

.unit-info {
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.unit-name {
  color: var(--color-cream);
  font-size: 1.15rem;
  line-height: 1;
}

.unit-badge {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  align-self: flex-start;
  font-weight: 700;
}

.badge-frontliner {
  background: var(--color-frontliner-bg);
  border: 1px solid var(--color-frontliner);
  color: #fca5a5;
}

.badge-ranged {
  background: var(--color-ranged-bg);
  border: 1px solid var(--color-ranged);
  color: #7dd3fc;
}

.badge-specialist {
  background: var(--color-specialist-bg);
  border: 1px solid var(--color-specialist);
  color: #6ee7b7;
}

.badge-spellcaster {
  background: var(--color-spellcaster-bg);
  border: 1px solid var(--color-spellcaster);
  color: #c4b5fd;
}

.unit-desc {
  font-size: 0.8rem;
  color: var(--color-muted);
  line-height: 1.5;
  margin-top: 0.55rem;
  flex: 1;
}

/* About Studio Section */
.about-section {
  padding-top: 6rem;
  padding-bottom: 6rem;
  border-top: 1px solid var(--border-tactical);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1.2fr 1fr;
  }
}

.manifesto-panel {
  padding: 2.2rem;
}

.manifesto-title {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  color: var(--color-cream);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 1px 3px rgba(0, 0, 0, 0.9);
}

.manifesto-text {
  font-size: 0.95rem;
  color: var(--color-cream);
  opacity: 0.88;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 1.5rem;
}

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-card {
  padding: 1rem 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  background: rgba(18, 22, 34, 0.75);
  border: 1px solid var(--border-tactical);
  border-radius: 8px;
  transition: border-color 0.15s ease;
}

.stat-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
}

.stat-card-icon {
  font-size: 1.4rem;
}

.stat-card-val {
  color: var(--color-amber-light);
  font-size: 1.35rem;
  line-height: 1.2;
}

.stat-card-label {
  color: var(--color-muted);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.3;
}

.about-shot-panel {
  padding: 0;
  overflow: hidden;
  position: relative;
  border-radius: 12px;
}

.about-shot-img {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  object-position: center top;
}

.about-shot-overlay {
  position: absolute;
  inset: 0;
  background: rgba(9, 12, 20, 0.35);
}

.about-shot-badge {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 4px;
  background: rgba(9, 12, 20, 0.92);
  border: 1px solid var(--border-tactical);
  color: var(--color-amber-light);
}

/* Site Footer */
.site-footer {
  border-top: 1px solid var(--border-tactical);
  background: #06080e;
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
  }
}

.footer-brand {
  color: var(--color-amber-light);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
}

.footer-copy {
  color: var(--color-muted);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.footer-link {
  font-family: 'Lilita One', cursive;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-muted);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.footer-link:hover {
  color: var(--color-amber-light);
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.08);
}

/* Dedicated About Page Styles */
.about-page-hero {
  padding-top: 8rem;
  padding-bottom: 4rem;
  text-align: center;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.team-card {
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(18, 22, 34, 0.85);
  border: 1px solid var(--border-tactical);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.team-card:hover {
  border-color: rgba(217, 130, 43, 0.6);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.65);
}

.team-avatar {
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 9999px;
  overflow: hidden;
  border: 2px solid var(--color-amber);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  margin-bottom: 1.25rem;
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-name {
  color: var(--color-amber-light);
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95), 0 1px 2px rgba(0, 0, 0, 0.9);
}

.team-role {
  color: var(--color-muted);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.team-bio {
  font-size: 0.88rem;
  color: var(--color-cream);
  opacity: 0.9;
  line-height: 1.6;
}

.connect-panel {
  padding: 3rem 2rem;
  text-align: center;
  margin-top: 4rem;
  margin-bottom: 6rem;
}

/* Content / Legal Pages */
.legal-page-content {
  max-width: 800px;
  margin: 8rem auto 6rem auto;
  padding: 2.5rem;
}

.legal-page-content h1 {
  font-family: 'Lilita One', cursive;
  color: var(--color-amber-light);
  font-size: 2.4rem;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95), 0 1px 2px rgba(0, 0, 0, 0.9);
}

.legal-page-content h2 {
  font-family: 'Lilita One', cursive;
  color: var(--color-amber-light);
  font-size: 1.6rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95), 0 1px 2px rgba(0, 0, 0, 0.9);
}

.legal-page-content p,
.legal-page-content ul {
  font-size: 0.95rem;
  color: var(--color-cream);
  opacity: 0.9;
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.legal-page-content ul {
  padding-left: 1.5rem;
}

.legal-page-content a {
  color: var(--color-amber-light);
  text-decoration: underline;
}