/* ============================================================================
   RATTIKAN SYNDICATE — ORIGINAL MIDNIGHT CHROME UI & ANIMATIONS
   ============================================================================ */

:root {
  --bg-deep: #040406;
  --bg-surface: rgba(14, 15, 19, 0.72);
  --bg-card: rgba(255, 255, 255, 0.028);
  --bg-card-hover: rgba(255, 255, 255, 0.062);
  --border-subtle: rgba(255, 255, 255, 0.085);
  --border-strong: rgba(255, 255, 255, 0.24);
  --text-primary: #f5f6fa;
  --text-secondary: #9a9fab;
  --text-muted: #5a5e6b;
  --accent-glow: #e2e8f0;
  --font-display: "Unbounded", "Syne", sans-serif;
  --font-sans: "Inter", "Noto Sans Thai", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html,
body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #050507;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.32);
}

.hidden {
  display: none !important;
}

.glass-surface {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ============================================================================
   CINEMATIC INTRO CURTAIN
   ============================================================================ */

.intro-curtain {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #030304;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: curtainExit 0.85s var(--ease-out) 0.55s forwards;
}

.intro-inner {
  display: flex;
  align-items: center;
  gap: 18px;
}

.intro-line {
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  animation: lineExpand 0.45s var(--ease-out) forwards;
}

.intro-text {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.48em;
  color: #fff;
  text-indent: 0.48em;
  animation: introPulse 0.5s ease-out forwards;
}

@keyframes lineExpand {
  from { width: 0; opacity: 0; }
  to { width: 52px; opacity: 1; }
}

@keyframes introPulse {
  from { opacity: 0; transform: scale(0.92); filter: blur(6px); }
  to { opacity: 1; transform: scale(1); filter: blur(0); }
}

@keyframes curtainExit {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-16px); visibility: hidden; }
}

/* ============================================================================
   AMBIENT OVERLAYS & CANVAS
   ============================================================================ */

#ambient-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.bg-aurora {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  filter: blur(85px);
  mix-blend-mode: screen;
}

.bg-aurora-1 {
  width: 58vw;
  height: 58vw;
  top: -18vw;
  left: -12vw;
  background: radial-gradient(circle, rgba(190, 208, 245, 0.14) 0%, rgba(110, 125, 165, 0.05) 48%, transparent 72%);
  animation: auroraFloat1 16s ease-in-out infinite alternate;
}

.bg-aurora-2 {
  width: 52vw;
  height: 52vw;
  bottom: -18vw;
  right: -10vw;
  background: radial-gradient(circle, rgba(220, 228, 248, 0.13) 0%, rgba(130, 145, 185, 0.04) 50%, transparent 72%);
  animation: auroraFloat2 19s ease-in-out infinite alternate;
}

@keyframes auroraFloat1 {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.75; }
  50% { transform: translate3d(14vw, 8vh, 0) scale(1.16); opacity: 1; }
  100% { transform: translate3d(6vw, 18vh, 0) scale(0.95); opacity: 0.7; }
}

@keyframes auroraFloat2 {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.7; }
  50% { transform: translate3d(-14vw, -10vh, 0) scale(1.18); opacity: 1; }
  100% { transform: translate3d(-5vw, -18vh, 0) scale(0.96); opacity: 0.75; }
}

.bg-perspective-grid {
  position: fixed;
  inset: -40%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.14;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 72px 72px;
  transform: perspective(650px) rotateX(58deg) translateY(10%);
  -webkit-mask-image: radial-gradient(ellipse 65% 55% at 50% 62%, #000 10%, transparent 80%);
  mask-image: radial-gradient(ellipse 65% 55% at 50% 62%, #000 10%, transparent 80%);
  animation: gridScroll 14s linear infinite;
}

@keyframes gridScroll {
  from { background-position: 0 0; }
  to { background-position: 0 72px; }
}

.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0.035;
  background-image: radial-gradient(rgba(255, 255, 255, 0.8) 0.5px, transparent 0.5px);
  background-size: 3px 3px;
}

.vignette-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background: radial-gradient(circle at 60% 45%, transparent 25%, rgba(0, 0, 0, 0.84) 100%);
}

/* ============================================================================
   TOP FLOATING HUD NAVBAR
   ============================================================================ */

.top-nav-wrap {
  position: fixed;
  top: 18px;
  left: 24px;
  right: 24px;
  z-index: 60;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.top-nav {
  pointer-events: auto;
  width: 100%;
  max-width: 1320px;
  padding: 8px 12px 8px 14px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand-btn {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 2px 6px 2px 2px;
  transition: transform 0.25s var(--ease-out);
}

.brand-btn:hover {
  transform: translateX(2px);
}

.brand-logo-wrap {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #000;
  flex-shrink: 0;
}

.brand-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
  background: #000;
}

.brand-text-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.05;
}

.brand-name {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: #fff;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.24em;
  color: var(--text-muted);
  margin-top: 2px;
}

.top-nav-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-tab-btn {
  position: relative;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 9px;
  cursor: pointer;
  transition: color 0.22s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.nav-tab-btn:hover {
  color: #fff;
}

.nav-tab-btn.active {
  color: #050507;
  background: linear-gradient(180deg, #ffffff 0%, #cfd4e0 100%);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.22);
}

.top-nav-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.active-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-primary);
}

.active-label {
  color: var(--text-muted);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e2e8f0;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.85);
  animation: pulseGlow 2.2s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

.icon-hud-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.22s ease;
}

.icon-hud-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
}

/* ============================================================================
   VIEWS & TRANSITIONS
   ============================================================================ */

.view {
  position: relative;
  min-height: 100vh;
  width: 100%;
  z-index: 5;
  display: none;
  opacity: 0;
}

.view.view-active {
  display: flex;
  animation: viewEnter 0.6s var(--ease-out) forwards;
}

@keyframes viewEnter {
  from {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(14px) scale(0.99);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

.reveal-up {
  opacity: 0;
  transform: translateY(20px);
  animation: revealUp 0.75s var(--ease-out) calc(0.6s + var(--d, 0s)) forwards;
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.94);
  animation: revealScale 0.9s var(--ease-out) calc(0.6s + var(--d, 0s)) forwards;
}

@keyframes revealUp {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes revealScale {
  to { opacity: 1; transform: scale(1); }
}

/* ============================================================================
   VIEW 1: CINEMATIC SPLIT-STAGE HERO
   ============================================================================ */

#home-view {
  align-items: center;
  justify-content: center;
  padding: 96px 28px 92px;
  overflow: hidden;
}

.hero-bg-layer {
  position: fixed;
  inset: -6%;
  background-size: cover;
  background-position: center;
  opacity: 0.62;
  filter: contrast(1.12) brightness(0.84);
  z-index: 0;
  pointer-events: none;
  animation: liquidDrift 16s ease-in-out infinite alternate;
}

@keyframes liquidDrift {
  0% { transform: scale(1.03) translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(-1.8%, 1.2%, 0) scale(1.09) rotate(0.6deg); }
  100% { transform: scale(1.06) translate3d(1.4%, -1%, 0) rotate(-0.5deg); }
}

.home-grid {
  position: relative;
  z-index: 6;
  width: 100%;
  max-width: 1380px;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
}

.hero-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.hero-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.11);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.hero-headline-stack {
  position: relative;
  margin-bottom: 30px;
}

.hero-ghost-text {
  position: absolute;
  top: -16px;
  left: -4px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.8rem, 6.2vw, 5.7rem);
  line-height: 0.94;
  letter-spacing: 0.03em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.13);
  user-select: none;
  pointer-events: none;
  animation: ghostDrift 5.5s ease-in-out infinite alternate;
}

@keyframes ghostDrift {
  from { transform: translate3d(0, 0, 0); opacity: 0.55; }
  to { transform: translate3d(12px, -8px, 0); opacity: 1; }
}

.hero-headline {
  position: relative;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.7rem, 6vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: 0.03em;
  background: linear-gradient(120deg, #ffffff 0%, #cdd5e6 22%, #63697a 42%, #ffffff 55%, #b8c1d6 76%, #ffffff 100%);
  background-size: 240% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.92)) drop-shadow(0 0 24px rgba(255, 255, 255, 0.12));
  animation: chromeShine 5s linear infinite;
}

@keyframes chromeShine {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.hero-subline-row {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-line-accent {
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, #fff, transparent);
}

.hero-subline {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.34em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* Bento Division Cards */
.divisions-bento {
  width: 100%;
  margin-bottom: 24px;
}

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

.bento-div-card {
  position: relative;
  padding: 20px 20px 18px;
  border-radius: 16px;
  background: rgba(15, 16, 21, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform-style: preserve-3d;
  transition: transform 0.25s var(--ease-out), border-color 0.25s ease, box-shadow 0.28s ease;
}

.bento-div-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.14), transparent 65%);
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
}

.bento-div-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transition: left 0.65s var(--ease-out);
  pointer-events: none;
}

.bento-div-card:hover {
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.72), 0 0 28px rgba(255, 255, 255, 0.07);
}

.bento-div-card:hover::before {
  opacity: 1;
}

.bento-div-card:hover::after {
  left: 140%;
}

.bento-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bento-code {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

.bento-count-pill {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: #fff;
}

.bento-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bento-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-secondary);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bento-arrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  font-weight: 600;
  transition: transform 0.25s var(--ease-out);
}

.bento-div-card:hover .bento-arrow {
  transform: translateX(4px);
}

/* Founder Strip */
.founder-strip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.founder-label {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.26em;
  color: var(--text-muted);
}

.founder-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: all 0.25s ease;
}

.founder-chip:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-2px);
}

.founder-crest-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

/* Right Column: Frameless Centerpiece Stage */
.hero-right {
  display: flex;
  align-items: center;
  justify-content: center;
}

.eclipse-stage {
  position: relative;
  width: clamp(380px, 50vw, 720px);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eclipse-aura {
  position: absolute;
  width: 78%;
  height: 78%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(225, 232, 248, 0.16) 0%, rgba(140, 155, 195, 0.05) 45%, transparent 72%);
  filter: blur(34px);
  animation: auraPulse 5.5s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes auraPulse {
  from { transform: scale(0.95); opacity: 0.65; }
  to { transform: scale(1.1); opacity: 1; }
}

.hero-figure-img {
  position: relative;
  z-index: 4;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: contrast(1.06) brightness(1.04) drop-shadow(0 28px 54px rgba(0, 0, 0, 0.92));
  animation: figureHover 6s ease-in-out infinite;
  transition: transform 0.18s ease-out;
}

.yt-player-slot {
  position: fixed;
  left: -9999px;
  top: -9999px;
  width: 240px;
  height: 135px;
  opacity: 0;
  pointer-events: none;
}

@keyframes figureHover {
  0%, 100% { margin-top: 0px; }
  50% { margin-top: -12px; }
}

/* ============================================================================
   VIEW 2: DIVISION ROSTER COMMAND CENTER
   ============================================================================ */

#roster-view {
  flex-direction: column;
  align-items: center;
  padding: 96px 24px 110px;
}

.roster-bg-layer {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  opacity: 0.13;
  filter: grayscale(100%) contrast(1.15);
  z-index: 0;
  pointer-events: none;
}

.roster-container {
  position: relative;
  z-index: 6;
  width: 100%;
  max-width: 1320px;
  display: flex;
  flex-direction: column;
  gap: 38px;
}

.roster-banner {
  border-radius: 20px;
  padding: 26px 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.roster-banner-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.roster-unit-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.unit-sep {
  opacity: 0.4;
}

.roster-division-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 0 36px rgba(255, 255, 255, 0.16);
}

.roster-division-desc {
  margin-top: 10px;
  font-size: 0.86rem;
  color: var(--text-secondary);
  max-width: 600px;
}

.roster-banner-stats {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-box {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.stat-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}

.stat-lbl {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.22s ease;
}

.pill-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.34);
  color: #fff;
  transform: translateY(-1px);
}

.roster-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.rank-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rank-chip {
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.22s ease;
}

.rank-chip:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.rank-chip.active {
  background: #fff;
  color: #050507;
  border-color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.22);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: clamp(240px, 26vw, 330px);
  background: rgba(8, 8, 11, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  padding: 0 12px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-box:focus-within {
  border-color: rgba(255, 255, 255, 0.38);
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.09);
}

.search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-box input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  padding: 10px 10px;
}

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

.search-clear-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 4px;
}

.search-clear-btn.visible {
  display: inline-block;
}

/* Roster Tier Groups */
.roster-groups {
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.roster-group {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.group-header-bar {
  display: flex;
  align-items: center;
  gap: 14px;
}

.group-title {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
}

.group-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.16), transparent);
}

.group-count-badge {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

/* Member Cards Grid */
.members-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.members-grid.featured-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 340px));
  justify-content: start;
}

.member-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 14px 18px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  text-align: center;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.25s var(--ease-out), background 0.25s ease, border-color 0.25s ease, box-shadow 0.28s ease;
  animation: cardReveal 0.45s var(--ease-out) backwards;
}

.members-grid.featured-grid .member-card {
  flex-direction: row;
  text-align: left;
  padding: 18px 20px;
  gap: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border-color: rgba(255, 255, 255, 0.16);
}

.members-grid.featured-grid .member-avatar-ring {
  width: 68px;
  height: 68px;
  margin-bottom: 0;
}

.member-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(180px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.14), transparent 70%);
  opacity: 0;
  transition: opacity 0.26s ease;
  pointer-events: none;
}

.member-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.62);
}

.member-card:hover::before {
  opacity: 1;
}

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.member-avatar-ring {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.05));
  margin-bottom: 14px;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease;
}

.member-card:hover .member-avatar-ring {
  transform: scale(1.06);
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.18);
}

.member-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #000;
  display: block;
}

.member-avatar.is-default-logo {
  object-fit: contain;
  padding: 6px;
}

.member-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.member-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  word-break: break-word;
}

.member-tag {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--text-muted);
  word-break: break-all;
}

.member-role {
  margin-top: 6px;
  display: inline-block;
  align-self: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.members-grid.featured-grid .member-role {
  align-self: flex-start;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

.roster-empty {
  margin: 48px auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--text-secondary);
}

/* ============================================================================
   FLOATING BOTTOM DOCK
   ============================================================================ */

.bottom-dock {
  position: fixed;
  bottom: 18px;
  left: 24px;
  right: 24px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.dock-left {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 14px;
  gap: 10px;
}

.social-links {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.social-link {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.social-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.dock-sep {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
}

.music-player {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.music-cover-btn {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #000;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.music-cover-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.music-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.music-title {
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  max-width: 165px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 11px;
  opacity: 0.35;
}

.music-bars span {
  width: 2px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
}

.music-bars.playing { opacity: 0.95; }
.music-bars.playing span:nth-child(1) { animation: barEq 0.75s ease-in-out infinite alternate; }
.music-bars.playing span:nth-child(2) { animation: barEq 0.55s ease-in-out 0.15s infinite alternate; }
.music-bars.playing span:nth-child(3) { animation: barEq 0.85s ease-in-out 0.3s infinite alternate; }
.music-bars.playing span:nth-child(4) { animation: barEq 0.62s ease-in-out 0.1s infinite alternate; }

@keyframes barEq {
  from { height: 3px; }
  to { height: 11px; }
}

.volume-wrap { display: flex; align-items: center; }

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 62px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.dock-right {
  pointer-events: auto;
}

.credit-pill {
  padding: 9px 14px;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.62);
  text-transform: uppercase;
}

/* ============================================================================
   MODAL & TOAST
   ============================================================================ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  border-radius: 18px;
  padding: 28px 26px;
  animation: viewEnter 0.28s var(--ease-out);
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.modal-member-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.modal-member-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: #000;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.modal-subtitle {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.modal-info-box {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 0.86rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
}

.modal-code {
  margin-top: 12px;
  background: #070709;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #d6dbe6;
  overflow-x: auto;
  white-space: pre;
}

.modal-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.toast {
  position: fixed;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  z-index: 100;
  background: rgba(22, 23, 29, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.78rem;
  padding: 9px 18px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s var(--ease-out);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 1120px) {
  .members-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .home-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-left {
    align-items: center;
    text-align: center;
    order: 2;
  }
  .hero-right {
    order: 1;
  }
  .hero-subline-row {
    justify-content: center;
  }
  .hero-ghost-text {
    left: 50%;
    transform: translateX(-50%);
    animation: none;
  }
  .eclipse-stage {
    width: clamp(240px, 60vw, 360px);
  }
  .members-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .top-nav-wrap {
    top: 12px;
    left: 12px;
    right: 12px;
  }
  .active-count-pill,
  .brand-sub,
  .credit-pill {
    display: none;
  }
  .nav-tab-btn {
    padding: 7px 10px;
    font-size: 0.64rem;
  }
  .division-bento-grid {
    grid-template-columns: 1fr;
  }
  #roster-view {
    padding: 82px 14px 104px;
  }
  .members-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .members-grid.featured-grid {
    grid-template-columns: 1fr;
  }
  .search-box {
    width: 100%;
  }
  .bottom-dock {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
  .volume-wrap {
    display: none;
  }
}
