/* ==========================================================================
   KACHIX CLAN PORTAL — DESIGN SYSTEM STYLESHEET (v2 TACTICAL BESPOKE)
   Features real-time style switcher support for v1 (Classic) & v2 (Tactical)
   ========================================================================== */

:root {
  /* Tactical Palette (v2 Bespoke) */
  --color-brand-crimson: #ef233c;
  --color-brand-crimson-text: #ff5c77;
  --color-brand-crimson-hover: #d90429;
  --color-brand-crimson-glow: rgba(239, 35, 60, 0.25);
  --color-obsidian-void: #070709;
  --color-obsidian-surface: #0e0e12;
  --color-obsidian-elevated: #14141a;
  --color-obsidian-hud: #0a0a0d;
  --color-border-subtle: rgba(255, 255, 255, 0.07);
  --color-border-crimson: rgba(239, 35, 60, 0.4);
  --color-text-primary: #ffffff;
  --color-text-secondary: #dcdce2;
  --color-text-muted: #7c7c8e;

  --font-display: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Tactical Sharp Geometry */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --radius-pill: 9999px;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================
   CLASSIC (v1) OVERRIDES FOR TOGGLE SWITCH
   ========================================== */
body.theme-classic {
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --color-brand-crimson-glow: rgba(239, 35, 60, 0.55);
}

body.theme-classic .tryouts-card {
  background: linear-gradient(135deg, rgba(239, 35, 60, 0.1) 0%, rgba(15, 15, 20, 0.95) 100%);
  border-radius: var(--radius-xl);
}

body.theme-classic .btn-primary-glow {
  box-shadow: 0 4px 22px var(--color-brand-crimson-glow);
}

body.theme-classic .glass-panel {
  border-radius: var(--radius-lg);
}

/* ==========================================
   BASE & RESET
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: radial-gradient(circle at 50% 5%, rgba(239, 35, 60, 0.06) 0%, transparent 55%),
              var(--color-obsidian-void);
  background-attachment: fixed;
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  line-height: 1.5;
}

body {
  min-height: 100vh;
  padding-top: 66px; /* Offset for permanently fixed top navbar */
  overflow-x: hidden;
  background: transparent;
  display: flex;
  flex-direction: column;
}

/* WCAG 2.1 AA Focus Rings */
:focus-visible {
  outline: 2px solid var(--color-brand-crimson);
  outline-offset: 3px;
}

/* Accessibility Skip Navigation Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--color-brand-crimson);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  z-index: 10000;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(239, 35, 60, 0.6);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* Screen Reader Only Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

::selection {
  background-color: rgba(239, 35, 60, 0.35);
  color: #ffffff;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-text-primary);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Tactical Glass Panels (De-AI-ified) */
.glass-panel {
  background: var(--color-obsidian-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color var(--transition-fast), transform var(--transition-normal);
}

.glass-panel:hover {
  border-color: var(--color-border-crimson);
  transform: translateY(-2px);
}

/* Directional Specular Buttons (De-AI-ified) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

/* Tactical Beveled Specular Button (No blurry neon cloud) */
.btn-primary-glow {
  background: linear-gradient(180deg, #ef233c 0%, #c41227 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3),
              0 4px 14px rgba(0, 0, 0, 0.5),
              0 2px 8px var(--color-brand-crimson-glow);
}

.btn-primary-glow:hover {
  background: linear-gradient(180deg, #ff3850 0%, #d90429 100%);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4),
              0 6px 18px rgba(0, 0, 0, 0.6),
              0 4px 16px rgba(239, 35, 60, 0.4);
}

.btn-primary-glow:active {
  transform: scale(0.98);
}

.btn-secondary-glass {
  background: rgba(20, 20, 26, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border-subtle);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.btn-secondary-glass:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  background: rgba(28, 28, 36, 0.85);
  transform: translateY(-1px);
}

/* ==========================================
   TOP NAVBAR & SCROLLSPY
   ========================================== */
.navbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;
  background: #08080c !important; /* Fully opaque obsidian - flowers never bleed through */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border-subtle);
  padding: 12px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.85);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-emblem {
  width: 36px;
  height: 36px;
  background: #000;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border-crimson);
  box-shadow: 0 0 14px rgba(239, 35, 60, 0.4);
  overflow: hidden;
  flex-shrink: 0;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--color-text-primary);
  letter-spacing: 0.08em;
}

.brand-tag {
  color: var(--color-brand-crimson-text);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  margin-left: 4px;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
  padding: 8px 12px;
  position: relative;
  border-top: 3px solid transparent;
}

.nav-link:hover {
  color: var(--color-text-primary);
}

/* Active Scrollspy Tab Highlight - Permanent Red Bar Above Section Tab */
.nav-link.active {
  color: #ffffff !important;
  border-top: 3px solid #ff3355 !important;
  background: rgba(239, 35, 60, 0.12) !important;
  box-shadow: 0 0 16px rgba(239, 35, 60, 0.5), inset 0 2px 0 0 #ff3355 !important;
  text-shadow: 0 0 10px rgba(239, 35, 60, 0.75);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #ff3355 !important;
  box-shadow: 0 0 12px rgba(239, 35, 60, 1), 0 0 4px #ffffff;
  border-radius: 2px 2px 0 0;
  opacity: 1 !important;
  pointer-events: none;
  z-index: 10;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-search {
  position: relative;
  display: none;
}

.nav-search {
  position: relative;
  display: none;
}

@media (min-width: 920px) {
  .nav-search {
    display: flex;
    align-items: center;
  }
}

.nav-search input {
  background: rgba(18, 18, 24, 0.9);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 64px 8px 32px;
  font-size: 0.8125rem;
  color: var(--color-text-primary);
  width: 210px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-search:hover input {
  border-color: var(--color-brand-crimson);
  background: #14141c;
}

.nav-search-kbd {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--color-border-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
}

.nav-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
  font-size: 0.85rem;
}

.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-subtle);
  background: rgba(18, 18, 24, 0.9);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.hamburger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 2px;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, background 0.2s ease;
  transform-origin: center;
}

/* Tactical Hamburger ☰ to ✕ Morph */
.hamburger-btn.active {
  border-color: var(--color-brand-crimson);
  background: rgba(239, 35, 60, 0.12);
}

.hamburger-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--color-brand-crimson);
}

.hamburger-btn.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--color-brand-crimson);
}

@media (max-width: 860px) {
  .nav-links {
    display: none;
  }
  .hamburger-btn {
    display: flex;
  }
}

/* Mobile Navigation Drawer with Staggered Link Drop */
.mobile-drawer {
  display: flex;
  position: fixed;
  top: 61px;
  left: 0;
  right: 0;
  background: rgba(10, 10, 14, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border-crimson);
  padding: 24px 20px;
  z-index: 99;
  flex-direction: column;
  gap: 16px;
  transform: translateY(-115%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.mobile-drawer.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer a {
  font-size: 1.05rem;
  font-family: var(--font-display);
  font-weight: 700;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border-subtle);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-drawer.open a {
  opacity: 1;
  transform: translateY(0);
}

.mobile-drawer.open a:nth-child(1) { transition-delay: 0.05s; }
.mobile-drawer.open a:nth-child(2) { transition-delay: 0.10s; }
.mobile-drawer.open a:nth-child(3) { transition-delay: 0.15s; }
.mobile-drawer.open a:nth-child(4) { transition-delay: 0.20s; }
.mobile-drawer.open a:nth-child(5) { transition-delay: 0.25s; }

.mobile-drawer a.active {
  color: var(--color-brand-crimson);
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
  position: relative;
  min-height: calc(100vh - 65px);
  min-height: calc(100dvh - 65px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px 20px 40px;
  text-align: center;
  box-sizing: border-box;
}

/* Atmospheric Soft Hero Scrim: Subtle contrast lift without darkening the artwork */
.hero::before {
  content: '';
  position: absolute;
  inset: -20px 0 -30px;
  background: radial-gradient(ellipse 800px 380px at 50% 36%, rgba(6, 2, 4, 0.35) 0%, rgba(6, 2, 4, 0.12) 55%, transparent 80%);
  pointer-events: none;
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
}

.hero-crest-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 14px;
}

.hero-crest-box {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-crimson);
  box-shadow: 0 0 24px rgba(239, 35, 60, 0.45), inset 0 0 12px rgba(239, 35, 60, 0.2);
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hero-crest-box:hover {
  transform: scale(1.05);
  box-shadow: 0 0 45px rgba(239, 35, 60, 0.7);
}

.hero-crest-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Solid high-contrast dark glass pill - 100% readable over red sun and torii beam */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(10, 2, 5, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(239, 35, 60, 0.65);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.85), 0 0 14px rgba(239, 35, 60, 0.25);
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  letter-spacing: 0.14em;
  margin-bottom: 14px;
}

.hero-badge .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef233c;
  box-shadow: 0 0 8px #ef233c;
}

/* Clean, crisp typography without heavy bleeding text shadows */
.hero-title {
  font-size: clamp(2.2rem, 4.8vw, 3.8rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 14px;
}

.hero-title-top {
  display: block;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95), 0 4px 14px rgba(0, 0, 0, 0.85);
}

/* Radiant electric crimson - razor-sharp optical bloom */
.hero-title .crimson-gradient {
  display: block;
  color: #ff2a4b;
  text-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.95),
    0 0 14px rgba(255, 42, 75, 0.85), 
    0 0 26px rgba(239, 35, 60, 0.45);
  -webkit-text-fill-color: #ff2a4b;
  background: none;
  filter: none;
}

/* Bright high-contrast off-white subtitle with clean shadow over dark mountains */
.hero-subtitle {
  max-width: 580px;
  margin: 0 auto 24px;
  font-size: 0.95rem;
  color: #f1f5f9;
  font-weight: 500;
  line-height: 1.55;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 0 20px rgba(0, 0, 0, 0.85);
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 0;
}

/* ==========================================
   HERO RESPONSIVENESS (TABLET & MOBILE)
   ========================================== */
@media (max-width: 860px) {
  .hero {
    padding: 24px 20px 36px;
  }
  .hero-title {
    font-size: clamp(2.0rem, 5.2vw, 3.2rem);
  }
}

@media (max-width: 768px) {
  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    gap: 10px;
    margin: 0 auto 10px;
  }

  .hero-cta-group .btn {
    width: 100%;
    padding: 11px 22px !important;
    font-size: 0.88rem !important;
    justify-content: center;
    min-height: 44px;
    box-sizing: border-box;
  }
}

@media (max-width: 600px) {
  .hero {
    min-height: calc(100vh - 60px);
    min-height: calc(100dvh - 60px);
    padding: 16px 16px 28px;
    justify-content: center;
  }

  .hero-crest-container {
    gap: 8px;
    margin: 0 auto 10px;
  }

  .hero-crest-box {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    box-shadow: 0 0 18px rgba(239, 35, 60, 0.45);
  }

  .hero-crest-container {
    margin: 0 auto 8px;
  }

  .hero-badge {
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    margin-bottom: 8px;
    max-width: 92vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero-title {
    font-size: clamp(1.8rem, 7.8vw, 2.35rem);
    line-height: 1.1;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
  }

  .hero-subtitle {
    font-size: 0.85rem;
    line-height: 1.45;
    margin: 0 auto 12px;
    padding: 0 4px;
    max-width: 330px;
  }

  .hero-cta-group {
    max-width: 290px;
    gap: 8px;
    margin: 0 auto 8px;
  }

  .hero-cta-group .btn {
    padding: 10px 20px !important;
    font-size: 0.86rem !important;
  }

  /* Compact Navbar Actions on Mobile */
  .navbar .nav-actions > a.btn-primary-glow {
    display: none;
  }

  .hero-stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stat-card {
    padding: 16px 18px;
  }
}

/* Stat Cards */
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.stat-card {
  padding: 22px 24px;
  text-align: left;
  border-left: 2px solid var(--color-brand-crimson);
  background: var(--color-obsidian-surface);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--color-text-primary);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-desc {
  font-size: 0.8125rem;
  color: var(--color-brand-crimson);
  font-weight: 600;
}

/* ==========================================
   LIVE TOURNAMENT TICKER SECTION
   ========================================== */
.ticker-section {
  padding: 36px 0;
  border-top: 1px solid var(--color-border-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
  background: #09090d;
}

.ticker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.ticker-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.live-badge {
  background: rgba(239, 35, 60, 0.15);
  color: var(--color-brand-crimson);
  border: 1px solid var(--color-border-crimson);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-size: 0.625rem;
  font-family: var(--font-mono);
  font-weight: 700;
}

.ticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px;
}

.match-card {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.match-teams {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.match-division {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-brand-crimson);
  text-transform: uppercase;
}

.match-versus {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.match-time {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ==========================================
   SECTION COMMON HEADERS
   ========================================== */
.section-header {
  text-align: center;
  margin-bottom: 44px;
  position: relative;
  z-index: 2;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #ff4d6d;
  background: rgba(12, 3, 6, 0.88);
  border: 1px solid rgba(239, 35, 60, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 700;
  margin-bottom: 10px;
  display: inline-block;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
}

.section-title {
  font-size: 2.25rem;
  margin-bottom: 10px;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95), 0 4px 28px rgba(0, 0, 0, 0.85);
}

.section-desc {
  max-width: 580px;
  margin: 0 auto;
  color: #e2e8f0;
  font-size: 0.95rem;
  font-weight: 450;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
}

/* ==========================================
   ROSTER SECTION
   ========================================== */
.roster-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.division-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pill-btn {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  background: var(--color-obsidian-surface);
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
}

.pill-btn:hover {
  color: var(--color-text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.pill-btn.active {
  background: var(--color-brand-crimson);
  color: #ffffff;
  border-color: var(--color-brand-crimson);
  box-shadow: 0 2px 10px rgba(239, 35, 60, 0.4);
}

.search-box {
  position: relative;
  width: 100%;
  max-width: 290px;
}

.search-box input {
  width: 100%;
  min-height: 42px;
  background: var(--color-obsidian-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 16px 8px 36px;
  font-size: 0.875rem;
  color: var(--color-text-primary);
  transition: border-color var(--transition-fast);
}

.search-box input:focus {
  border-color: var(--color-brand-crimson);
}

.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
}

/* Roster Grid */
.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
}

@media (max-width: 600px) {
  .roster-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.player-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.card-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}


/* Stylized Roblox Duelist Avatars */
.avatar-duelist-box {
  width: 100%;
  height: 100%;
  position: relative;
  background: #09090e;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.player-avatar-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.avatar-initials-pill {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 800;
  padding: 1px 4px;
  background: rgba(10, 10, 15, 0.95);
  border: 1px solid var(--color-border-crimson);
  color: var(--color-brand-crimson);
  border-radius: 3px;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.leader-avatar-box {
  border: 2px solid var(--color-brand-crimson);
  box-shadow: 0 0 14px rgba(239, 35, 60, 0.4);
}

.leader-pill {
  background: var(--color-brand-crimson);
  color: #ffffff;
  border-color: #ffffff;
}

.avatar-wrapper {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--color-border-subtle);
  background: #111118;
  flex-shrink: 0;
}

.avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #15151e;
  color: var(--color-brand-crimson);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1rem;
}

.player-meta {
  display: flex;
  flex-direction: column;
}

.player-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-text-primary);
}

.player-role {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--color-brand-crimson-text);
  text-transform: uppercase;
  margin-top: 2px;
}

.player-division-tag {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Authentic Competitive Duelist Specs Bar (Pass P2 Resolution) */
.duelist-spec-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  margin: 10px 0 14px 0;
  background: rgba(18, 18, 26, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 2px solid var(--color-brand-crimson);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.spec-stat {
  color: var(--color-text-secondary);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.spec-label {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.spec-badge {
  font-size: 0.6875rem;
  font-weight: 800;
  padding: 3px 8px;
  background: rgba(239, 35, 60, 0.15);
  border: 1px solid rgba(239, 35, 60, 0.35);
  color: #ff5c77;
  border-radius: 3px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--color-border-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
  margin-bottom: 14px;
}

.stat-item .k {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.stat-item .v {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--color-text-primary);
}

.avatar-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}

.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.discord-chip {
  min-height: 44px;
  padding: 8px 12px;
  background: #121218;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.discord-chip:hover {
  border-color: var(--color-brand-crimson);
  color: var(--color-text-primary);
}

.profile-link {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: #121218;
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
}

.profile-link:hover {
  border-color: var(--color-brand-crimson);
  color: var(--color-brand-crimson);
}

/* Empty State Card */
.empty-state-card {
  grid-column: 1 / -1;
  padding: 50px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.empty-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: rgba(239, 35, 60, 0.1);
  border: 1px solid var(--color-border-crimson);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-brand-crimson);
  font-size: 1.5rem;
  font-weight: 800;
}

.empty-title {
  font-size: 1.25rem;
  font-weight: 800;
}

.empty-desc {
  max-width: 420px;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.empty-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

/* ==========================================================================
   TRYOUTS SECTION — TACTICAL BESPOKE REDESIGN (UN-NESTED & DE-AI-IFIED)
   ========================================================================== */
.tryouts-section {
  padding: 80px 0;
}

/* Clean Un-nested Tactical Frame */
.tryouts-card {
  padding: 0;
  background: var(--color-obsidian-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  overflow: hidden;
  box-shadow: 0 12px 36px -12px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

@media (max-width: 860px) {
  .tryouts-card {
    grid-template-columns: 1fr;
  }
}

.tryouts-left {
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 600px) {
  .tryouts-left {
    padding: 30px 20px;
  }
}

.tryouts-meta-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-brand-crimson);
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.tryouts-headline {
  font-size: 2.25rem;
  line-height: 1.1;
  margin-bottom: 12px;
}

.tryouts-lead {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 520px;
  margin-bottom: 24px;
}

/* Tactical Indexed Requirements */
.tactical-req-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}

.tactical-req-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(8, 8, 12, 0.6);
  border: 1px solid var(--color-border-subtle);
  border-left: 2px solid var(--color-brand-crimson);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.req-idx {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-brand-crimson);
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.req-text {
  color: var(--color-text-secondary);
}

/* Right Column: Telemetry HUD Panel (Un-nested) */
.tryouts-hud {
  padding: 44px 36px;
  background: var(--color-obsidian-hud);
  border-left: 1px solid var(--color-border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (max-width: 860px) {
  .tryouts-hud {
    border-left: none;
    border-top: 1px solid var(--color-border-subtle);
    padding: 30px 20px;
  }
}

.hud-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border-subtle);
  margin-bottom: 24px;
}

.hud-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.hud-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: rgba(239, 35, 60, 0.12);
  border: 1px solid var(--color-border-crimson);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-brand-crimson);
}

.hud-status-badge .hud-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-brand-crimson);
}

.hud-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.hud-metric-box {
  background: rgba(14, 14, 18, 0.6);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.hud-metric-box .val {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  margin-bottom: 4px;
}

.hud-metric-box .desc {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.hud-bottom-note {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  padding-top: 14px;
  border-top: 1px solid var(--color-border-subtle);
}

/* ==========================================
   MODAL DIALOG (WCAG AA COMPLIANT)
   ========================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 6, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  width: 100%;
  max-width: 500px;
  background: var(--color-obsidian-surface);
  border: 1px solid var(--color-border-crimson);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 32px;
  position: relative;
  animation: modalIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 580px) {
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .modal-box {
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    margin: 0;
    padding: 24px 20px 36px;
    border-bottom: none;
    animation: modalBottomSheet 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

@keyframes modalBottomSheet {
  from {
    transform: translateY(100%);
    opacity: 0.5;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.04);
}

.modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.modal-step-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 22px;
}

.step-pip {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  transition: background var(--transition-fast);
}

.step-pip.active {
  background: var(--color-brand-crimson);
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  min-height: 44px;
  background: #121218;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: #ffffff;
  font-size: 0.9rem;
}

.form-input:focus {
  border-color: var(--color-brand-crimson);
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  margin-bottom: 12px;
}

.checkbox-label input {
  margin-top: 3px;
  accent-color: var(--color-brand-crimson);
  width: 18px;
  height: 18px;
}

/* ==========================================
   TOAST NOTIFICATION REGION
   ========================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  padding: 10px 16px;
  background: #111118;
  border: 1px solid var(--color-border-crimson);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.2s ease-out;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   GLOBAL TORII SHRINE & BLOOD SUN BACKDROP
   Unified 1344 x 768 Coordinate Space
   Scales, aligns, and crops torii artwork and asymmetrical flowers
   in locked 1:1 synchrony.
   ========================================== */
.global-shrine-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  min-height: 840px;
  max-height: 1080px;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #0d0f12;
  transition: opacity 0.4s ease;
}

@media (max-width: 768px) {
  .global-shrine-backdrop {
    min-height: 100vh;
    min-height: 100dvh;
    max-height: none;
  }
}

/* Seamless transition from Hero Torii artwork into the obsidian tactical deck */
.shrine-bottom-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 240px;
  background: linear-gradient(to bottom, rgba(7, 7, 9, 0) 0%, rgba(7, 7, 9, 0.7) 50%, #070709 100%);
  pointer-events: none;
  z-index: 2;
}

@media (max-width: 768px) {
  .shrine-bottom-fade {
    height: 160px;
  }
}

.shrine-scene-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

/* Atmospheric Outer Vignette */
.shrine-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 48%, rgba(8, 2, 4, 0.45) 80%, rgba(5, 1, 2, 0.8) 100%);
  pointer-events: none;
}

/* 1. Crimson Blood Sun Corona Pulse & Breathing Animation */
#toriiSun, .torii-blood-sun {
  animation: sunBloodBreathe 6s ease-in-out infinite alternate;
}

@keyframes sunBloodBreathe {
  0% {
    filter: drop-shadow(0 0 10px rgba(247, 69, 60, 0.6));
    opacity: 0.94;
  }
  50% {
    filter: drop-shadow(0 0 45px rgba(255, 30, 50, 0.95)) drop-shadow(0 0 85px rgba(239, 35, 60, 0.75));
    opacity: 1;
  }
  100% {
    filter: drop-shadow(0 0 16px rgba(247, 69, 60, 0.65));
    opacity: 0.96;
  }
}

/* 2. Soft Vermilion Sun Halo Breathing (Sky atmosphere) */
#sceneSunHalo {
  transform-origin: 695px 150px;
  animation: sunHaloBreathe 7s ease-in-out infinite alternate;
  pointer-events: none;
  mix-blend-mode: screen;
}

@keyframes sunHaloBreathe {
  0% {
    transform: scale(0.92);
    opacity: 0.7;
    filter: drop-shadow(0 0 12px rgba(247, 69, 60, 0.4));
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
    filter: drop-shadow(0 0 45px rgba(255, 40, 60, 0.85)) drop-shadow(0 0 90px rgba(239, 35, 60, 0.6));
  }
  100% {
    transform: scale(0.96);
    opacity: 0.78;
    filter: drop-shadow(0 0 20px rgba(247, 69, 60, 0.5));
  }
}

/* 3. Faint Ground Mist Band */
#sceneGroundMist {
  pointer-events: none;
  mix-blend-mode: screen;
}

/* 4. Drifting Leaves Layer (8 leaves drifting diagonally Left-to-Right at 30% accelerated velocity) */
.leaf-drifter {
  pointer-events: none;
  will-change: transform;
  filter: drop-shadow(0 0 5px rgba(239, 35, 60, 0.65));
}

/* Leaf 1: Vibrant scarlet leaf crossing the sun (sun at 695, 150) - 9.8s */
.leaf-drifter-1 {
  animation: leafFlight1 9.8s cubic-bezier(0.35, 0, 0.65, 1) infinite;
}
@keyframes leafFlight1 {
  0% {
    transform: translate(520px, 60px) rotate(12deg);
    opacity: 0;
  }
  12% {
    opacity: 0.95;
  }
  48% {
    transform: translate(695px, 150px) rotate(32deg);
    opacity: 1;
  }
  85% {
    opacity: 0.85;
  }
  100% {
    transform: translate(960px, 300px) rotate(58deg);
    opacity: 0;
  }
}

/* Leaf 2: Bright crimson leaf drifting midground - 11.9s */
.leaf-drifter-2 {
  animation: leafFlight2 11.9s cubic-bezier(0.35, 0, 0.65, 1) infinite -3.5s;
}
@keyframes leafFlight2 {
  0% {
    transform: translate(140px, 200px) rotate(-10deg);
    opacity: 0;
  }
  15% {
    opacity: 0.9;
  }
  50% {
    transform: translate(440px, 370px) rotate(18deg);
    opacity: 1;
  }
  85% {
    opacity: 0.8;
  }
  100% {
    transform: translate(720px, 540px) rotate(42deg);
    opacity: 0;
  }
}

/* Leaf 3: Rich vermilion leaf drifting lower path - 13.3s */
.leaf-drifter-3 {
  animation: leafFlight3 13.3s cubic-bezier(0.35, 0, 0.65, 1) infinite -7s;
}
@keyframes leafFlight3 {
  0% {
    transform: translate(380px, 310px) rotate(15deg);
    opacity: 0;
  }
  15% {
    opacity: 0.92;
  }
  50% {
    transform: translate(680px, 470px) rotate(38deg);
    opacity: 1;
  }
  85% {
    opacity: 0.8;
  }
  100% {
    transform: translate(1010px, 640px) rotate(64deg);
    opacity: 0;
  }
}

/* Leaf 4: Rose crimson leaf drifting right side - 10.5s */
.leaf-drifter-4 {
  animation: leafFlight4 10.5s cubic-bezier(0.35, 0, 0.65, 1) infinite -2.2s;
}
@keyframes leafFlight4 {
  0% {
    transform: translate(820px, 240px) rotate(28deg);
    opacity: 0;
  }
  15% {
    opacity: 0.9;
  }
  50% {
    transform: translate(1090px, 410px) rotate(52deg);
    opacity: 1;
  }
  85% {
    opacity: 0.75;
  }
  100% {
    transform: translate(1370px, 560px) rotate(78deg);
    opacity: 0;
  }
}

/* Leaf 5: Radiant crimson leaf swooping high-to-mid across the sun - 9.2s */
.leaf-drifter-5 {
  animation: leafFlight5 9.2s cubic-bezier(0.35, 0, 0.65, 1) infinite -4.5s;
}
@keyframes leafFlight5 {
  0% {
    transform: translate(450px, 40px) rotate(8deg);
    opacity: 0;
  }
  15% {
    opacity: 0.95;
  }
  50% {
    transform: translate(650px, 160px) rotate(28deg);
    opacity: 1;
  }
  85% {
    opacity: 0.85;
  }
  100% {
    transform: translate(890px, 320px) rotate(52deg);
    opacity: 0;
  }
}

/* Leaf 6: Ruby crimson leaf drifting mid-center down toward river - 11.0s */
.leaf-drifter-6 {
  animation: leafFlight6 11.0s cubic-bezier(0.35, 0, 0.65, 1) infinite -8s;
}
@keyframes leafFlight6 {
  0% {
    transform: translate(580px, 180px) rotate(-15deg);
    opacity: 0;
  }
  15% {
    opacity: 0.9;
  }
  50% {
    transform: translate(710px, 360px) rotate(14deg);
    opacity: 1;
  }
  85% {
    opacity: 0.8;
  }
  100% {
    transform: translate(870px, 560px) rotate(44deg);
    opacity: 0;
  }
}

/* Leaf 7: Bright crimson leaf swooping left-to-center - 12.2s */
.leaf-drifter-7 {
  animation: leafFlight7 12.2s cubic-bezier(0.35, 0, 0.65, 1) infinite -1.5s;
}
@keyframes leafFlight7 {
  0% {
    transform: translate(220px, 120px) rotate(22deg);
    opacity: 0;
  }
  15% {
    opacity: 0.9;
  }
  50% {
    transform: translate(490px, 290px) rotate(42deg);
    opacity: 1;
  }
  85% {
    opacity: 0.8;
  }
  100% {
    transform: translate(760px, 480px) rotate(68deg);
    opacity: 0;
  }
}

/* Leaf 8: Bright ember vermilion drifting near lower riverbank - 10.0s */
.leaf-drifter-8 {
  animation: leafFlight8 10.0s cubic-bezier(0.35, 0, 0.65, 1) infinite -5.5s;
}
@keyframes leafFlight8 {
  0% {
    transform: translate(480px, 420px) rotate(-8deg);
    opacity: 0;
  }
  15% {
    opacity: 0.92;
  }
  50% {
    transform: translate(670px, 560px) rotate(22deg);
    opacity: 1;
  }
  85% {
    opacity: 0.8;
  }
  100% {
    transform: translate(880px, 710px) rotate(50deg);
    opacity: 0;
  }
}

/* 5. Asymmetrical Riverbank Flower Clusters (Living botanical presence) */
.scene-flower-node {
  pointer-events: none;
  will-change: transform;
  filter: drop-shadow(0 0 6px rgba(239, 35, 60, 0.55));
  transition: opacity 0.4s ease;
}

.flower-sway {
  will-change: transform;
}

/* Delicate Stamen Glow Pulse */
.lily-anther-tip {
  animation: lilyAntherGlow 4.5s ease-in-out infinite alternate;
}

@keyframes lilyAntherGlow {
  0%, 100% {
    filter: drop-shadow(0 0 2px rgba(255, 77, 109, 0.4));
    opacity: 0.88;
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(255, 120, 150, 0.95)) drop-shadow(0 0 14px rgba(239, 35, 60, 0.75));
    opacity: 1;
  }
}

/* Dual-Responsive Spider Lily Architecture */
.flowers-desktop-group {
  display: inline;
}
.flowers-mobile-group {
  display: none;
}

@media (max-width: 768px) {
  .flowers-desktop-group {
    display: none !important;
  }
  .flowers-mobile-group {
    display: inline !important;
  }
}

/* Desktop Flower Depth Calibration */
.flower-dl1, .flower-dr3 {
  opacity: 0.96;
}
.flower-dl2, .flower-dr2 {
  opacity: 0.88;
}
.flower-dl3, .flower-dr1 {
  opacity: 0.76;
}

/* Mobile Perspective Trail Depth Calibration (4-Point Diamond Rhythm) */
.flower-m-1 {
  opacity: 1;
  filter: drop-shadow(0 0 5px rgba(239, 35, 60, 0.5));
}
.flower-m-2 {
  opacity: 0.95;
  filter: drop-shadow(0 0 4px rgba(239, 35, 60, 0.45));
}
.flower-m-3 {
  opacity: 0.88;
  filter: drop-shadow(0 0 3px rgba(217, 4, 41, 0.35));
}
.flower-m-4 {
  opacity: 0.80;
  filter: drop-shadow(0 0 2px rgba(186, 20, 42, 0.25));
}

/* Regular Content View vs Wallpaper Mode */
body:not(.wallpaper-mode) #sceneFlowersLayer {
  opacity: 0.85;
}
body.wallpaper-mode #sceneFlowersLayer {
  opacity: 1;
}

/* 6. Subtle Reflection Shimmer (Staggered brightness on reflection strokes) */
.shimmer-stroke-1 {
  animation: strokeShimmer1 4.2s ease-in-out infinite alternate;
}
.shimmer-stroke-2 {
  animation: strokeShimmer2 5.0s ease-in-out infinite alternate 1.4s;
}
.shimmer-stroke-3 {
  animation: strokeShimmer3 3.6s ease-in-out infinite alternate 0.7s;
}

@keyframes strokeShimmer1 {
  0%, 100% { opacity: 0.82; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(1.28) drop-shadow(0 0 4px rgba(255, 60, 80, 0.75)); }
}
@keyframes strokeShimmer2 {
  0%, 100% { opacity: 0.78; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(1.24) drop-shadow(0 0 3px rgba(255, 60, 80, 0.65)); }
}
@keyframes strokeShimmer3 {
  0%, 100% { opacity: 0.75; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(1.18) drop-shadow(0 0 3px rgba(255, 60, 80, 0.55)); }
}

/* 7. Static Mode: Stop all ambient animations, retain steady sun halo */
.global-shrine-backdrop[data-motion="static"] #toriiSun,
.global-shrine-backdrop[data-motion="static"] #sceneSunHalo,
.global-shrine-backdrop[data-motion="static"] .leaf-drifter,
.global-shrine-backdrop[data-motion="static"] .lily-anther-tip,
.global-shrine-backdrop[data-motion="static"] .shimmer-stroke-1,
.global-shrine-backdrop[data-motion="static"] .shimmer-stroke-2,
.global-shrine-backdrop[data-motion="static"] .shimmer-stroke-3 {
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .global-shrine-backdrop:not([data-motion="live"]) #toriiSun,
  .global-shrine-backdrop:not([data-motion="live"]) #sceneSunHalo,
  .global-shrine-backdrop:not([data-motion="live"]) .leaf-drifter,
  .global-shrine-backdrop:not([data-motion="live"]) .lily-anther-tip,
  .global-shrine-backdrop:not([data-motion="live"]) .shimmer-stroke-1,
  .global-shrine-backdrop:not([data-motion="live"]) .shimmer-stroke-2,
  .global-shrine-backdrop:not([data-motion="live"]) .shimmer-stroke-3 {
    animation: none !important;
  }
}

/* ==========================================
   FLOATING SHRINE PROTOCOL CONTROL HUD
   Dual-Slider Switcher: Warrior Poses & Live/Static Motion
   ========================================== */
.shrine-hud-widget {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(10, 2, 5, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border-crimson);
  border-radius: 14px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.8), 0 0 15px rgba(239, 35, 60, 0.2);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  user-select: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease, border-color 0.25s ease;
}

body.wallpaper-mode .shrine-hud-widget {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
  z-index: 99999 !important;
}

.shrine-hud-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(239, 35, 60, 0.2);
}

.shrine-hud-icon {
  font-size: 0.875rem;
}

.shrine-hud-title {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--color-brand-crimson);
}

.shrine-hud-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.shrine-hud-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--color-text-muted);
  min-width: 62px;
}

.shrine-hud-group {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(20, 4, 8, 0.7);
  padding: 2px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(239, 35, 60, 0.15);
}

.shrine-hud-btn {
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.625rem;
  letter-spacing: 0.6px;
  transition: all var(--transition-fast);
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
}

.shrine-hud-btn:hover {
  color: #ffffff;
  background: rgba(239, 35, 60, 0.2);
}

.shrine-hud-btn.active {
  background: var(--color-brand-crimson);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(239, 35, 60, 0.6);
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--color-border-subtle);
  padding: 44px 0 28px;
  background: #060608;
  font-size: 0.8125rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--color-text-muted);
  font-size: 0.75rem;
  flex-wrap: wrap;
  gap: 10px;
}

/* Version Switcher Badge in Footer */
.version-switch-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(18, 18, 24, 0.9);
  border: 1px solid rgba(239, 35, 60, 0.45);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #f1f5f9;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.version-switch-link:hover {
  background: rgba(239, 35, 60, 0.18);
  border-color: var(--color-brand-crimson);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(239, 35, 60, 0.4);
}

.version-switch-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef233c;
  box-shadow: 0 0 6px #ef233c;
}

/* ==========================================================================
   DYNAMIC MOUSE SPOTLIGHT, 3D TILT & SMOOTH MULTI-LAYER SPARKLES
   ========================================================================== */
.glass-panel, .player-card, .tryouts-form-card, .stat-card, .match-card, .hub-card {
  --mouse-x: 50%;
  --mouse-y: 50%;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: relative;
  overflow: hidden; /* ABSOLUTE BOUNDARY: Confines all glow, spotlight, and sparkles inside */
  background: #0d0d12 !important; /* 100% solid opaque obsidian - flowers never bleed through */
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), 
              border-color 0.2s ease, 
              box-shadow 0.25s ease, 
              background 0.25s ease;
  will-change: transform;
}

.glass-panel:hover, .player-card:hover, .tryouts-form-card:hover, .stat-card:hover, .match-card:hover, .hub-card:hover {
  border-color: rgba(239, 35, 60, 0.7) !important;
  /* Crisp 12px perimeter halo - strictly bounded to card size */
  box-shadow: 0 0 14px rgba(239, 35, 60, 0.32), 0 12px 30px rgba(0, 0, 0, 0.78), inset 0 0 10px rgba(239, 35, 60, 0.08) !important;
  /* 3D tilt tracking mouse pointer + smooth lift */
  transform: perspective(700px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-4px);
  /* Confined internal spotlight matching mouse pointer over 100% solid base */
  background: radial-gradient(320px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), #1c080d 0%, #0d0d12 70%) !important;
}

/* Layer A: Smooth Drifting Diamond Sparkles (1.9s loop) */
.glass-panel::before, .player-card::before, .tryouts-form-card::before, .stat-card::before, .match-card::before, .hub-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background-image:
    radial-gradient(1.8px 1.8px at 15% 22%, #ffffff 35%, rgba(255, 77, 109, 0.9) 65%, transparent 100%),
    radial-gradient(2.4px 2.4px at 85% 26%, #ffffff 35%, rgba(239, 35, 60, 0.95) 65%, transparent 100%),
    radial-gradient(1.6px 1.6px at 30% 74%, #ffffff 40%, rgba(255, 117, 143, 0.9) 70%, transparent 100%),
    radial-gradient(2.2px 2.2px at 70% 82%, #ffffff 40%, rgba(239, 35, 60, 0.95) 70%, transparent 100%),
    radial-gradient(1.5px 1.5px at 52% 16%, #ffffff 35%, rgba(255, 77, 109, 0.9) 65%, transparent 100%),
    radial-gradient(2px 2px at 88% 66%, #ffffff 40%, rgba(239, 35, 60, 0.95) 70%, transparent 100%);
  transition: opacity 0.22s ease;
  mix-blend-mode: screen;
  z-index: 2;
}

/* Layer B: Offset Floating Staggered Sparkles (2.7s loop) */
.glass-panel::after, .player-card::after, .tryouts-form-card::after, .stat-card::after, .match-card::after, .hub-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background-image:
    radial-gradient(2px 2px at 28% 36%, #ffffff 40%, rgba(255, 77, 109, 0.9) 70%, transparent 100%),
    radial-gradient(1.5px 1.5px at 74% 20%, #ffffff 35%, rgba(255, 117, 143, 0.85) 65%, transparent 100%),
    radial-gradient(2.4px 2.4px at 48% 82%, #ffffff 40%, rgba(239, 35, 60, 0.95) 70%, transparent 100%),
    radial-gradient(1.8px 1.8px at 84% 78%, #ffffff 35%, rgba(255, 77, 109, 0.9) 65%, transparent 100%),
    radial-gradient(1.5px 1.5px at 18% 64%, #ffffff 35%, rgba(255, 117, 143, 0.85) 65%, transparent 100%);
  transition: opacity 0.28s ease;
  mix-blend-mode: screen;
  z-index: 2;
}

.glass-panel:hover::before, .player-card:hover::before, .tryouts-form-card:hover::before, .stat-card:hover::before, .match-card:hover::before, .hub-card:hover::before {
  opacity: 1 !important;
  animation: fireworkSparkA 48s ease-in-out infinite alternate !important;
}

.glass-panel:hover::after, .player-card:hover::after, .tryouts-form-card:hover::after, .stat-card:hover::after, .match-card:hover::after, .hub-card:hover::after {
  opacity: 1 !important;
  animation: fireworkSparkB 62s ease-in-out infinite alternate !important;
}

/* Linear Up/Down with Wide Harmonic Side-to-Side Sway (Angled Linear Ascent) */
@keyframes fireworkSparkA {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.35);
    filter: brightness(1);
  }
  12% {
    opacity: 0.95;
    transform: translate3d(18px, -11px, 0) scale(1.15);
    filter: brightness(2.6) drop-shadow(0 0 6px #ffffff) drop-shadow(0 0 12px #ff4d6d);
  }
  25% {
    opacity: 0.75;
    transform: translate3d(36px, -23px, 0) scale(0.85);
    filter: brightness(1.6);
  }
  38% {
    opacity: 1;
    transform: translate3d(22px, -35px, 0) scale(1.25);
    filter: brightness(2.7) drop-shadow(0 0 8px #ffffff) drop-shadow(0 0 14px #ef233c);
  }
  50% {
    opacity: 0.7;
    transform: translate3d(-2px, -47px, 0) scale(0.9);
    filter: brightness(1.5);
  }
  63% {
    opacity: 0.95;
    transform: translate3d(-26px, -59px, 0) scale(1.2);
    filter: brightness(2.5) drop-shadow(0 0 7px #ffffff);
  }
  76% {
    opacity: 0.75;
    transform: translate3d(-38px, -71px, 0) scale(0.85);
    filter: brightness(1.6);
  }
  88% {
    opacity: 0.9;
    transform: translate3d(-18px, -83px, 0) scale(1.1);
    filter: brightness(2.2);
  }
  100% {
    opacity: 0;
    transform: translate3d(6px, -95px, 0) scale(0.2);
    filter: brightness(0.8);
  }
}

/* Linear Up/Down with Wide Harmonic Side-to-Side Sway (Angled Linear Descent) */
@keyframes fireworkSparkB {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.3);
    filter: brightness(0.9);
  }
  12% {
    opacity: 0.9;
    transform: translate3d(-18px, 10px, 0) scale(1.18);
    filter: brightness(2.5) drop-shadow(0 0 7px #ffffff) drop-shadow(0 0 14px #ff758f);
  }
  25% {
    opacity: 0.7;
    transform: translate3d(-38px, 21px, 0) scale(0.8);
    filter: brightness(1.5);
  }
  38% {
    opacity: 1;
    transform: translate3d(-24px, 32px, 0) scale(1.28);
    filter: brightness(2.8) drop-shadow(0 0 9px #ffffff) drop-shadow(0 0 16px #ef233c);
  }
  50% {
    opacity: 0.65;
    transform: translate3d(4px, 44px, 0) scale(0.85);
    filter: brightness(1.4);
  }
  63% {
    opacity: 0.95;
    transform: translate3d(28px, 55px, 0) scale(1.22);
    filter: brightness(2.5) drop-shadow(0 0 7px #ffffff);
  }
  76% {
    opacity: 0.7;
    transform: translate3d(40px, 66px, 0) scale(0.85);
    filter: brightness(1.5);
  }
  88% {
    opacity: 0.9;
    transform: translate3d(18px, 77px, 0) scale(1.12);
    filter: brightness(2.3);
  }
  100% {
    opacity: 0;
    transform: translate3d(-8px, 88px, 0) scale(0.2);
    filter: brightness(0.7);
  }
}

/* ==========================================================================
   TRYOUTS SECTION (IMPROVED SPACING & BACKGROUND FLOWERS ONLY)
   ========================================================================== */
.tryouts-full-section {
  position: relative;
  padding: 85px 0 95px;
  background: radial-gradient(circle at 50% 25%, rgba(239, 35, 60, 0.08) 0%, rgba(7, 7, 9, 0) 70%);
  overflow: hidden;
}

.tryouts-content-wrapper {
  position: relative;
  z-index: 10;
  max-width: 1120px;
  margin: 0 auto;
}

.tryouts-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 52px;
  align-items: center;
}

@media (max-width: 900px) {
  .tryouts-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.tryouts-info-col {
  background: rgba(11, 2, 6, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(239, 35, 60, 0.35);
  border-radius: var(--radius-xl);
  padding: 42px 36px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(239, 35, 60, 0.12);
  position: relative;
  z-index: 2;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.tryouts-info-col:hover {
  border-color: rgba(239, 35, 60, 0.6);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.9), 0 0 30px rgba(239, 35, 60, 0.22);
}

.tryouts-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  color: #ff4d6d;
  letter-spacing: 0.1em;
  display: inline-block;
  background: rgba(239, 35, 60, 0.15);
  border: 1px solid rgba(239, 35, 60, 0.45);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.tryouts-main-title {
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.95);
}

.tryouts-main-desc {
  color: #e2e8f0;
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 26px;
  max-width: 500px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.tryouts-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 34px;
}

.tryouts-checklist li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.95rem;
  color: #f8fafc;
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
}

.check-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(239, 35, 60, 0.15);
  border: 1px solid var(--color-brand-crimson);
  color: var(--color-brand-crimson);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 900;
  flex-shrink: 0;
}

.btn-discord-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(239, 35, 60, 0.12);
  border: 1px solid var(--color-border-crimson);
  color: #ffffff;
  padding: 11px 24px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  transition: all var(--transition-fast);
}

.btn-discord-pill:hover {
  background: var(--color-brand-crimson);
  box-shadow: 0 0 20px rgba(239, 35, 60, 0.6);
  color: #ffffff;
}

/* Tryouts Form Card (Image 3) */
.tryouts-form-card {
  padding: 42px 36px;
  background: #0c0c10 !important; /* 100% solid opaque obsidian - flowers never bleed through */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95);
  position: relative;
  z-index: 10;
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 600px) {
  .form-row-2col {
    grid-template-columns: 1fr;
  }
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 8px;
}

.tryout-input {
  width: 100%;
  padding: 13px 16px;
  background: #08080b;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.875rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.tryout-input:focus {
  outline: none;
  border-color: var(--color-brand-crimson);
  box-shadow: 0 0 16px rgba(239, 35, 60, 0.35);
}

.tryout-textarea {
  resize: vertical;
  min-height: 95px;
}

.btn-submit-full {
  width: 100%;
  padding: 15px 24px;
  font-size: 0.9375rem;
  gap: 10px;
  margin-top: 6px;
}

/* ==========================================
   ADVANCED UI POLISH (PASS 7)
   #16 Tabular numbers, #17 Balanced headlines,
   #13 Hit slop, and #3/#4 Command Menu
   ========================================== */

/* #17 Balanced Headlines */
h1, h2, h3, .hero-title, .hero-subtitle, .section-title, .tryouts-main-title {
  text-wrap: balance;
}

/* #16 Tabular Numbers for Speedometer Rolling */
.stat-value,
.hq-stat-number,
.spec-stat,
.code-num,
.duelist-stat,
.badge-count {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* #13 Hit Slop for Compact Touch Targets (WCAG 2.5.5) */
.discord-chip,
.modal-close,
.hamburger-btn,
.profile-link,
.style-switcher-btn,
.shrine-hud-btn {
  position: relative;
}

.discord-chip::after,
.modal-close::after,
.hamburger-btn::after,
.profile-link::after,
.shrine-hud-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 44px;
  min-height: 44px;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

/* #3 & #4 Tactical Command Palette (Ctrl+K) */
.command-palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 6, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 20px 20px;
  animation: cmdFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cmdFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.command-palette-box {
  width: 100%;
  max-width: 580px;
  background: rgba(12, 12, 16, 0.98);
  border: 1px solid var(--color-border-crimson);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(239, 35, 60, 0.22);
  overflow: hidden;
  animation: cmdSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cmdSlideDown {
  from { transform: translateY(-16px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.command-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border-subtle);
  background: rgba(20, 20, 28, 0.6);
}

.command-search-icon {
  font-size: 1.1rem;
}

.command-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
}

.command-kbd-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border-subtle);
}

.command-results-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
}

.command-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  border: 1px solid transparent;
}

.command-item:hover,
.command-item.selected {
  background: rgba(239, 35, 60, 0.12);
  border-color: rgba(239, 35, 60, 0.4);
}

.command-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.command-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--color-brand-crimson);
}

.command-item-title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: #ffffff;
}

.command-item-subtitle {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.command-item-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-brand-crimson);
  background: rgba(239, 35, 60, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
}

.command-palette-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: rgba(8, 8, 12, 0.95);
  border-top: 1px solid var(--color-border-subtle);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.cmd-kbd {
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 5px;
  border-radius: 3px;
  color: #ffffff;
}

/* Mobile Media Query (max-width: 580px) */
@media (max-width: 580px) {
  /* Scene elements automatically scale via shared 1344x768 SVG coordinate space */
}

@media (hover: none) {
  .global-cursor-glow {
    display: none !important;
  }
}

/* ==========================================
   ADVANCED UI POLISH (PASS 7)
   #16 Tabular numbers, #17 Balanced headlines,
   #13 Hit slop, and #3/#4 Command Menu
   ========================================== */

/* #17 Balanced Headlines */
h1, h2, h3, .hero-title, .hero-subtitle, .section-title, .tryouts-main-title {
  text-wrap: balance;
}

/* #16 Tabular Numbers for Speedometer Rolling */
.stat-value,
.hq-stat-number,
.spec-stat,
.code-num,
.duelist-stat,
.badge-count {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* #13 Hit Slop for Compact Touch Targets (WCAG 2.5.5) */
.discord-chip,
.modal-close,
.hamburger-btn,
.profile-link,
.style-switcher-btn,
.shrine-hud-btn {
  position: relative;
}

.discord-chip::after,
.modal-close::after,
.hamburger-btn::after,
.profile-link::after,
.shrine-hud-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 44px;
  min-height: 44px;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

/* #3 & #4 Tactical Command Palette (Ctrl+K) */
.command-palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 6, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 20px 20px;
  animation: cmdFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cmdFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.command-palette-box {
  width: 100%;
  max-width: 580px;
  background: rgba(12, 12, 16, 0.98);
  border: 1px solid var(--color-border-crimson);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(239, 35, 60, 0.22);
  overflow: hidden;
  animation: cmdSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cmdSlideDown {
  from { transform: translateY(-16px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.command-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border-subtle);
  background: rgba(20, 20, 28, 0.6);
}

.command-search-icon {
  font-size: 1.1rem;
}

.command-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
}

.command-kbd-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border-subtle);
}

.command-results-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
}

.command-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  border: 1px solid transparent;
}

.command-item:hover,
.command-item.selected {
  background: rgba(239, 35, 60, 0.12);
  border-color: rgba(239, 35, 60, 0.4);
}

.command-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.command-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--color-brand-crimson);
}

.command-item-title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: #ffffff;
}

.command-item-subtitle {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.command-item-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-brand-crimson);
  background: rgba(239, 35, 60, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
}

.command-palette-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: rgba(8, 8, 12, 0.95);
  border-top: 1px solid var(--color-border-subtle);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.cmd-kbd {
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 5px;
  border-radius: 3px;
  color: #ffffff;
}

/* Organic Asynchronous Floral Sway & Synchronized Petal Breathing */
.lily-sway-1 {
  transform-origin: bottom center;
  animation: spiderLilySway1 6.8s ease-in-out infinite, lilyBreatheGlow 5s ease-in-out infinite alternate;
}
.lily-sway-2 {
  transform-origin: bottom center;
  animation: spiderLilySway2 8.4s ease-in-out infinite, lilyBreatheGlow 5s ease-in-out infinite alternate 1.2s;
}
.lily-sway-3 {
  transform-origin: bottom center;
  animation: spiderLilySway3 10.2s ease-in-out infinite, lilyBreatheGlow 5s ease-in-out infinite alternate 2.4s;
}
.lily-sway-4 {
  transform-origin: bottom center;
  animation: spiderLilySway4 7.6s ease-in-out infinite, lilyBreatheGlow 5s ease-in-out infinite alternate 3.6s;
}

@keyframes spiderLilySway1 {
  0%, 100% { transform: rotate(-2.8deg); }
  50% { transform: rotate(3.2deg); }
}
@keyframes spiderLilySway2 {
  0%, 100% { transform: rotate(2.4deg); }
  50% { transform: rotate(-2.6deg); }
}
@keyframes spiderLilySway3 {
  0%, 100% { transform: rotate(-1.8deg); }
  50% { transform: rotate(2.2deg); }
}
@keyframes spiderLilySway4 {
  0%, 100% { transform: rotate(2.8deg); }
  50% { transform: rotate(-3.0deg); }
}

/* Crimson Petal Breathing Glow (synchronized with Blood Sun) */
@keyframes lilyBreatheGlow {
  0% {
    filter: drop-shadow(0 0 3px rgba(239, 35, 60, 0.3));
    opacity: 0.84;
  }
  100% {
    filter: drop-shadow(0 0 10px rgba(255, 50, 75, 0.75)) drop-shadow(0 0 18px rgba(239, 35, 60, 0.4));
    opacity: 1;
  }
}

/* Legacy fallback classes */
.lily-sway-slow {
  transform-origin: bottom center;
  animation: spiderLilySway1 8s ease-in-out infinite;
}
.lily-sway-alt {
  transform-origin: bottom center;
  animation: spiderLilySway2 9.5s ease-in-out infinite;
}

.lily-anther-tip {
  animation: antherGlow 4s ease-in-out infinite;
}

@keyframes spiderLilySway1 {
  0%, 100% { transform: rotate(-2.8deg) translateY(0); }
  50% { transform: rotate(3.2deg) translateY(-3px); }
}

@keyframes spiderLilySway2 {
  0%, 100% { transform: rotate(2.4deg) translateY(0); }
  50% { transform: rotate(-2.6deg) translateY(-2px); }
}

@keyframes spiderLilySway3 {
  0%, 100% { transform: rotate(-1.8deg) translateY(0); }
  50% { transform: rotate(2.2deg) translateY(-1.5px); }
}

@keyframes spiderLilySway4 {
  0%, 100% { transform: rotate(3deg) translateY(0); }
  50% { transform: rotate(-3.2deg) translateY(-2.8px); }
}

.lily-anther-tip {
  filter: drop-shadow(0 0 3px #ef233c);
}

@keyframes antherGlow {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

/* ==========================================================================
   GLOBAL MOUSE CURSOR GLOW (BIG AMBIENT RED GLOW)
   ========================================================================== */
.global-cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, 
    rgba(239, 35, 60, 0.22) 0%, 
    rgba(239, 35, 60, 0.12) 28%, 
    rgba(239, 35, 60, 0.04) 55%, 
    transparent 72%
  );
  z-index: 9998;
  mix-blend-mode: screen;
  transition: opacity 0.25s ease, transform 0.08s ease-out;
  will-change: transform;
  opacity: 0.85;
}

/* When hovering over interactive elements, soften glow so tab/card border & sparkles take center stage */
.global-cursor-glow.hovering-element {
  opacity: 0.45;
}

.global-cursor-glow.intense-glow {
  opacity: 0.85;
}

/* ==========================================================================
   TABS & NAVIGATION (SMOOTH HOVER MOTION & MULTI-LAYER SPARKLES)
   ========================================================================== */
.nav-link {
  position: relative;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), 
              color var(--transition-fast), 
              background var(--transition-fast), 
              border-color var(--transition-fast), 
              box-shadow var(--transition-fast);
  overflow: visible; /* Confines light while allowing glowing top bar */
  will-change: transform;
}

.nav-link:hover {
  color: #ffffff !important;
  text-shadow: 0 0 10px rgba(239, 35, 60, 0.75), 0 0 18px rgba(239, 35, 60, 0.4);
  background: rgba(239, 35, 60, 0.14);
  border: 1px solid rgba(239, 35, 60, 0.6);
  box-shadow: 0 0 12px rgba(239, 35, 60, 0.35), inset 0 0 8px rgba(239, 35, 60, 0.14) !important;
  /* Smooth physical spring lift on hover */
  transform: translateY(-4px) scale(1.05);
}

/* Layer A: Smooth Drifting Diamond Stars */
.nav-link::before {
  content: '';
  position: absolute;
  inset: 0; /* Strictly confined to tab boundary */
  pointer-events: none;
  opacity: 0;
  border-radius: inherit;
  background-image:
    radial-gradient(1.5px 1.5px at 18% 30%, #ffffff 40%, rgba(255, 77, 109, 0.9) 70%, transparent 100%),
    radial-gradient(2px 2px at 82% 26%, #ffffff 40%, rgba(239, 35, 60, 0.95) 70%, transparent 100%),
    radial-gradient(1.6px 1.6px at 50% 75%, #ffffff 35%, rgba(255, 117, 143, 0.85) 65%, transparent 100%);
  mix-blend-mode: screen;
  transition: opacity 0.2s ease;
}

/* Layer B: Staggered Drifting Sparkles (Only on non-active tabs so active red bar stays crisp & persistent) */
.nav-link:not(.active)::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  border-radius: inherit;
  background-image:
    radial-gradient(2px 2px at 32% 40%, #ffffff 40%, rgba(255, 77, 109, 0.9) 70%, transparent 100%),
    radial-gradient(1.6px 1.6px at 68% 30%, #ffffff 35%, rgba(239, 35, 60, 0.9) 65%, transparent 100%),
    radial-gradient(1.8px 1.8px at 86% 70%, #ffffff 40%, rgba(255, 117, 143, 0.9) 70%, transparent 100%);
  mix-blend-mode: screen;
  transition: opacity 0.25s ease;
}

.nav-link:hover::before {
  opacity: 1;
  animation: fireworkSparkTabA 42s ease-in-out infinite alternate;
}

.nav-link:not(.active):hover::after {
  opacity: 1;
  animation: fireworkSparkTabB 54s ease-in-out infinite alternate;
}

/* Division Filter Tabs & Pill Buttons */
.pill-btn, [role="tab"], .style-switcher-btn {
  position: relative;
  overflow: hidden; /* Strictly confined to pill size */
  transition: transform 0.26s cubic-bezier(0.34, 1.56, 0.64, 1), 
              color var(--transition-fast), 
              border-color var(--transition-fast), 
              background var(--transition-fast), 
              box-shadow var(--transition-fast);
  will-change: transform;
}

.pill-btn:hover, [role="tab"]:hover {
  color: #ffffff !important;
  border-color: rgba(239, 35, 60, 0.7) !important;
  background: rgba(239, 35, 60, 0.14) !important;
  box-shadow: 0 0 12px rgba(239, 35, 60, 0.35), inset 0 0 8px rgba(239, 35, 60, 0.15) !important;
  text-shadow: 0 0 10px rgba(239, 35, 60, 0.6);
  /* Smooth physical spring lift on hover */
  transform: translateY(-3px) scale(1.04);
}

/* Division Pill Layer A Sparkles */
.pill-btn::before, [role="tab"]::before {
  content: '';
  position: absolute;
  inset: 0; /* Strictly confined to pill size */
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 32%, #ffffff 40%, rgba(255, 77, 109, 0.9) 70%, transparent 100%),
    radial-gradient(2px 2px at 78% 28%, #ffffff 40%, rgba(239, 35, 60, 0.95) 70%, transparent 100%),
    radial-gradient(1.6px 1.6px at 50% 72%, #ffffff 35%, rgba(255, 117, 143, 0.85) 65%, transparent 100%);
  mix-blend-mode: screen;
  transition: opacity 0.2s ease;
}

/* Division Pill Layer B Sparkles */
.pill-btn::after, [role="tab"]::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background-image:
    radial-gradient(2px 2px at 35% 38%, #ffffff 40%, rgba(255, 77, 109, 0.9) 70%, transparent 100%),
    radial-gradient(1.6px 1.6px at 64% 30%, #ffffff 35%, rgba(239, 35, 60, 0.9) 65%, transparent 100%),
    radial-gradient(1.8px 1.8px at 84% 68%, #ffffff 40%, rgba(255, 117, 143, 0.9) 70%, transparent 100%);
  mix-blend-mode: screen;
  transition: opacity 0.25s ease;
}

.pill-btn:hover::before, [role="tab"]:hover::before {
  opacity: 1;
  animation: fireworkSparkTabA 42s ease-in-out infinite alternate;
}

.pill-btn:hover::after, [role="tab"]:hover::after {
  opacity: 1;
  animation: fireworkSparkTabB 54s ease-in-out infinite alternate;
}

/* Linear Up/Down with Wide Harmonic Side-to-Side Sway for Tabs */
@keyframes fireworkSparkTabA {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.35);
  }
  15% {
    opacity: 0.95;
    transform: translate3d(14px, -4px, 0) scale(1.15);
    filter: brightness(2.6) drop-shadow(0 0 5px #ffffff) drop-shadow(0 0 10px #ff4d6d);
  }
  32% {
    opacity: 0.7;
    transform: translate3d(26px, -8px, 0) scale(0.8);
    filter: brightness(1.6);
  }
  50% {
    opacity: 1;
    transform: translate3d(4px, -13px, 0) scale(1.22);
    filter: brightness(2.7) drop-shadow(0 0 6px #ffffff) drop-shadow(0 0 12px #ef233c);
  }
  68% {
    opacity: 0.75;
    transform: translate3d(-20px, -17px, 0) scale(0.85);
    filter: brightness(1.5);
  }
  84% {
    opacity: 0.9;
    transform: translate3d(-28px, -21px, 0) scale(1.1);
    filter: brightness(2.2);
  }
  100% {
    opacity: 0;
    transform: translate3d(-8px, -26px, 0) scale(0.25);
  }
}

@keyframes fireworkSparkTabB {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.3);
  }
  15% {
    opacity: 0.9;
    transform: translate3d(-14px, 3px, 0) scale(1.18);
    filter: brightness(2.4) drop-shadow(0 0 5px #ffffff) drop-shadow(0 0 10px #ff758f);
  }
  32% {
    opacity: 0.7;
    transform: translate3d(-26px, 7px, 0) scale(0.8);
    filter: brightness(1.5);
  }
  50% {
    opacity: 1;
    transform: translate3d(-3px, 11px, 0) scale(1.2);
    filter: brightness(2.6) drop-shadow(0 0 6px #ffffff) drop-shadow(0 0 12px #ef233c);
  }
  68% {
    opacity: 0.75;
    transform: translate3d(22px, 15px, 0) scale(0.85);
    filter: brightness(1.5);
  }
  84% {
    opacity: 0.9;
    transform: translate3d(30px, 19px, 0) scale(1.1);
    filter: brightness(2.1);
  }
  100% {
    opacity: 0;
    transform: translate3d(10px, 24px, 0) scale(0.2);
  }
}


header, main, footer, .navbar, .ticker-section, .hero, .clan-hub-section, .container, .tryouts-full-section {
  position: relative;
  z-index: 2;
}

.footer {
  background: rgba(6, 6, 8, 0.88) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}

/* ==========================================================================
   CLAN HUB VIDEO RECORDING LAYOUT (USER RECORDING SPEC)
   ========================================================================== */
.clan-hub-section {
  padding: 60px 20px 80px;
}

.clan-hub-video-grid {
  display: grid;
  grid-template-columns: 1fr 1.18fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .clan-hub-video-grid {
    grid-template-columns: 1fr;
  }
}

.clan-hub-left-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hub-card {
  padding: 24px;
  border-radius: var(--radius-xl);
}

.hub-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.hub-card-tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 800;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Roblox HQ Card */
.hq-stat-number {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1;
  color: #ffffff;
  margin-bottom: 4px;
}

.hq-stat-desc {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.hq-role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(18, 18, 24, 0.8);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.role-pill .dot-red {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-brand-crimson);
}

.hub-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-brand-crimson);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  transition: all var(--transition-fast);
}

.hub-card-link:hover {
  color: #ffffff;
  text-shadow: 0 0 10px var(--color-brand-crimson);
}

/* Scrim & War Log */
.scrim-match-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scrim-item {
  display: grid;
  grid-template-columns: 24px 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(10, 10, 14, 0.6);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
}

.match-badge {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 800;
}

.badge-win {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
}

.badge-loss {
  background: rgba(239, 35, 60, 0.15);
  border: 1px solid var(--color-border-crimson);
  color: var(--color-brand-crimson);
}

.match-rival {
  font-weight: 700;
  color: var(--color-text-primary);
}

.match-game {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-text-muted);
}

.match-score {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 800;
  color: #ffffff;
}

/* Tryouts & Recruitment Card ("Think you belong?") */
.tryouts-recruitment-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.recruitment-headline {
  font-size: 1.85rem;
  font-weight: 900;
  margin-bottom: 20px;
  color: #ffffff;
}

.recruitment-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.recruitment-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.step-num-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(239, 35, 60, 0.12);
  border: 1px solid var(--color-brand-crimson);
  color: var(--color-brand-crimson);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-body {
  display: flex;
  flex-direction: column;
}

.step-title {
  font-size: 0.9375rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 2px;
}

.step-desc {
  font-size: 0.8125rem;
  color: #c4c4d4;
  line-height: 1.45;
}

.btn-apply-now {
  width: 100%;
  padding: 14px;
  font-size: 0.875rem;
  border-radius: var(--radius-md);
}

/* Clan Code Strip */
.clan-code-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(10, 10, 14, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
  gap: 16px;
}

.code-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.code-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  color: #ff4d6d;
}

.code-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.code-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-brand-crimson);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}

.code-link:hover {
  color: #ffffff;
}

/* ==========================================
   TACTICAL ANIMATION SUITE (PHASE 1)
   Zero-dependency GPU-accelerated motion
   ========================================== */

/* 1. Cinematic Hero Reveal Stagger Sequence */
@keyframes heroReveal {
  from {
    opacity: 0;
    transform: translateY(36px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-crest-container {
  animation: heroReveal 1.0s 0.15s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.hero-title {
  animation: heroReveal 1.05s 0.30s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.hero-subtitle {
  animation: heroReveal 1.05s 0.45s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.hero-cta-group {
  animation: heroReveal 1.05s 0.60s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.hero-stats-grid {
  animation: heroReveal 1.1s 0.75s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

/* 2. Duelist Card Cascade Filter Animation */
@keyframes cardCascadeIn {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.player-card.card-cascade {
  animation: cardCascadeIn 0.58s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

/* 3. Desktop Hover Laser Glow & Red-Eye Glint */
@media (hover: hover) {
  .player-card {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.25s ease,
                box-shadow 0.25s ease;
  }
  .player-card:hover {
    transform: translateY(-5px);
    border-color: rgba(239, 35, 60, 0.7);
    box-shadow: 0 12px 32px rgba(239, 35, 60, 0.18), 0 0 0 1px rgba(239, 35, 60, 0.35);
  }
  .player-card:hover .avatar-wrapper svg {
    filter: drop-shadow(0 0 10px rgba(239, 35, 60, 0.85));
    transition: filter 0.25s ease;
  }
  .btn-primary-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(239, 35, 60, 0.45);
  }
}

/* 4. Mobile Tactile "Haptic" Tap Feedback */
.btn-primary-glow:active,
.btn-secondary-glass:active,
.pill-btn:active,
.player-card:active,
.hub-card:active,
.discord-chip:active {
  transform: scale(0.97) !important;
  border-color: var(--color-brand-crimson) !important;
  transition: transform 0.08s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* 5. Strict ADA Compliance: Motion Sensitivity Guardrail */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .global-cursor-glow {
    display: none !important;
  }
}

/* ==========================================
   ADVANCED UI POLISH (PASS 7)
   #16 Tabular numbers, #17 Balanced headlines,
   #13 Hit slop, and #3/#4 Command Menu
   ========================================== */

/* #17 Balanced Headlines */
h1, h2, h3, .hero-title, .hero-subtitle, .section-title, .tryouts-main-title {
  text-wrap: balance;
}

/* #16 Tabular Numbers for Speedometer Rolling */
.stat-value,
.hq-stat-number,
.spec-stat,
.code-num,
.duelist-stat,
.badge-count {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* #13 Hit Slop for Compact Touch Targets (WCAG 2.5.5) */
.discord-chip,
.modal-close,
.hamburger-btn,
.profile-link,
.style-switcher-btn,
.shrine-hud-btn {
  position: relative;
}

.discord-chip::after,
.modal-close::after,
.hamburger-btn::after,
.profile-link::after,
.shrine-hud-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 44px;
  min-height: 44px;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

/* #3 & #4 Tactical Command Palette (Ctrl+K) */
.command-palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 6, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 20px 20px;
  animation: cmdFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cmdFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.command-palette-box {
  width: 100%;
  max-width: 580px;
  background: rgba(12, 12, 16, 0.98);
  border: 1px solid var(--color-border-crimson);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(239, 35, 60, 0.22);
  overflow: hidden;
  animation: cmdSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cmdSlideDown {
  from { transform: translateY(-16px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.command-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border-subtle);
  background: rgba(20, 20, 28, 0.6);
}

.command-search-icon {
  font-size: 1.1rem;
}

.command-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
}

.command-kbd-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border-subtle);
}

.command-results-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
}

.command-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  border: 1px solid transparent;
}

.command-item:hover,
.command-item.selected {
  background: rgba(239, 35, 60, 0.12);
  border-color: rgba(239, 35, 60, 0.4);
}

.command-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.command-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--color-brand-crimson);
}

.command-item-title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: #ffffff;
}

.command-item-subtitle {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.command-item-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-brand-crimson);
  background: rgba(239, 35, 60, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
}

.command-palette-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: rgba(8, 8, 12, 0.95);
  border-top: 1px solid var(--color-border-subtle);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.cmd-kbd {
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 5px;
  border-radius: 3px;
  color: #ffffff;
}

/* ==========================================
   WALLPAPER MODE (CLEAR ALL UI TABS & CARDS)
   Instantly clears navbar, hero, cards, forms & footer
   to reveal the pure animated Torii Shrine canvas.
   ========================================== */
body.wallpaper-mode .global-shrine-backdrop {
  position: fixed !important;
  inset: 0 !important;
  height: 100vh !important;
  max-height: none !important;
  z-index: 10 !important;
}

body.wallpaper-mode .shrine-bottom-fade {
  display: none !important;
}

body.wallpaper-mode header.navbar,
body.wallpaper-mode main,
body.wallpaper-mode footer,
body.wallpaper-mode .toast-container {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease;
}

body.wallpaper-mode .shrine-hud-widget {
  z-index: 99999 !important;
  border-color: #ef233c !important;
  box-shadow: 0 0 25px rgba(239, 35, 60, 0.5), 0 12px 40px rgba(0, 0, 0, 0.9) !important;
}

body.wallpaper-mode #btnToggleUI {
  background: #ef233c !important;
  color: #ffffff !important;
  border-color: #ef233c !important;
  box-shadow: 0 0 16px rgba(239, 35, 60, 0.8) !important;
  animation: pulseRestoreBtn 2s infinite alternate ease-in-out;
}

@keyframes pulseRestoreBtn {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

.shrine-hud-btn-wide {
  min-width: 110px;
  justify-content: center;
  font-weight: 700;
}

/* Floating Restore Pill (Top Center in Wallpaper Mode) */
.wallpaper-restore-pill {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-70px);
  z-index: 99999;
  background: rgba(14, 2, 5, 0.94);
  border: 1px solid #ef233c;
  color: #ffffff;
  padding: 10px 22px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(239, 35, 60, 0.4), 0 8px 24px rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

body.wallpaper-mode .wallpaper-restore-pill {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

.wallpaper-restore-pill:hover {
  background: #ef233c;
  color: #ffffff;
  box-shadow: 0 0 25px rgba(239, 35, 60, 0.7);
}

.wallpaper-restore-kbd {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
}

/* Navbar Clear UI quick button */
.nav-wallpaper-btn {
  padding: 8px 14px;
  font-size: 0.8125rem;
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-crimson);
  background: rgba(239, 35, 60, 0.08);
  color: var(--color-text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-wallpaper-btn:hover {
  background: var(--color-brand-crimson);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(239, 35, 60, 0.6);
}

@media (max-width: 820px) {
  .nav-wallpaper-text {
    display: none;
  }
}

/* Environment Gating: Wallpaper mode & Shrine HUD suppressed outside local dev */
body:not(.dev-env) .nav-wallpaper-btn,
body:not(.dev-env) .shrine-hud-widget,
body:not(.dev-env) .wallpaper-restore-pill {
  display: none !important;
}

