:root {
  --midnight-bg: #05040b;
  --midnight-surface: rgba(17, 14, 30, 0.78);
  --midnight-surface-strong: rgba(21, 17, 38, 0.94);
  --midnight-line: rgba(208, 187, 255, 0.13);
  --midnight-line-strong: rgba(193, 159, 255, 0.32);
  --midnight-text: #f8f6ff;
  --midnight-muted: #9a94ad;
  --midnight-violet: #9f74ff;
  --midnight-lilac: #d4c2ff;
  --midnight-cyan: #70e1f5;
  --midnight-gold: #f5cf7a;
  --midnight-radius: 18px;
  --midnight-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(159, 116, 255, 0.55) rgba(255, 255, 255, 0.03);
}

*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.025); }
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #9f74ff, #5d42a8);
  border-radius: 999px;
}

html { background: var(--midnight-bg); }

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  padding: 34px 34px 80px 102px !important;
  color: var(--midnight-text);
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: left;
  background:
    radial-gradient(circle at 76% -8%, rgba(111, 66, 193, 0.2), transparent 38%),
    radial-gradient(circle at 11% 23%, rgba(75, 128, 185, 0.1), transparent 30%),
    linear-gradient(155deg, #080610 0%, #05040a 56%, #080510 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 68%);
  mask-image: linear-gradient(to bottom, #000, transparent 68%);
}

body::after {
  content: "";
  position: fixed;
  top: -180px;
  left: 45%;
  z-index: -1;
  width: min(720px, 80vw);
  height: 360px;
  border-radius: 50%;
  pointer-events: none;
  background: rgba(138, 92, 246, 0.12);
  filter: blur(90px);
}

button, input { font: inherit; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
.class-card:focus-visible {
  outline: 2px solid var(--midnight-lilac) !important;
  outline-offset: 3px !important;
}

.site-hero {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 50px 34px 36px;
  box-sizing: border-box;
  text-align: center;
  overflow: hidden;
}

.site-hero::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  width: 420px;
  height: 180px;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(ellipse, rgba(171, 127, 255, 0.19), transparent 68%);
  filter: blur(16px);
}

.hero-kicker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 17px;
  padding: 7px 12px;
  border: 1px solid rgba(212, 194, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: #bcb4cf;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hero-kicker .live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--midnight-cyan);
  box-shadow: 0 0 0 4px rgba(112, 225, 245, 0.08), 0 0 14px rgba(112, 225, 245, 0.8);
}

.site-hero h1 {
  position: relative;
  margin: 0;
  color: #fff;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(3.15rem, 8vw, 6.4rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.055em;
  text-transform: uppercase;
  text-shadow: 0 0 40px rgba(166, 116, 255, 0.2);
}

.site-hero h1 span {
  color: transparent;
  background: linear-gradient(180deg, #ffffff 4%, #ddd0ff 47%, #8f68de 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-rule {
  width: 132px;
  height: 1px;
  margin: 22px auto 17px;
  background: linear-gradient(90deg, transparent, rgba(210, 189, 255, 0.86), transparent);
  box-shadow: 0 0 14px rgba(174, 132, 255, 0.48);
}

.hero-copy {
  max-width: 620px;
  margin: 0 auto;
  color: #a9a3b8;
  font-size: clamp(0.92rem, 1.6vw, 1.04rem);
  line-height: 1.7;
  letter-spacing: 0.01em;
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.hero-meta span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.027);
  color: #817b91;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero-meta b { color: #ded7eb; font-size: 11px; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  width: min(1100px, 100%);
  margin: 7px auto 16px;
  padding: 0 4px;
  box-sizing: border-box;
}

.section-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--midnight-violet);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  color: #f4f0ff;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.section-heading p {
  max-width: 390px;
  margin: 0 0 3px;
  color: #777185;
  font-size: 12px;
  line-height: 1.6;
  text-align: right;
}

.gamemode-toggle { margin: 0 auto 18px; }

.gamemode-pill {
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--midnight-line);
  border-radius: 13px;
  background: rgba(12, 10, 22, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 16px 45px rgba(0, 0, 0, 0.22);
}

.gamemode-btn {
  min-width: 94px;
  padding: 9px 27px;
  border-radius: 9px;
  color: #817b90;
  font-family: "Manrope", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gamemode-btn:hover { color: #d9d2e8; }

.gamemode-btn.active,
.gamemode-btn[data-gamemode="pvp"].active,
.gamemode-btn[data-gamemode="pve"].active {
  border-color: rgba(208, 187, 255, 0.16);
  color: #fff;
  background: linear-gradient(135deg, rgba(147, 98, 239, 0.92), rgba(91, 61, 163, 0.92));
  box-shadow: 0 8px 24px rgba(112, 69, 196, 0.27), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  text-shadow: none;
}

.spec-grid {
  gap: 11px;
  margin-bottom: 23px;
  padding: 0 4px;
}

.class-card {
  min-height: 98px;
  padding: 17px 8px 14px;
  border-color: var(--midnight-line);
  border-radius: 15px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent 54%),
    rgba(15, 12, 26, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 12px 32px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(14px);
}

.class-card::after {
  content: "";
  position: absolute;
  top: -70%;
  left: -60%;
  width: 85%;
  height: 220%;
  pointer-events: none;
  opacity: 0;
  transform: rotate(19deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.09), transparent);
  transition: left 0.5s ease, opacity 0.25s ease;
}

.class-card:hover {
  transform: translateY(-5px);
  border-color: rgba(196, 171, 255, 0.33);
  background:
    linear-gradient(145deg, rgba(166, 119, 255, 0.12), transparent 55%),
    rgba(23, 18, 39, 0.92);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(164, 119, 255, 0.05);
}

.class-card:hover::after { left: 110%; opacity: 1; }

.class-card.active {
  border-color: rgba(209, 187, 255, 0.62);
  background: linear-gradient(145deg, rgba(152, 101, 255, 0.19), rgba(18, 14, 31, 0.94));
  box-shadow: 0 15px 38px rgba(0, 0, 0, 0.32), 0 0 24px rgba(144, 93, 245, 0.12);
}

.class-card .card-icon {
  width: 48px;
  height: 48px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.34);
}

.class-card .card-label {
  color: #c7c1d2;
  font-family: "Manrope", sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.class-card .card-arrow { color: var(--midnight-lilac); opacity: 0.32; }

#cors-banner {
  width: min(760px, 100%) !important;
  margin: 10px auto 0 !important;
  border-radius: var(--midnight-radius) !important;
  filter: drop-shadow(0 22px 50px rgba(0, 0, 0, 0.24));
}

#cors-banner > div {
  border-color: var(--midnight-line) !important;
  border-radius: var(--midnight-radius) !important;
  background:
    linear-gradient(145deg, rgba(145, 97, 242, 0.08), transparent 48%),
    rgba(14, 11, 24, 0.82) !important;
  backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#cors-banner > div > div:first-child { padding: 16px 18px !important; }
#cors-banner a { text-decoration: underline !important; text-underline-offset: 3px; }

.glass {
  border-color: var(--midnight-line);
  border-radius: 20px;
  background: rgba(10, 8, 17, 0.84);
  box-shadow: var(--midnight-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.video-holder.glass { padding: 10px; overflow: hidden; }
.plyr { border-radius: 13px; overflow: hidden; }

#tab-dropdown,
#history-panel,
#search-panel,
#scgen-panel {
  border-color: var(--midnight-line-strong) !important;
  background: rgba(10, 8, 18, 0.96) !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.58) !important;
  backdrop-filter: blur(22px);
}

#tab-dropdown { border-radius: 15px; }
#tab-dropdown .td-item { border-radius: 9px; }
#tab-dropdown .td-item:hover { background: rgba(159, 116, 255, 0.11); }

#side-links {
  width: 76px;
  padding: 17px 0;
  border-right: 1px solid var(--midnight-line);
  background:
    linear-gradient(180deg, rgba(159, 116, 255, 0.055), transparent 22%),
    rgba(7, 5, 13, 0.92);
  box-shadow: 14px 0 45px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(20px);
}

#side-links.collapsed { left: -76px; }

#sb-logo {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(211, 190, 255, 0.18);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(164, 116, 255, 0.26), rgba(76, 51, 129, 0.18));
  box-shadow: 0 10px 28px rgba(111, 66, 193, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.side-btn {
  width: 62px;
  height: 56px;
  border-radius: 12px;
  color: rgba(225, 216, 242, 0.42);
  font-family: "Manrope", sans-serif;
  font-size: 7px;
  letter-spacing: 0.11em;
}

.side-btn:hover {
  color: #eee8fb;
  background: rgba(159, 116, 255, 0.1);
}

#sidebar-toggle-tab {
  left: 76px;
  width: 18px;
  height: 54px;
  border: 1px solid var(--midnight-line);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  color: #b8a6db;
  background: rgba(13, 10, 22, 0.92);
  box-shadow: 8px 0 24px rgba(0, 0, 0, 0.22);
}

#sidebar-toggle-tab:hover {
  border-right-color: rgba(211, 190, 255, 0.36);
  background: rgba(42, 31, 66, 0.96);
}

#history-panel.open,
#search-panel.open { left: 88px; border-radius: 0 16px 16px 0; }

#scgen-panel.open { left: 76px; }

#statusLabel,
#nowPlayingTitle { color: var(--midnight-lilac) !important; }

.side-btn-sc {
  display: none !important;
}

#retail-under-player-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px auto 4px;
  padding: 0 20px;
}

#retail-under-player-actions .under-player-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: auto;
  min-width: 118px;
  height: 34px;
  margin: 0;
  padding: 0 15px;
  box-sizing: border-box;
  border: 1px solid rgba(167, 139, 250, 0.34);
  border-radius: 999px;
  background: rgba(13, 10, 28, 0.92);
  color: #c4b5fd;
  cursor: pointer;
  font-family: "Rajdhani", sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.035em;
  text-decoration: none;
}

#retail-under-player-actions .under-player-action > span {
  display: block;
  line-height: 1;
  transform: translateY(-1px);
}

#retail-under-player-actions .under-player-action:hover {
  border-color: rgba(196, 181, 253, 0.68);
  background: rgba(79, 45, 132, 0.58);
  color: #fff;
}

@media (max-width: 700px) {
  #retail-under-player-actions {
    padding: 0 10px;
  }

  #retail-under-player-actions .under-player-action {
    min-width: 104px;
    padding: 0 12px;
  }
}
@media (max-width: 900px) {
  body { padding: 20px 18px 80px 94px !important; }
  .site-hero { padding: 36px 16px 28px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .section-heading p { max-width: 520px; text-align: left; }
  .class-card { min-height: 88px; }
}

@media (max-width: 600px) {
  body { padding: 12px 10px 70px 80px !important; }
  .site-hero { padding: 28px 6px 24px; }
  .site-hero h1 { font-size: clamp(2.25rem, 13vw, 3.7rem) !important; }
  .hero-kicker { font-size: 8px; letter-spacing: 0.13em; }
  .hero-copy { max-width: 360px; font-size: 12px; }
  .hero-meta { flex-wrap: wrap; margin-top: 18px; }
  .hero-meta span { font-size: 8px; }
  .section-heading { margin-top: 0; }
  .section-heading h2 { font-size: 1.25rem; }
  .section-heading p { font-size: 10px; }
  .gamemode-btn { min-width: 74px; padding: 8px 17px !important; }
  .class-card { min-height: 76px; }
  .class-card .card-icon { padding: 1px; }
  #side-links { width: 68px; }
  #side-links.collapsed { left: -68px; }
  #sidebar-toggle-tab { left: 68px; }
  #scgen-panel.open { left: 68px; }
  #history-panel.open, #search-panel.open { left: 68px; }
}

@media (max-width: 380px) {
  body { padding-left: 56px !important; }
  .site-hero h1 { font-size: 2.15rem !important; }
  .hero-meta span:last-child { display: none; }
  #side-links { width: 44px; }
  #side-links.collapsed { left: -44px; }
  #sidebar-toggle-tab { left: 44px; }
  #scgen-panel.open, #history-panel.open, #search-panel.open { left: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Retail intentionally has no left sidebar. */
#side-links,
#sidebar-toggle-tab {
  display: none !important;
}

body {
  padding-left: 34px !important;
}

@media (max-width: 900px) {
  body { padding-left: 18px !important; }
}

@media (max-width: 600px) {
  body { padding-left: 10px !important; }
}
/* Retail copied-link helper. */
#retail-paste-helper {
  position: fixed !important;
  left: 16px !important;
  bottom: 16px !important;
  z-index: 190000 !important;
  display: flex !important;
  align-items: center;
  gap: 14px;
  width: max-content !important;
  max-width: calc(100vw - 32px) !important;
  min-height: 50px;
  margin: 0 !important;
  padding: 8px 14px;
  box-sizing: border-box;
  border: 1px solid rgba(167, 139, 250, 0.48);
  border-radius: 11px;
  background: rgba(11, 8, 25, 0.97);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: #ded7f5;
  font-family: "Rajdhani", sans-serif;
}

#retail-paste-helper.is-dismissed {
  display: none !important;
}

.retail-paste-helper-copy {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

#retail-paste-helper button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  margin: 0;
  padding: 0 15px;
  box-sizing: border-box;
  border-radius: 5px;
  cursor: pointer;
  font-family: "Rajdhani", sans-serif;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
}

#retail-paste-helper button > span {
  display: block;
  line-height: 1;
  transform: translateY(-1px);
}

.retail-paste-helper-stream {
  min-width: 132px;
  border: 1px solid rgba(196, 181, 253, 0.3);
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  color: #fff;
}

.retail-paste-helper-stream:hover {
  border-color: rgba(221, 214, 254, 0.72);
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.retail-paste-helper-stream.is-working {
  color: #bfdbfe;
}

.retail-paste-helper-stream.is-success {
  color: #bbf7d0;
}

.retail-paste-helper-stream.is-error {
  color: #fecaca;
}

.retail-paste-helper-dismiss {
  min-width: 82px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(28, 28, 27, 0.96);
  color: #f4f1fb;
}

.retail-paste-helper-dismiss:hover {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(46, 45, 48, 0.98);
}

@media (max-width: 620px) {
  #retail-paste-helper {
    left: 8px !important;
    bottom: 8px !important;
    gap: 8px;
    max-width: calc(100vw - 16px) !important;
    padding: 7px 9px;
  }

  .retail-paste-helper-copy {
    max-width: 112px;
    white-space: normal;
  }

  .retail-paste-helper-stream {
    min-width: 108px;
  }

  .retail-paste-helper-dismiss {
    min-width: 68px;
  }
}
