/* =====================================================
   Slyraf.com – Main Stylesheet
   Dark Neon Gaming Aesthetic · Redesign 2026
   ===================================================== */

/* ── GOOGLE FONTS ────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ── CSS VARIABLES ───────────────────────────────────── */
:root {
  /* Core palette */
  --orange:       #FF9B26;
  --orange-bright:#FFB347;
  --red-orange:   #EE4F27;
  --purple:       #6B21EF;
  --purple-light: #B83DFF;
  --purple-muted: #9146ff;

  /* Backgrounds & surfaces */
  --bg:           #0E0918;
  --surface:      #1B1728;
  --surface2:     #1F192A;
  --surface3:     #2A2440;

  /* Text */
  --text:         #ffffff;
  --text-secondary: #D1CECE;
  --text-muted:   #9D9797;

  /* Borders */
  --border:       rgba(255, 142, 93, 0.08);
  --border-hover: rgba(255, 142, 93, 0.20);
  --border-active:rgba(255, 142, 93, 0.35);

  /* Accent aliases */
  --accent:       #FF9B26;
  --accent2:      #FFB347;

  /* Gradients */
  --grad-flame:     linear-gradient(135deg, #FF9B26, #EE4F27);
  --grad-rainbow:   linear-gradient(135deg, #FFB347, #FF6B9D, #B83DFF);
  --grad-hero:      linear-gradient(135deg, #FF9B26 0%, #EE4F27 30%, #B83DFF 70%, #6B21EF 100%);
  --grad-purple:    linear-gradient(135deg, #6B21EF, #B83DFF);
  --grad-text:      linear-gradient(135deg, #fff 20%, #FFB347 50%, #B83DFF 100%);
  --grad-underline: linear-gradient(90deg, #FF9B26, #EE4F27, #B83DFF, transparent);

  /* Element colours (Wuthering Waves) */
  --fusion:   #FF6B2B;
  --spectro:  #D4AF37;
  --aero:     #4ECDC4;
  --electro:  #9B59B6;
  --glacio:   #74B9FF;
  --havoc:    #E056FD;

  /* Layout */
  --sidebar-w:  300px;
  --block-gap:  1rem;

  /* Transitions */
  --tr:           200ms cubic-bezier(0.4, 0, 0.2, 1);
  --tr-slow:      300ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Radius */
  --r-sm:   8px;
  --r-md:   16px;
  --r-lg:   24px;
  --r-full: 9999px;

  /* Shadows / Glows */
  --glow-orange:  0 0 20px rgba(255, 155, 38, 0.25), 0 0 60px rgba(255, 155, 38, 0.08);
  --glow-purple:  0 0 20px rgba(107, 33, 239, 0.3), 0 0 60px rgba(184, 61, 255, 0.1);
  --glow-card:    0 8px 32px rgba(255, 155, 38, 0.12), 0 0 0 1px rgba(255, 142, 93, 0.15);
  --shadow-lg:    0 20px 60px rgba(0, 0, 0, 0.5);
  --shadow-card:  0 4px 24px rgba(0, 0, 0, 0.3);
  --inset-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

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

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

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 155, 38, 0.3); }

/* Selection */
::selection {
  background: rgba(255, 155, 38, 0.3);
  color: #fff;
}

/* ── OVERLAY ─────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 9, 24, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--tr);
}

.overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ── SIDEBAR ─────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 50;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform var(--tr-slow);
  overflow-y: auto;
  box-shadow: 4px 0 30px rgba(0, 0, 0, 0.4);
}

.sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 155, 38, 0.2), transparent 30%, transparent 70%, rgba(184, 61, 255, 0.15));
  pointer-events: none;
}

@media (min-width: 960px) {
  .sidebar {
    transform: translateX(0);
  }
  .hamburger {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-20px);
    transition: opacity 300ms ease, transform 300ms ease;
  }
  .hamburger.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    transition: opacity 300ms ease 150ms, transform 300ms ease 150ms;
  }
  .main-content {
    margin-left: var(--sidebar-w);
  }
}

.sidebar.open {
  transform: translateX(0);
}

/* Sidebar Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
}

.sidebar-logo::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 155, 38, 0.3), transparent);
}

.sidebar-logo img {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  object-fit: cover;
  box-shadow: 0 0 12px rgba(255, 155, 38, 0.2);
}

.sidebar-logo span {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--grad-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Sidebar Nav */
.sidebar-nav {
  flex: 1;
  padding: 16px 0;
  overflow-y: auto;
}

.nav-section-label {
  padding: 18px 20px 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.5;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--tr), background var(--tr), border-color var(--tr);
  position: relative;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(255, 155, 38, 0.04);
  border-left-color: rgba(255, 155, 38, 0.3);
}

.nav-item.active {
  color: var(--accent);
  background: rgba(255, 155, 38, 0.06);
  border-left-color: var(--accent);
  box-shadow: inset 0 0 30px rgba(255, 155, 38, 0.03);
}

.nav-item .nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity var(--tr);
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
  opacity: 1;
}

/* LDShop icon swap */
.nav-item:hover .ldshop-icon { content: url('/images/icons/ldshop-white.png'); }
html.light .ldshop-icon { content: url('/images/icons/ldshop.png'); }
html.light .nav-item:hover .ldshop-icon { content: url('/images/icons/ldshop-black.png'); }

/* Nav Group Toggle */
.nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--tr), background var(--tr);
  user-select: none;
  border-left: 3px solid transparent;
}

.nav-group-toggle:hover {
  color: var(--text);
  background: rgba(255, 155, 38, 0.04);
  border-left-color: rgba(255, 155, 38, 0.3);
}

.nav-group-toggle .left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-group-toggle .arrow {
  width: 14px;
  height: 14px;
  transition: transform var(--tr-slow);
  opacity: 0.5;
}

.nav-group.open .nav-group-toggle .arrow {
  transform: rotate(180deg);
}

.nav-group.open .nav-group-toggle {
  color: var(--text);
  border-left-color: rgba(255, 155, 38, 0.2);
}

.nav-group-items {
  max-height: 0;
  overflow: hidden;
  transition: max-height 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-group.open .nav-group-items {
  max-height: 500px;
}

/* Sidebar Sub-Items */
.nav-sub-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px 10px 44px;
  font-size: 0.84rem;
  color: var(--text-muted);
  transition: color var(--tr), background var(--tr);
  position: relative;
}

.nav-sub-item:hover {
  color: var(--text);
  background: rgba(255, 155, 38, 0.04);
}

.nav-sub-item.active {
  color: var(--accent);
  background: rgba(255, 155, 38, 0.06);
}

.nav-sub-item::before {
  content: '';
  position: absolute;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transition: opacity var(--tr), box-shadow var(--tr);
}

.nav-sub-item:hover::before,
.nav-sub-item.active::before {
  opacity: 1;
  box-shadow: 0 0 6px rgba(255, 155, 38, 0.5);
}

/* Sidebar Social */
.sidebar-social {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.sidebar-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: var(--surface2);
  border: 1px solid var(--border);
  transition: border-color var(--tr), background var(--tr), box-shadow var(--tr), transform var(--tr);
}

.sidebar-social a:hover {
  border-color: rgba(255, 155, 38, 0.3);
  background: rgba(255, 155, 38, 0.08);
  box-shadow: 0 0 12px rgba(255, 155, 38, 0.15);
  transform: translateY(-1px);
}

.sidebar-social svg {
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity var(--tr);
}

.sidebar-social a:hover svg {
  opacity: 1;
}

/* ── HAMBURGER ───────────────────────────────────────── */
.hamburger {
  position: fixed;
  top: 19px;
  left: 16px;
  z-index: 60;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  width: 42px;
  height: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: border-color var(--tr), box-shadow var(--tr), background var(--tr);
}

.hamburger:hover {
  border-color: rgba(255, 155, 38, 0.4);
  box-shadow: 0 0 16px rgba(255, 155, 38, 0.2), var(--inset-highlight);
  background: var(--surface2);
}

.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--tr), opacity var(--tr), background var(--tr);
}

.hamburger:hover span {
  background: var(--accent);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── MAIN LAYOUT ─────────────────────────────────────── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ── SECTION ─────────────────────────────────────────── */
.section {
  padding: 48px 48px;
}

@media (max-width: 640px) {
  .section {
    padding: 36px 20px;
  }
}

.section-tight {
  padding-top: 24px;
  padding-bottom: 24px;
}

@media (max-width: 640px) {
  .section-tight {
    padding-top: 18px;
    padding-bottom: 18px;
  }
}

/* Section Header */
.section-header {
  margin-bottom: 36px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

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

.section-divider {
  width: 64px;
  height: 3px;
  background: var(--grad-underline);
  border-radius: var(--r-full);
  margin-top: 10px;
}

/* ── HERO ────────────────────────────────────────────── */
.hero {
  padding: 56px 48px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: visible;
}

/* ── HERO BAR (homepage only) ─────────────────────────── */
.hero-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 80px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  position: relative;
  flex-shrink: 0;
  transition: padding var(--tr-slow);
}
.hero-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,155,38,.05) 0%, rgba(107,33,239,.03) 50%, transparent 100%);
  pointer-events: none;
}
.hero-bar-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.hero-bar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

/* ── HERO DROPDOWN ───────────────────────────────────── */
.hero-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}
.hero-dropdown-menu {
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  transition: max-width 400ms cubic-bezier(0.4, 0, 0.2, 1), opacity 250ms ease;
  pointer-events: none;
}
.hero-dropdown:hover .hero-dropdown-menu {
  max-width: 800px;
  opacity: 1;
  pointer-events: auto;
}
.hero-dropdown-item {
  padding: 6px 14px;
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  border-radius: 6px;
  transition: color var(--tr), background var(--tr);
}
.hero-dropdown-item:hover {
  color: var(--accent);
  background: rgba(255,155,38,.08);
}
.partner-banner-bar {
  flex: 1;
  margin: 0;
  padding: 4px 14px;
  gap: 10px;
  border-radius: 8px;
  min-width: 0;
  box-shadow: none;
  align-items: center;
}
.partner-banner-bar::before { display: none; }
.partner-banner-bar img { height: 28px; object-fit: contain; flex-shrink: 0; }
.partner-banner-bar .partner-text { min-width: 0; display: flex; align-items: baseline; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.partner-banner-bar .partner-text strong { font-size: .78rem; display: inline; }
.partner-banner-bar .partner-text span { font-size: .78rem; display: inline; color: var(--text-muted); }
.partner-banner-bar .partner-btn { padding: 4px 12px; font-size: .74rem; white-space: nowrap; flex-shrink: 0; }

/* ── STREAM VIEWPORT (fills remaining height) ────────── */
.main-home {
  height: 100vh;
  overflow-y: auto;
}
.stream-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 300px;
}
.stream-viewport .stream-layout {
  flex: 1;
  display: flex;
  gap: 0;
  min-height: 0;
}
.stream-viewport .stream-box {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  border: none;
  border-right: 1px solid var(--border);
  box-shadow: none;
}
.stream-viewport .stream-embed {
  flex: 1;
  aspect-ratio: unset;
  min-height: 280px;
}
.stream-viewport .stream-chat {
  width: 340px;
  flex-shrink: 0;
  border-radius: 0;
  border: none;
  border-left: 1px solid var(--border);
  box-shadow: none;
}

/* ── PARTNER IN STREAM HEADER ────────────────────────── */
.stream-status {
  display: flex;
  align-items: center;
  gap: 10px;
}
.stream-partner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255,155,38,.15);
  background: rgba(255,155,38,.04);
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: border-color var(--tr), background var(--tr), color var(--tr);
  white-space: nowrap;
}
.stream-partner:hover {
  border-color: rgba(255,155,38,.4);
  background: rgba(255,155,38,.1);
  color: var(--text);
}
.stream-partner-logo {
  height: 28px;
  width: auto;
}
.stream-partner-text strong {
  color: var(--accent);
  font-weight: 700;
}
.stream-partner-cta {
  padding: 3px 12px;
  border-radius: 6px;
  background: var(--grad-flame);
  color: #fff;
  font-size: .74rem;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .stream-viewport .stream-layout {
    flex-direction: column;
  }
  .stream-viewport .stream-chat {
    width: 100%;
    height: 300px;
    border-left: none;
    border-top: 1px solid var(--border);
  }
  .stream-partner { display: none; }
}
@media (max-width: 640px) {
  .hero-bar {
    padding: 0 16px;
    height: 44px;
    gap: 8px;
  }
  .hero-bar-sub { display: none; }
  .partner-banner-bar { display: none; }
  .hero {
    padding: 40px 20px 32px;
  }
}

/* Hero background glow orbs */
.hero::before {
  content: '';
  position: absolute;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(255, 155, 38, 0.10) 0%, rgba(238, 79, 39, 0.04) 25%, transparent 60%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  top: -80px;
  right: -120px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(107, 33, 239, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border: 1px solid rgba(255, 155, 38, 0.3);
  border-radius: var(--r-full);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(255, 155, 38, 0.08);
  margin-bottom: 24px;
  box-shadow: 0 0 20px rgba(255, 155, 38, 0.08);
  position: relative;
  z-index: 1;
}

.hero-tagline {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  background: var(--grad-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 30px rgba(255, 155, 38, 0.15));
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 500px;
  line-height: 1.7;
  margin-bottom: 36px;
  position: relative;
  z-index: 1;
}

/* ── BUTTONS ─────────────────────────────────────────── */
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--tr);
  border: none;
  font-family: inherit;
  position: relative;
}

.btn-primary {
  background: var(--grad-flame);
  color: #fff;
  box-shadow: 0 4px 20px rgba(255, 155, 38, 0.3), var(--inset-highlight);
}

.btn-primary:hover {
  box-shadow: 0 8px 32px rgba(255, 155, 38, 0.45), 0 0 0 1px rgba(255, 155, 38, 0.2), var(--inset-highlight);
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-hover);
  backdrop-filter: blur(4px);
}

.btn-outline:hover {
  color: var(--text);
  border-color: rgba(255, 155, 38, 0.35);
  background: rgba(255, 155, 38, 0.06);
  box-shadow: 0 0 16px rgba(255, 155, 38, 0.1);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.82rem;
  border-radius: var(--r-sm);
}

/* ── CARDS ────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color var(--tr), box-shadow var(--tr), transform var(--tr);
  box-shadow: var(--shadow-card);
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--glow-card);
}

/* ── GAME CARDS ──────────────────────────────────────── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 20px;
}

.game-card {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform var(--tr), box-shadow var(--tr), border-color var(--tr);
  display: block;
  aspect-ratio: 3/4;
}

.game-card:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 40px rgba(255, 155, 38, 0.2), 0 0 0 1px rgba(255, 155, 38, 0.15);
  border-color: rgba(255, 155, 38, 0.3);
}

.game-card > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter var(--tr), transform var(--tr);
}

.game-card:hover > img {
  filter: brightness(0.8) saturate(1.1);
  transform: scale(1.05);
}

.game-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14, 9, 24, 0.95) 0%, rgba(14, 9, 24, 0.4) 40%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  transition: background var(--tr);
}

.game-card:hover .game-card-overlay {
  background: linear-gradient(to top, rgba(14, 9, 24, 0.98) 0%, rgba(14, 9, 24, 0.5) 45%, transparent 65%);
}

.game-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.game-card-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
  display: inline-block;
}

.game-card-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--grad-flame);
  transition: width var(--tr);
}

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

/* Coming Soon Cards */
.card-coming-soon {
  border-style: dashed;
  border-color: rgba(255, 142, 93, 0.12);
  background: var(--surface2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  aspect-ratio: 3/4;
  border-radius: var(--r-md);
  border-width: 1px;
  transition: border-color var(--tr);
}

.card-coming-soon:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(255, 142, 93, 0.2);
}

.coming-soon-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.coming-soon-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--text-muted);
  fill: none;
}

.coming-soon-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.coming-soon-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.5;
  text-align: center;
  padding: 0 16px;
}

/* ── SOCIAL GRID ─────────────────────────────────────── */
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color var(--tr), background var(--tr), transform var(--tr), box-shadow var(--tr);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.social-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-flame);
  opacity: 0;
  transition: opacity var(--tr);
}

.social-card:hover {
  border-color: rgba(255, 155, 38, 0.25);
  background: rgba(255, 155, 38, 0.04);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(255, 155, 38, 0.12), 0 0 0 1px rgba(255, 155, 38, 0.08);
}

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

.social-card-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--tr);
}

.social-card:hover .social-card-name {
  color: var(--text);
}

/* ── STREAM BOX ──────────────────────────────────────── */
.stream-layout {
  display: flex;
  gap: 16px;
}
.stream-layout .stream-box {
  flex: 1;
  min-width: 0;
}
.stream-chat {
  width: 340px;
  flex-shrink: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  align-self: stretch;
}
.stream-chat iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
@media (max-width: 900px) {
  .stream-layout {
    flex-direction: column;
  }
  .stream-chat {
    width: 100%;
    height: 400px;
  }
}

.stream-box {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.stream-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.01);
  flex-shrink: 0;
}

.stream-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4444;
  flex-shrink: 0;
}

.stream-dot.live {
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.6), 0 0 20px rgba(34, 197, 94, 0.3);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.stream-status-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.stream-status-text.live {
  color: #22c55e;
}

.stream-embed {
  position: relative;
  aspect-ratio: 16/9;
  background: #050510;
}

.stream-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.stream-offline {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: radial-gradient(ellipse at center, rgba(27, 23, 40, 0.8), transparent);
}

.stream-offline-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--r-md);
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stream-offline-icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--text-muted);
  fill: none;
}

.stream-offline-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.stream-offline-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.5;
}

.stream-offline-link {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  background: rgba(107, 33, 239, 0.15);
  border: 1px solid rgba(107, 33, 239, 0.3);
  border-radius: var(--r-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--purple-light);
  transition: background var(--tr), box-shadow var(--tr), transform var(--tr);
}

.stream-offline-link:hover {
  background: rgba(107, 33, 239, 0.25);
  box-shadow: 0 0 20px rgba(107, 33, 239, 0.2);
  transform: translateY(-1px);
}

/* ── PARTNER BANNER ──────────────────────────────────── */
.partner-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 26px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.partner-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-rainbow);
}

.partner-banner img {
  height: 36px;
  object-fit: contain;
}

.partner-text {
  flex: 1;
  min-width: 160px;
}

.partner-text strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
}

.partner-text span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.partner-btn {
  padding: 10px 22px;
  background: var(--grad-flame);
  border-radius: var(--r-sm);
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  transition: box-shadow var(--tr), transform var(--tr);
  box-shadow: 0 4px 16px rgba(255, 155, 38, 0.25);
}

.partner-btn:hover {
  box-shadow: 0 6px 24px rgba(255, 155, 38, 0.4);
  transform: translateY(-1px);
}

/* ── FOOTER ──────────────────────────────────────────── */
footer {
  margin-top: auto;
  padding: 12px 80px 12px 48px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
  font-size: 0.78rem;
}

footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 48px;
  right: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 155, 38, 0.15), rgba(184, 61, 255, 0.1), transparent);
}

@media (max-width: 640px) {
  footer {
    padding: 24px 20px;
    flex-direction: column;
    text-align: center;
  }
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color var(--tr);
  position: relative;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--tr);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-links a:hover::after {
  width: 100%;
}

/* ── BREADCRUMB ──────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0 48px;
  margin-bottom: 0;
  padding-top: 34px;
  flex-wrap: wrap;
  position: relative;
  transition: padding var(--tr-slow);
  z-index: 2;
}

@media (max-width: 640px) {
  .breadcrumb {
    padding: 20px 20px 0;
    margin-bottom: -16px;
  }
}

.breadcrumb a {
  transition: color var(--tr);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb .sep {
  opacity: 0.3;
  color: var(--accent);
}

.breadcrumb .current {
  color: var(--text);
  font-weight: 600;
}

/* ── INFO / WARN BOXES ───────────────────────────────── */
.info-box {
  padding: 16px 20px;
  border-radius: 12px;
  background: rgba(107, 33, 239, 0.07);
  border: 1px solid rgba(107, 33, 239, 0.2);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  box-shadow: inset 0 0 30px rgba(107, 33, 239, 0.03);
}

.info-box strong {
  color: var(--purple-light);
}

.warn-box {
  padding: 16px 20px;
  border-radius: 12px;
  background: rgba(255, 155, 38, 0.06);
  border: 1px solid rgba(255, 155, 38, 0.2);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  box-shadow: inset 0 0 30px rgba(255, 155, 38, 0.03);
}

.warn-box strong {
  color: var(--accent);
}

.info-box + .info-box,
.info-box + .warn-box,
.warn-box + .info-box,
.warn-box + .warn-box {
  margin-top: 0.6rem;
}
.info-box + .stat-row,
.info-box + .stat-row--stacked,
.info-box + .stat-row--priority,
.warn-box + .stat-row,
.warn-box + .stat-row--stacked,
.warn-box + .stat-row--priority {
  margin-top: 0.4rem;
}

/* ── BADGES / TAGS ───────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: 1px solid transparent;
}

.badge-5star,
.badge-4star {
  text-transform: uppercase;
}

.badge-fusion {
  background: rgba(255, 107, 43, 0.12);
  color: var(--fusion);
  border-color: rgba(255, 107, 43, 0.25);
  box-shadow: 0 0 8px rgba(255, 107, 43, 0.08);
}

.badge-spectro {
  background: rgba(212, 175, 55, 0.12);
  color: var(--spectro);
  border-color: rgba(212, 175, 55, 0.25);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.08);
}

.badge-aero {
  background: rgba(78, 205, 196, 0.12);
  color: var(--aero);
  border-color: rgba(78, 205, 196, 0.25);
  box-shadow: 0 0 8px rgba(78, 205, 196, 0.08);
}

.badge-electro {
  background: rgba(155, 89, 182, 0.12);
  color: var(--electro);
  border-color: rgba(155, 89, 182, 0.25);
  box-shadow: 0 0 8px rgba(155, 89, 182, 0.08);
}

.badge-glacio {
  background: rgba(116, 185, 255, 0.12);
  color: var(--glacio);
  border-color: rgba(116, 185, 255, 0.25);
  box-shadow: 0 0 8px rgba(116, 185, 255, 0.08);
}

.badge-havoc {
  background: rgba(224, 86, 253, 0.12);
  color: var(--havoc);
  border-color: rgba(224, 86, 253, 0.25);
  box-shadow: 0 0 8px rgba(224, 86, 253, 0.08);
}

.badge-weapon {
  background: var(--surface2);
  color: var(--text-muted);
  border-color: var(--border);
}

.badge-5star {
  background: rgba(255, 184, 0, 0.12);
  color: #FFB800;
  border-color: rgba(255, 184, 0, 0.25);
  box-shadow: 0 0 10px rgba(255, 184, 0, 0.1);
}

.badge-4star {
  background: rgba(156, 105, 241, 0.12);
  color: #9C69F1;
  border-color: rgba(156, 105, 241, 0.25);
  box-shadow: 0 0 10px rgba(156, 105, 241, 0.1);
}

.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--surface2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: border-color var(--tr);
}

/* ── GUIDE LAYOUT ────────────────────────────────────── */
.guide-grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 900px) {
  .guide-grid {
    grid-template-columns: 1fr 340px;
  }
}

.guide-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.guide-aside {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.guide-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  position: relative;
  transition: border-color var(--tr), box-shadow var(--tr);
}
.guide-block:hover {
  border-color: var(--border-hover);
}
.guide-block + .guide-block {
  margin-top: var(--block-gap, 1rem);
}

/* Subtle glass-like top highlight */
.guide-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  pointer-events: none;
}

.guide-block-header {
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.01);
}

.guide-block-title {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.guide-block-title svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent);
  fill: none;
  flex-shrink: 0;
  filter: drop-shadow(0 0 4px rgba(255, 155, 38, 0.3));
}

.guide-block-body {
  padding: 20px;
}

/* Stat Rows */
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-row .label {
  color: var(--text-muted);
}

.stat-row .value {
  font-weight: 600;
}

/* Stacked variant for prose descriptions */
.stat-row--stacked {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.stat-row--stacked:last-child { border-bottom: none; }
.stat-row--stacked .label {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
}
.stat-row--stacked .value {
  font-weight: 400;
  color: var(--text-secondary, var(--text-muted));
  line-height: 1.7;
}

/* ── KEYWORD HIGHLIGHTS ─────────────────────────────── */
.kw { font-weight: 600; }
.kw-fusion    { color: var(--fusion); }
.kw-ability   { color: var(--accent2); }
.kw-resource  { color: var(--glacio); }
.kw-state     { color: #22c55e; }
.kw-mode      { color: var(--purple-light); }

/* Priority row (numbered, accented) */
.stat-row--priority {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.stat-row--priority:last-child { border-bottom: none; }
.stat-row--priority .label {
  font-weight: 800;
  color: var(--accent);
}
.stat-row--priority.secondary .label {
  font-weight: 600;
  color: var(--text-muted);
}
.stat-row--priority .value {
  font-weight: 600;
}

/* ── SKILL PRIORITY BAR ──────────────────────────────── */
.skill-priority-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.skill-priority-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
}
.skill-priority-item.high {
  border-color: rgba(255, 155, 38, 0.3);
  background: rgba(255, 155, 38, 0.06);
}
.skill-priority-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: .8rem;
  font-weight: 800;
  line-height: 0;
  flex-shrink: 0;
  background: var(--surface3);
  color: var(--text-muted);
}
.skill-priority-item.high .skill-priority-num {
  background: var(--grad-flame);
  color: #000;
  box-shadow: 0 0 12px rgba(255, 155, 38, 0.3);
}
.skill-priority-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.skill-priority-name {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text);
}
.skill-priority-item.high .skill-priority-name {
  color: var(--accent);
}
.skill-priority-pct {
  font-size: .72rem;
  color: var(--text-muted);
}
.skill-priority-arrow {
  color: var(--text-muted);
  font-size: 1rem;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .skill-priority-bar { gap: 6px; }
  .skill-priority-item { padding: 6px 10px 6px 6px; }
  .skill-priority-arrow { font-size: .85rem; }
}

/* ── ECHO SET ────────────────────────────────────────── */
.echo-set-block {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  margin-bottom: .75rem;
}
.echo-set-img {
  width: 56px;
  height: 56px;
  border-radius: var(--r-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.echo-set-info {
  flex: 1;
  min-width: 0;
}
.echo-set-info strong {
  display: block;
  font-size: .85rem;
  color: var(--accent);
  margin-bottom: 4px;
}
.echo-set-info p {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}
.echo-cost-row {
  display: flex;
  gap: 10px;
  margin-bottom: .75rem;
}
.echo-cost-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.echo-cost-img {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}
.echo-cost-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.echo-cost-label {
  font-size: .7rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
}
.echo-cost-value {
  font-size: .78rem;
  color: var(--text-muted);
}
@media (max-width: 640px) {
  .echo-cost-row { flex-direction: column; }
}

/* Priority List */
.priority-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.priority-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface2);
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  border: 1px solid var(--border);
  transition: border-color var(--tr);
}

.priority-item:hover {
  border-color: var(--border-hover);
}

.priority-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--grad-flame);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(255, 155, 38, 0.3);
}

.priority-bar {
  height: 4px;
  border-radius: var(--r-full);
  background: var(--grad-flame);
  margin-top: 4px;
  box-shadow: 0 0 6px rgba(255, 155, 38, 0.2);
}

/* Team Cards */
.team-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  transition: border-color var(--tr);
}

.team-card:hover {
  border-color: var(--border-hover);
}

.team-card + .team-card {
  margin-top: 12px;
}

.team-name {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.team-members {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.team-member {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  font-size: 0.82rem;
  transition: border-color var(--tr);
}

.team-member:hover {
  border-color: var(--border-hover);
}

.team-member img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.team-dpr {
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.team-dpr strong {
  color: var(--accent);
}

/* ── TIER TABLE (Restyled as grid of cards) ──────────── */
.tier-section {
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.tier-section-title {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.6;
  background: rgba(255, 255, 255, 0.01);
}

.tier-table {
  width: 100%;
}

.tier-row {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 0;
  border-bottom: 1px solid var(--border);
}

.tier-row:last-child {
  border-bottom: none;
}

.tier-label {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  padding: 16px 8px;
  border-right: 1px solid var(--border);
  position: relative;
}

/* Tier label glow effects */
.tier-label.sp {
  color: #FF6B2B;
  background: rgba(255, 107, 43, 0.08);
  text-shadow: 0 0 12px rgba(255, 107, 43, 0.4);
}

.tier-label.s {
  color: #FFB800;
  background: rgba(255, 184, 0, 0.06);
  text-shadow: 0 0 12px rgba(255, 184, 0, 0.4);
}

.tier-label.a {
  color: #4ECDC4;
  background: rgba(78, 205, 196, 0.06);
  text-shadow: 0 0 12px rgba(78, 205, 196, 0.3);
}

.tier-label.b {
  color: #74B9FF;
  background: rgba(116, 185, 255, 0.05);
  text-shadow: 0 0 12px rgba(116, 185, 255, 0.3);
}

.tier-label.c {
  color: var(--text-muted);
  background: transparent;
}

.tier-label.d {
  color: #636363;
  background: transparent;
}

.tier-chars {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 18px;
  align-items: flex-start;
}

.tier-char {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 68px;
  cursor: default;
  transition: transform var(--tr);
}

.tier-char:hover {
  transform: translateY(-2px);
}

.tier-char img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--border);
  transition: border-color var(--tr), transform var(--tr), box-shadow var(--tr);
  background: var(--surface2);
}

.tier-char:hover img {
  border-color: var(--accent);
  transform: scale(1.08);
  box-shadow: 0 0 16px rgba(255, 155, 38, 0.25);
}

.tier-char-name {
  font-size: 0.68rem;
  text-align: center;
  color: var(--text-muted);
  line-height: 1.2;
  transition: color var(--tr);
}

.tier-char:hover .tier-char-name {
  color: var(--text);
}

.tier-cat-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  opacity: 0.5;
  width: 100%;
  padding: 4px 0 0;
}

/* ── DPR TABLE ───────────────────────────────────────── */
.dpr-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.dpr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.dpr-table th {
  padding: 14px 16px;
  background: var(--surface2);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.dpr-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.dpr-table tr:last-child td {
  border-bottom: none;
}

.dpr-table tr {
  transition: background var(--tr);
}

.dpr-table tr:hover td {
  background: rgba(255, 155, 38, 0.03);
}

.dpr-rank {
  width: 36px;
  font-weight: 700;
  color: var(--text-muted);
}

.dpr-rank.top1 {
  color: #FFB800;
  text-shadow: 0 0 10px rgba(255, 184, 0, 0.4);
}

.dpr-rank.top2 {
  color: #C0C0C0;
  text-shadow: 0 0 8px rgba(192, 192, 192, 0.3);
}

.dpr-rank.top3 {
  color: #CD7F32;
  text-shadow: 0 0 8px rgba(205, 127, 50, 0.3);
}

.char-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.char-cell img {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  object-fit: cover;
  border: 1px solid var(--border);
}

.dpr-bar-wrap {
  width: 120px;
}

.dpr-bar {
  height: 6px;
  border-radius: var(--r-full);
  background: var(--grad-flame);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(255, 155, 38, 0.3);
}

.dpr-val {
  font-weight: 700;
  color: var(--text);
  font-size: 0.9rem;
}

.dpr-dps {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Sort / Filter buttons */
.sort-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.sort-btn {
  padding: 8px 16px;
  border-radius: var(--r-sm);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--tr);
  font-family: inherit;
}

.sort-btn:hover,
.sort-btn.active {
  border-color: rgba(255, 155, 38, 0.35);
  color: var(--accent);
  background: rgba(255, 155, 38, 0.08);
  box-shadow: 0 0 12px rgba(255, 155, 38, 0.1);
}

/* ── FILTER PANEL ──────────────────────────────────── */
.filter-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.filter-panel-search {
  position: relative;
}

.filter-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.filter-search-input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--tr), box-shadow var(--tr);
}

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

.filter-search-input:focus {
  border-color: rgba(255, 155, 38, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 155, 38, 0.08);
}

.filter-panel-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-panel-filters { display: contents; }
.filter-panel-sep { display: none; }

.filter-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 65px;
}

.filter-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--tr);
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.filter-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

.filter-btn:hover {
  border-color: rgba(255, 155, 38, 0.25);
  color: var(--text-secondary);
  background: var(--surface3);
}

.filter-btn.active {
  border-color: rgba(255, 155, 38, 0.4);
  color: var(--accent);
  background: rgba(255, 155, 38, 0.1);
  box-shadow: 0 0 12px rgba(255, 155, 38, 0.08);
}

/* Element filter buttons – idle */
.filter-btn[data-filter="aero"]    { background: rgba(78, 205, 196, 0.12); color: var(--aero);    border-color: rgba(78, 205, 196, 0.25); }
.filter-btn[data-filter="electro"] { background: rgba(155, 89, 182, 0.12); color: var(--electro); border-color: rgba(155, 89, 182, 0.25); }
.filter-btn[data-filter="fusion"]  { background: rgba(255, 107, 43, 0.12); color: var(--fusion);  border-color: rgba(255, 107, 43, 0.25); }
.filter-btn[data-filter="glacio"]  { background: rgba(116, 185, 255, 0.12); color: var(--glacio);  border-color: rgba(116, 185, 255, 0.25); }
.filter-btn[data-filter="havoc"]   { background: rgba(224, 86, 253, 0.12); color: var(--havoc);   border-color: rgba(224, 86, 253, 0.25); }
.filter-btn[data-filter="spectro"] { background: rgba(212, 175, 55, 0.12); color: var(--spectro); border-color: rgba(212, 175, 55, 0.25); }

/* Element filter buttons – hover */
.filter-btn[data-filter="aero"]:hover    { background: rgba(78, 205, 196, 0.2);  border-color: rgba(78, 205, 196, 0.4);  box-shadow: 0 0 10px rgba(78, 205, 196, 0.12); }
.filter-btn[data-filter="electro"]:hover { background: rgba(155, 89, 182, 0.2);  border-color: rgba(155, 89, 182, 0.4);  box-shadow: 0 0 10px rgba(155, 89, 182, 0.12); }
.filter-btn[data-filter="fusion"]:hover  { background: rgba(255, 107, 43, 0.2);  border-color: rgba(255, 107, 43, 0.4);  box-shadow: 0 0 10px rgba(255, 107, 43, 0.12); }
.filter-btn[data-filter="glacio"]:hover  { background: rgba(116, 185, 255, 0.2);  border-color: rgba(116, 185, 255, 0.4);  box-shadow: 0 0 10px rgba(116, 185, 255, 0.12); }
.filter-btn[data-filter="havoc"]:hover   { background: rgba(224, 86, 253, 0.2);  border-color: rgba(224, 86, 253, 0.4);  box-shadow: 0 0 10px rgba(224, 86, 253, 0.12); }
.filter-btn[data-filter="spectro"]:hover { background: rgba(212, 175, 55, 0.2);  border-color: rgba(212, 175, 55, 0.4);  box-shadow: 0 0 10px rgba(212, 175, 55, 0.12); }

/* Element filter buttons – active */
.filter-btn[data-filter="aero"].active    { background: rgba(78, 205, 196, 0.25); border-color: rgba(78, 205, 196, 0.6);  box-shadow: 0 0 14px rgba(78, 205, 196, 0.2); }
.filter-btn[data-filter="electro"].active { background: rgba(155, 89, 182, 0.25); border-color: rgba(155, 89, 182, 0.6);  box-shadow: 0 0 14px rgba(155, 89, 182, 0.2); }
.filter-btn[data-filter="fusion"].active  { background: rgba(255, 107, 43, 0.25); border-color: rgba(255, 107, 43, 0.6);  box-shadow: 0 0 14px rgba(255, 107, 43, 0.2); }
.filter-btn[data-filter="glacio"].active  { background: rgba(116, 185, 255, 0.25); border-color: rgba(116, 185, 255, 0.6);  box-shadow: 0 0 14px rgba(116, 185, 255, 0.2); }
.filter-btn[data-filter="havoc"].active   { background: rgba(224, 86, 253, 0.25); border-color: rgba(224, 86, 253, 0.6);  box-shadow: 0 0 14px rgba(224, 86, 253, 0.2); }
.filter-btn[data-filter="spectro"].active { background: rgba(212, 175, 55, 0.25); border-color: rgba(212, 175, 55, 0.6);  box-shadow: 0 0 14px rgba(212, 175, 55, 0.2); }

.filter-reset {
  margin-left: auto;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--tr);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.filter-reset:hover {
  color: var(--red-orange);
  border-color: rgba(238, 79, 39, 0.3);
  background: rgba(238, 79, 39, 0.06);
}

/* ── CHARACTER HEADER ────────────────────────────────── */
.char-header {
  padding: 28px 48px var(--block-gap);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .char-header {
    padding: 24px 20px;
  }
}

.char-portrait-wrap {
  position: relative;
  flex-shrink: 0;
}

.char-portrait {
  width: 110px;
  height: 110px;
  border-radius: var(--r-md);
  object-fit: cover;
  border: 2px solid transparent;
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 0 24px rgba(255, 155, 38, 0.15), 0 0 0 2px rgba(255, 155, 38, 0.2);
}

.char-portrait-frame {
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--r-md) + 2px);
  border: 2px solid transparent;
  background: var(--grad-flame) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.char-info {
  flex: 1;
  min-width: 220px;
}

.char-name {
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(255, 155, 38, 0.1));
}

.char-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.char-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 12px;
  max-width: 560px;
  line-height: 1.7;
}

/* ── CHARACTER LIST ──────────────────────────────────── */
.char-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
}

.char-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color var(--tr), transform var(--tr), box-shadow var(--tr);
  display: block;
  position: relative;
}

.char-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow .35s ease;
  pointer-events: none;
}

.char-card:hover {
  transform: translateY(-8px) scale(1.04);
  transition: transform .35s cubic-bezier(.22,1,.36,1), border-color .35s ease, box-shadow .35s ease;
}

/* ── Per-element card hover glow ─────── */
.char-card[data-filter-val="aero"]:hover {
  border-color: rgba(78, 205, 196, 0.4);
  box-shadow: 0 16px 40px rgba(78, 205, 196, 0.2), 0 0 20px rgba(78, 205, 196, 0.1);
}
.char-card[data-filter-val="aero"]:hover::after {
  box-shadow: inset 0 0 40px rgba(78, 205, 196, 0.08);
}

.char-card[data-filter-val="electro"]:hover {
  border-color: rgba(155, 89, 182, 0.4);
  box-shadow: 0 16px 40px rgba(155, 89, 182, 0.2), 0 0 20px rgba(155, 89, 182, 0.1);
}
.char-card[data-filter-val="electro"]:hover::after {
  box-shadow: inset 0 0 40px rgba(155, 89, 182, 0.08);
}

.char-card[data-filter-val="fusion"]:hover {
  border-color: rgba(255, 107, 43, 0.4);
  box-shadow: 0 16px 40px rgba(255, 107, 43, 0.2), 0 0 20px rgba(255, 107, 43, 0.1);
}
.char-card[data-filter-val="fusion"]:hover::after {
  box-shadow: inset 0 0 40px rgba(255, 107, 43, 0.08);
}

.char-card[data-filter-val="glacio"]:hover {
  border-color: rgba(116, 185, 255, 0.4);
  box-shadow: 0 16px 40px rgba(116, 185, 255, 0.2), 0 0 20px rgba(116, 185, 255, 0.1);
}
.char-card[data-filter-val="glacio"]:hover::after {
  box-shadow: inset 0 0 40px rgba(116, 185, 255, 0.08);
}

.char-card[data-filter-val="havoc"]:hover {
  border-color: rgba(224, 86, 253, 0.4);
  box-shadow: 0 16px 40px rgba(224, 86, 253, 0.2), 0 0 20px rgba(224, 86, 253, 0.1);
}
.char-card[data-filter-val="havoc"]:hover::after {
  box-shadow: inset 0 0 40px rgba(224, 86, 253, 0.08);
}

.char-card[data-filter-val="spectro"]:hover {
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 16px 40px rgba(212, 175, 55, 0.2), 0 0 20px rgba(212, 175, 55, 0.1);
}
.char-card[data-filter-val="spectro"]:hover::after {
  box-shadow: inset 0 0 40px rgba(212, 175, 55, 0.08);
}

.char-card-img-wrap {
  overflow: hidden;
  aspect-ratio: 1;
}

.char-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform .5s cubic-bezier(.22,1,.36,1), filter .5s ease;
  filter: brightness(1);
}

.char-card:hover .char-card-img {
  transform: scale(1.12);
  filter: brightness(1.1);
}

.char-card-info {
  padding: 12px 14px 14px;
}

.char-card-name {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.char-card-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

/* ── PACKAGE CARDS ───────────────────────────────────── */
.pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.pack-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color var(--tr), box-shadow var(--tr), transform var(--tr);
  position: relative;
}

.pack-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--glow-card);
  transform: translateY(-2px);
}

.pack-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.01);
}

.pack-card-name {
  font-size: 0.95rem;
  font-weight: 700;
}

.pack-card-body {
  padding: 16px 20px;
}

.pack-card-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
}

.pack-card-price-ldshop {
  font-size: 0.82rem;
  color: #22c55e;
  font-weight: 600;
  margin-top: 2px;
}

.pack-card-tier {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 0.7rem;
  font-weight: 700;
}

/* Tier-colored top borders for pack cards */
.tier-sp-badge {
  background: rgba(255, 107, 43, 0.12);
  color: #FF6B2B;
  border: 1px solid rgba(255, 107, 43, 0.25);
}

.tier-s-badge {
  background: rgba(255, 184, 0, 0.12);
  color: #FFB800;
  border: 1px solid rgba(255, 184, 0, 0.25);
}

.tier-a-badge {
  background: rgba(78, 205, 196, 0.12);
  color: #4ECDC4;
  border: 1px solid rgba(78, 205, 196, 0.25);
}

.tier-d-badge {
  background: rgba(100, 100, 100, 0.12);
  color: #888;
  border: 1px solid rgba(100, 100, 100, 0.2);
}

.pack-contents {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-top: 10px;
}

.pack-note {
  font-size: 0.78rem;
  font-style: italic;
  color: var(--text-muted);
  opacity: 0.6;
  margin-top: 8px;
}

/* ── TEXT CONTENT (Legal, Privacy) ────────────────────── */
.content-page {
  max-width: 760px;
}

.content-page h1 {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 8px;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.content-page h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 36px;
  margin-bottom: 12px;
  color: var(--accent);
}

.content-page p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 12px;
}

.content-page ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.content-page li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.content-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.5;
  margin-bottom: 32px;
}

/* ── CONTACT ─────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  max-width: 600px;
  margin: 0 auto;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color var(--tr), background var(--tr), box-shadow var(--tr), transform var(--tr);
}

.contact-card:hover {
  border-color: rgba(255, 155, 38, 0.25);
  background: rgba(255, 155, 38, 0.03);
  box-shadow: 0 8px 24px rgba(255, 155, 38, 0.1);
  transform: translateY(-1px);
}

.contact-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color var(--tr), box-shadow var(--tr);
}

.contact-card:hover .contact-icon {
  border-color: rgba(255, 155, 38, 0.3);
  box-shadow: 0 0 12px rgba(255, 155, 38, 0.15);
}

.contact-card-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.contact-card-value {
  font-size: 0.9rem;
  font-weight: 600;
}

/* ── TABS SYSTEM ─────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: relative;
  mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs:not(:hover) { scroll-behavior: smooth; }

.tab-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.tab-btn {
  padding: 14px 26px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color var(--tr), border-color var(--tr), background var(--tr);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  position: relative;
}

.tab-btn:hover {
  color: var(--text);
  background: rgba(255, 155, 38, 0.04);
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: rgba(255, 155, 38, 0.06);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-flame);
  box-shadow: 0 0 8px rgba(255, 155, 38, 0.4);
}

.tab-content {
  padding: 0;
}

.tab-pane {
  display: none;
  animation: fadeIn 200ms ease;
  padding-top: var(--block-gap);
}

.tab-pane.active {
  display: block;
}

/* Nested tab-panes (sub-tabs) need less top padding */
.tab-pane > .tab-pane {
  padding-top: 0.5rem;
}

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

/* ── GENERAL TAB LAYOUT ──────────────────────────────── */
.general-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--block-gap);
  align-items: stretch;
}
.general-row .guide-block {
  margin-top: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.general-row .guide-block-body { flex: 1; }
.general-row + .general-row { margin-top: var(--block-gap); }
@media (max-width: 768px) {
  .general-row { grid-template-columns: 1fr; }
}

/* ── RECAP BLOCK ────────────────────────────────────── */
.recap-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.recap-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}
.recap-item:last-child { border-bottom: none; }
.recap-label {
  font-size: .85rem;
  color: var(--text-muted);
  font-weight: 500;
}
.recap-tiers {
  display: flex;
  gap: 12px;
}
.recap-tier {
  display: flex;
  align-items: center;
  gap: 6px;
}
.recap-tier-mode {
  font-size: .75rem;
  color: var(--text-muted);
}
.recap-tier-btn {
  margin-top: 8px;
  width: 100%;
  text-align: center;
}
.general-row .guide-block-header { padding: 12px 16px 10px; }
.general-row .guide-block-body { padding: 12px 16px; }

/* ── TIER RANK ───────────────────────────────────────── */
.tier-rank-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.tier-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  font-size: 1.3rem;
  font-weight: 900;
  flex-shrink: 0;
}
.tier-rank-badge.tier-splus { background: linear-gradient(135deg, #ff6b2b, #eab308); color: #000; box-shadow: 0 0 16px rgba(255, 107, 43, 0.3); }
.tier-rank-badge.tier-s  { background: linear-gradient(135deg, #eab308, #f59e0b); color: #000; box-shadow: 0 0 16px rgba(234, 179, 8, 0.3); }
.tier-rank-badge.tier-a  { background: linear-gradient(135deg, #a855f7, #7c3aed); color: #fff; box-shadow: 0 0 16px rgba(168, 85, 247, 0.3); }
.tier-rank-badge.tier-b  { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; box-shadow: 0 0 16px rgba(59, 130, 246, 0.3); }
.tier-rank-badge.tier-c  { background: linear-gradient(135deg, #6b7280, #4b5563); color: #fff; }
.tier-rank-label {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 600;
  flex: 1;
  min-width: 0;
}
.btn-sm {
  padding: 8px 16px;
  font-size: 0.8rem;
  border-radius: 8px;
}

/* ── VIDEO EMBED ──────────────────────────────────────── */
.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface2);
}
.video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}

/* ── PROS / CONS ─────────────────────────────────────── */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.pros-col-header,
.cons-col-header {
  font-size: .95rem;
  font-weight: 600;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pros-col-header { color: #22c55e; }
.cons-col-header { color: #ef4444; }
.pros-icon, .cons-icon { font-size: .85rem; }
.pros-list,
.cons-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pros-list li,
.cons-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: .9rem;
  line-height: 1.4;
  color: var(--text);
}
.pros-list li {
  background: rgba(34, 197, 94, .1);
  border: 1px solid rgba(34, 197, 94, .25);
}
.pros-list li::before {
  content: '✓';
  color: #22c55e;
  font-weight: 700;
  font-size: .95rem;
  flex-shrink: 0;
}
.cons-list li {
  background: rgba(239, 68, 68, .1);
  border: 1px solid rgba(239, 68, 68, .25);
}
.cons-list li::before {
  content: '✗';
  color: #ef4444;
  font-weight: 700;
  font-size: .95rem;
  flex-shrink: 0;
}

/* ── SUB-TABS (nested) ───────────────────────────────── */
.tab-pane > .tabs {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  border-bottom-color: var(--border);
}
.tab-pane > .tabs > .tab-btn {
  padding: 8px 16px;
  font-size: 0.8rem;
}
.tab-pane > .tab-pane > .guide-block:first-child {
  margin-top: 0;
}

/* ── BUILD ROW ───────────────────────────────────────── */
.build-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--block-gap);
  align-items: start;
}
.build-row .guide-block { margin-top: 0; }
.guide-block + .build-row,
.build-row + .guide-block { margin-top: var(--block-gap); }
@media (max-width: 768px) {
  .build-row { grid-template-columns: 1fr; }
}
.build-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── BUILD CARD (armes + échos) ─────────────────────── */
.build-card {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  transition: border-color var(--tr), box-shadow var(--tr);
}
.build-card:hover { border-color: var(--border-hover); }
.build-card.best {
  background: linear-gradient(135deg, rgba(234,179,8,.1), rgba(255,107,43,.08));
  border: 2px solid rgba(234,179,8,.3);
}
.build-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.build-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--surface2);
}
.build-card-icon.icon-5star {
  background: linear-gradient(135deg, rgba(234,179,8,.2), rgba(255,155,38,.15));
  border-color: rgba(234,179,8,.35);
}
.build-card-icon.icon-4star {
  background: linear-gradient(135deg, rgba(107,33,239,.2), rgba(59,130,246,.15));
  border-color: rgba(107,33,239,.3);
}
.build-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.build-card-info {
  flex: 1;
  min-width: 0;
}
.build-card-badge {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 2px;
}
.build-card-badge.signature { background: #eab308; color: #000; }
.build-card-badge.alternative { background: #6b7280; color: #fff; }
.build-card-badge.bp { background: #3b82f6; color: #fff; }
.build-card-badge.f2p { background: #22c55e; color: #fff; }
.build-card-name {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
}
.build-card-sub {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: 1px;
}
.build-card-pct {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.build-card-pct.muted { color: var(--text-muted); font-size: 1rem; }
.build-card-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.build-detail {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(0,0,0,.2);
  border-left: 3px solid var(--border);
}
.build-detail.stats  { border-left-color: #eab308; }
.build-detail.passif { border-left-color: #3b82f6; }
.build-detail.avis   { border-left-color: #6b7280; }
.build-detail-label {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.build-detail.stats .build-detail-label  { color: #eab308; }
.build-detail.passif .build-detail-label { color: #3b82f6; }
.build-detail.avis .build-detail-label   { color: #9ca3af; }

/* ── COMP CARDS (équipes tab) ─────────────────────────── */
.comp-card {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: border-color var(--tr);
}
.comp-card:hover { border-color: var(--border-hover); }
.comp-card + .comp-card { margin-top: var(--block-gap); }
.comp-card.best {
  background: linear-gradient(135deg, rgba(234,179,8,.06), rgba(255,107,43,.04));
  border: 2px solid rgba(234,179,8,.3);
}
.comp-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.comp-card-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}

/* Main team members row */
.comp-members {
  display: flex;
  justify-content: space-evenly;
  margin-bottom: 12px;
}
.comp-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  max-width: 200px;
}
.comp-portrait {
  width: 90px;
  height: 105px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.comp-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.comp-portrait .avatar-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface2);
}
.comp-portrait.role-dps    { border-color: #ef4444; }
.comp-portrait.role-sub    { border-color: var(--accent); }
.comp-portrait.role-support { border-color: #22c55e; }
.comp-role {
  font-size: .65rem;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 3px;
  text-transform: uppercase;
}
.comp-role.role-dps     { background: #ef4444; color: #fff; }
.comp-role.role-sub     { background: var(--accent); color: #000; }
.comp-role.role-support { background: #22c55e; color: #000; }
.comp-name {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

/* Alternative members (nested under each comp-member) */
.comp-member-alts {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  justify-content: center;
}
.comp-alt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.comp-alt img {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border);
}
.comp-alt span:last-child {
  font-size: .7rem;
  color: var(--text-muted);
}

/* Description */
.comp-desc {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(0,0,0,.2);
  border-left: 3px solid rgba(234,179,8,.4);
}
.comp-card.best .comp-desc {
  border-left-color: rgba(234,179,8,.6);
}

@media (max-width: 640px) {
  .comp-members { gap: 8px; }
  .comp-portrait { width: 70px; height: 82px; }
  .comp-member-alts { gap: 6px; }
  .comp-alt img { width: 34px; height: 34px; }
}

/* ── ROTATION STEP ───────────────────────────────────── */
.rotation-step {
  display: flex;
  gap: 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.rotation-step:last-child { border-bottom: none; }
.rotation-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--grad-flame);
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  line-height: 0;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(255, 155, 38, 0.3);
  margin-top: 2px;
}
.rotation-text {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.6;
}
.rotation-text strong { color: var(--accent); }

/* ── TEAM CARD extensions (base in Team Cards section above) */
.team-card-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.team-card-members {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.team-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* (Search overlay moved to bottom — see SEARCH MODAL section) */

/* ── BACK TO TOP ─────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity var(--tr), transform var(--tr), border-color var(--tr), box-shadow var(--tr), background var(--tr);
  box-shadow: var(--shadow-card);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: rgba(255, 155, 38, 0.4);
  background: var(--surface2);
  box-shadow: 0 0 20px rgba(255, 155, 38, 0.2);
  transform: translateY(-2px);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-muted);
  fill: none;
  transition: stroke var(--tr);
}

.back-to-top:hover svg {
  stroke: var(--accent);
}

/* ── SCROLL REVEAL ───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.reveal:nth-child(2) { transition-delay: 50ms; }
.reveal:nth-child(3) { transition-delay: 100ms; }
.reveal:nth-child(4) { transition-delay: 150ms; }
.reveal:nth-child(5) { transition-delay: 200ms; }
.reveal:nth-child(6) { transition-delay: 250ms; }

/* ── HERO CAROUSEL ───────────────────────────────────── */
.hero-carousel {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--r-lg);
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

.carousel-slide.active {
  position: relative;
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
}

.carousel-slide img {
  width: 100%;
  height: auto;
  border-radius: var(--r-lg);
  display: block;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.carousel-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--border-hover);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--tr);
  padding: 0;
}

.carousel-dots button.active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(255, 155, 38, 0.4);
  transform: scale(1.2);
}

.carousel-dots button:hover {
  border-color: var(--accent);
  background: rgba(255, 155, 38, 0.3);
}

/* ── DIVIDER ─────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* ── UTILITIES ───────────────────────────────────────── */
.mt-4  { margin-top: 16px; }
.mt-6  { margin-top: 24px; }
.mt-8  { margin-top: 32px; }
.text-muted  { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.font-bold   { font-weight: 700; }
.text-sm     { font-size: 0.85rem; }

/* ── WW GUIDE CARDS (used in inline styles, ensure vars match) ── */
/* These are defined inline in wuthering-waves/index.html but depend on our variables */

/* ── RESPONSIVE: TABLET / SMALL DESKTOP ──────────────── */
@media (max-width: 959px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }
}

/* ── RESPONSIVE: MOBILE ──────────────────────────────── */
@media (max-width: 640px) {
  .section {
    padding: 32px 16px;
  }

  .hero {
    padding: 72px 16px 48px;
  }

  .char-header {
    padding: 20px 16px;
    gap: 20px;
  }

  .char-portrait {
    width: 96px;
    height: 96px;
  }

  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
  }

  .char-list {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }

  .tier-row {
    grid-template-columns: 48px 1fr;
  }

  .tier-chars {
    gap: 8px;
    padding: 12px;
  }

  .tier-char {
    width: 56px;
  }

  .tier-char img {
    width: 48px;
    height: 48px;
  }

  .dpr-table {
    font-size: 0.8rem;
  }

  .dpr-table th,
  .dpr-table td {
    padding: 10px 10px;
  }

  .dpr-bar-wrap {
    width: 80px;
  }

  .pack-grid {
    grid-template-columns: 1fr;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }

  .social-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  footer {
    padding: 24px 16px;
    flex-direction: column;
    text-align: center;
  }

  .breadcrumb {
    padding: 16px 16px 0;
    margin-bottom: -12px;
  }
}

/* ── SIDEBAR HEADER / FOOTER / SEARCH BTN ───────────── */
.sidebar-header {
  flex-shrink: 0;
  position: relative;
}

.sidebar-close {
  position: absolute;
  top: 30px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: color var(--tr), background var(--tr);
}
.sidebar-close:hover {
  color: var(--text);
  background: var(--surface2);
}

/* Sidebar collapsed on desktop */
@media (min-width: 960px) {
  .sidebar.collapsed {
    transform: translateX(-100%);
  }
  .main-content.sidebar-collapsed {
    margin-left: 0;
  }
  .main-content.sidebar-collapsed .breadcrumb {
    padding-left: 72px;
  }
  .main-content.sidebar-collapsed .hero-bar {
    padding-left: 72px;
  }
  .main-content.sidebar-collapsed .stream-header {
    padding-left: 72px;
  }
  footer.sidebar-collapsed {
    margin-left: 0;
  }
}

.sidebar-search-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 40px);
  margin: 12px 20px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--tr), background var(--tr), box-shadow var(--tr);
}

.sidebar-search-btn:hover {
  border-color: rgba(255, 155, 38, 0.3);
  background: rgba(255, 155, 38, 0.06);
  box-shadow: 0 0 12px rgba(255, 155, 38, 0.1);
}

.sidebar-search-btn svg {
  flex-shrink: 0;
  opacity: 0.5;
}

.sidebar-search-btn span {
  flex: 1;
  text-align: left;
}

.sidebar-search-btn kbd {
  font-size: 0.68rem;
  font-family: inherit;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  opacity: 0.6;
}

.sidebar-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  padding: 0;
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 24px);
  margin: 0 12px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  transition: color var(--tr), background var(--tr), border-color var(--tr);
}

.theme-toggle-btn:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(255, 155, 38, 0.08);
}

.theme-icon-dark,
.theme-icon-light {
  display: none;
  align-items: center;
  gap: 8px;
}
.theme-icon-dark svg,
.theme-icon-light svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.theme-label {
  font-weight: 600;
}

/* Dark mode (default): show sun icon + "Mode clair" */
.theme-icon-dark { display: inline-flex; }
/* Light mode: show moon icon + "Mode sombre" */
html.light .theme-icon-dark { display: none; }
html.light .theme-icon-light { display: inline-flex; }

/* ── CALCULS – DONUT CHART ──────────────────────────── */
.calcul-layout {
  display: grid;
  grid-template-columns: 500px 1fr;
  gap: 32px;
  align-items: center;
  margin-top: 16px;
}
.calcul-chart {
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1;
}
.calcul-chart svg { width: 100%; height: 100%; }
.calcul-slice {
  cursor: pointer;
  transition: opacity .3s, filter .3s;
}
.calcul-slice:hover { filter: brightness(1.2); }
.calcul-slice.dimmed { opacity: .25; }
.calcul-connector { pointer-events: none; }

/* Legend */
.calcul-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.calcul-legend-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(0,0,0,.15);
  border: 1px solid var(--border);
  transition: background var(--tr), opacity var(--tr), border-color var(--tr);
  cursor: pointer;
}
.calcul-legend-item:hover {
  background: rgba(0,0,0,.25);
  border-color: var(--item-color);
}
.calcul-legend-item.active {
  border-color: var(--item-color);
}
.calcul-legend-item.dimmed {
  opacity: .35;
}
.calcul-legend-color {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}
.calcul-legend-info {
  flex: 1;
  min-width: 0;
}
.calcul-legend-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.calcul-legend-name {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
}
.calcul-legend-pct {
  font-size: 1.1rem;
  font-weight: 800;
}
.calcul-legend-desc {
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 768px) {
  .calcul-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .calcul-chart { max-width: 280px; }
}

/* ── SEARCH MODAL ───────────────────────────────────── */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(14, 9, 24, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--tr-slow);
}

.search-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.search-modal {
  width: 92%;
  max-width: 580px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(255, 155, 38, 0.08);
  animation: searchSlideIn 200ms ease;
}

@keyframes searchSlideIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.search-input-wrapper svg {
  flex-shrink: 0;
  opacity: 0.4;
}

.search-input-wrapper .search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  font-weight: 500;
  padding: 0;
  box-shadow: none;
  width: auto;
  max-width: none;
  border-radius: 0;
}

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

.search-kbd {
  font-size: 0.68rem;
  font-family: inherit;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  opacity: 0.6;
}

.search-results {
  max-height: 360px;
  overflow-y: auto;
  padding: 6px 0;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  cursor: pointer;
  transition: background var(--tr);
}

.search-result-item:hover {
  background: rgba(255, 155, 38, 0.06);
}

.search-result-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.search-result-name mark {
  background: rgba(255, 155, 38, 0.25);
  color: var(--accent);
  border-radius: 2px;
  padding: 0 2px;
}

.search-result-path {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.5;
}

.search-no-results {
  padding: 24px 20px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── PAGE TRANSITION ────────────────────────────────── */
.main-content {
  animation: pageIn 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ── LIGHT MODE ─────────────────────────────────────── */
html.light {
  --bg:           #f5f3f0;
  --surface:      #ffffff;
  --surface2:     #f0ede8;
  --surface3:     #e6e2dc;

  --text:         #1a1520;
  --text-secondary: #4a4550;
  --text-muted:   #8a8590;

  --border:       rgba(20, 10, 40, 0.08);
  --border-hover: rgba(20, 10, 40, 0.15);
  --border-active:rgba(20, 10, 40, 0.25);

  --shadow-card:  0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg:    0 12px 40px rgba(0, 0, 0, 0.1);
  --glow-orange:  0 0 16px rgba(255, 155, 38, 0.12);
  --glow-card:    0 4px 20px rgba(0, 0, 0, 0.08);
  --inset-highlight: none;

  --grad-hero:    linear-gradient(135deg, #D97B00 0%, #C43D1A 30%, #9A2ED6 70%, #5A18C9 100%);
  --grad-text:    linear-gradient(135deg, #D97B00 20%, #C43D1A 50%, #9A2ED6 100%);
  --grad-flame:   linear-gradient(135deg, #D97B00, #C43D1A);
}

html.light body {
  background: var(--bg);
  color: var(--text);
}

html.light .hero::before {
  background: radial-gradient(circle, rgba(255, 155, 38, 0.06) 0%, rgba(238, 79, 39, 0.03) 30%, transparent 70%);
}

html.light .hero::after {
  background: radial-gradient(circle, rgba(107, 33, 239, 0.04) 0%, transparent 70%);
}

html.light .hero-title {
  filter: none;
}
html.light .hero-bar-title {
  filter: none;
}
html.light .hero-bar {
  background: rgba(255,155,38,.02);
}
html.light .stream-partner {
  background: rgba(255,155,38,.03);
  border-color: rgba(255,155,38,.12);
}

html.light .sidebar {
  background: var(--surface);
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.06);
}

html.light .overlay.active {
  background: rgba(245, 243, 240, 0.6);
}

html.light .search-overlay {
  background: rgba(245, 243, 240, 0.8);
}

html.light ::selection {
  background: rgba(255, 155, 38, 0.2);
  color: #1a1520;
}

html.light ::-webkit-scrollbar-track { background: var(--bg); }
html.light ::-webkit-scrollbar-thumb { background: var(--surface3); }
html.light ::-webkit-scrollbar-thumb:hover { background: rgba(255, 155, 38, 0.3); }

html.light .btn-primary {
  box-shadow: 0 4px 16px rgba(255, 155, 38, 0.2);
}

html.light .btn-outline {
  background: var(--surface);
  color: var(--text-secondary);
}

html.light .info-box {
  background: rgba(107, 33, 239, 0.04);
  border-color: rgba(107, 33, 239, 0.12);
}

html.light .warn-box {
  background: rgba(255, 155, 38, 0.04);
  border-color: rgba(255, 155, 38, 0.12);
}

html.light .stream-embed {
  background: #eae8e4;
}

html.light .tier-label.sp { background: rgba(255, 107, 43, 0.06); text-shadow: none; }
html.light .tier-label.s  { background: rgba(255, 184, 0, 0.06); text-shadow: none; }
html.light .tier-label.a  { background: rgba(78, 205, 196, 0.06); text-shadow: none; }
html.light .tier-label.b  { background: rgba(116, 185, 255, 0.05); text-shadow: none; }

/* ── REDUCED MOTION ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
