/* =========================================================
   ITCH Gaming — Base Styles
   ========================================================= */

:root {
  --bg: #13131a;
  --bg-raised: #1b1b25;
  --bg-subtle: #222230;
  --text: #e4e4ed;
  --text-muted: #9a9ab2;
  --accent: #7c6cff;
  --accent-glow: rgba(124, 108, 255, .35);
  --accent-hover: #9587ff;
  --green: #44dfb5;
  --border: rgba(255, 255, 255, .12);
  --nav-h: 4.75rem;
  --radius: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Fira Code", monospace;
  --max-width: 64rem;
  --section-gap: 6rem;
}

/* ---- View Transitions (cross-document, desktop only) ---- */
@media (min-width: 641px) {
  @view-transition {
    navigation: auto;
  }

  main {
    view-transition-name: main-content;
  }

  ::view-transition-old(main-content) {
    animation: vt-out .1s ease-in forwards;
  }
  ::view-transition-new(main-content) {
    animation: vt-in .15s ease-out .1s both;
  }
}

@keyframes vt-out {
  to   { opacity: 0; transform: translateY(-6px); }
}
@keyframes vt-in {
  from { opacity: 0; transform: translateY(6px); }
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; border: none; background: none; cursor: pointer; color: inherit; }

/* ---- Base ---- */
html { scroll-behavior: smooth; scroll-padding-top: 5rem; scrollbar-gutter: stable; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
main { flex: 1; }

/* ---- Focus ---- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- Utility ---- */

/* Tooltip — any element with data-tooltip gets a hover tooltip above it */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: .3rem .6rem;
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
}
[data-tooltip]:hover::after { opacity: 1; }

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section-label {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
}


/* =========================================================
   Announcement Banner
   ========================================================= */

.announce {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 101;
  background: rgba(120, 87, 10, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  font-size: .82rem;
  font-weight: 500;
  line-height: 1.4;
  transition: opacity .3s ease, transform .3s ease;
}
.announce--hiding {
  opacity: 0;
  transform: translateY(-100%);
}
.announce__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: .6rem 2.5rem .6rem 1.5rem;
  position: relative;
  text-align: center;
}
.announce__text {
  margin: 0;
}
.announce__text strong {
  font-weight: 700;
  letter-spacing: .02em;
}
.announce__close {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  line-height: 1;
  color: #fff;
  opacity: .6;
  transition: opacity .15s;
  padding: 0 .25rem;
}
.announce__close:hover {
  opacity: 1;
}
body.has-announce .site-header {
  top: var(--announce-h, 2rem);
}
body.has-announce .live-bar {
  top: calc(var(--nav-h) + var(--announce-h, 2rem));
}
body.has-announce {
  scroll-padding-top: calc(5rem + var(--announce-h, 2rem));
}
body.has-announce .servers-page,
body.has-announce .drivers-page,
body.has-announce .news-page,
body.has-announce .free-games-page {
  padding-top: calc(6rem + var(--announce-h, 2rem));
}


/* =========================================================
   Navigation
   ========================================================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background .25s, backdrop-filter .25s;
}
.site-header--scrolled {
  background: rgba(19, 19, 26, .85);
  border-bottom: 1px solid var(--border);
}
.site-header--scrolled {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.site-header--scrolled .live-bar {
  border-top-color: var(--border);
  background: rgba(19, 19, 26, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logos {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
}
.nav__logo {
  display: flex;
  align-items: center;
  transition: opacity 0.25s ease;
}
.nav__logo--dim {
  opacity: 0.35;
}
.nav__logo--dim:hover {
  opacity: 0.7;
}
.nav__logo-sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
}
.nav__logo-img {
  height: 28px;
  width: auto;
  display: block;
}
.nav__logo-img--wow {
  height: 24px;
}
.nav__links {
  display: flex;
  gap: 2rem;
  align-items: center;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.nav__links a {
  color: var(--text-muted);
  transition: color .15s;
  position: relative;
}
/* Hover underline slide-in */
.nav__links a:not(.nav__cta)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .25s ease;
}
.nav__links a:not(.nav__cta):hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav__links a:hover { color: var(--text); }
/* Active page indicator */
.nav__links a[aria-current="page"] {
  color: var(--text);
}
.nav__links a[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--accent);
  opacity: .6;
}
.nav__cta {
  background: var(--green);
  color: #111 !important;
  padding: .45rem 1.1rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: background .15s;
}
.nav__cta:hover { background: #5eedc8; transform: translateY(-2px); }

/* User dropdown (WoW nav) */
.nav-user {
  position: relative;
  margin-left: 1.5rem;
  flex-shrink: 0;
}
.nav-user__trigger {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  cursor: pointer;
  padding: .35rem 0;
  transition: color .15s;
}
.nav-user__trigger:hover { color: var(--accent-hover); }
.nav-user__chevron {
  transition: transform .2s;
}
.nav-user__trigger[aria-expanded="true"] .nav-user__chevron {
  transform: rotate(180deg);
}
.nav-user__dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 160px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
  padding: .375rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .15s, visibility .15s, transform .15s;
  z-index: 200;
}
.nav-user__dropdown--open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-user__item {
  display: block;
  width: 100%;
  padding: .5rem 1rem;
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-align: left;
  transition: background .1s, color .1s;
  text-decoration: none;
}
.nav-user__item:hover {
  background: rgba(255, 255, 255, .05);
  color: var(--text);
}
.nav-user__item--logout {
  color: #ff5555;
}
.nav-user__item--logout:hover {
  background: rgba(255, 85, 85, .08);
  color: #ff5555;
}
.nav-user__divider {
  height: 1px;
  background: var(--border);
  margin: .375rem 0;
}
.nav-user__login {
  margin-left: 1.5rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  transition: color .15s;
  flex-shrink: 0;
}
.nav-user__login:hover { color: var(--accent-hover); }

/* Mobile nav */
.nav__toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  padding: .5rem;
  position: relative;
  z-index: 1;
  touch-action: manipulation;
}
.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s;
}
.nav__toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}
.nav__toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* Desktop — panel is transparent */
.nav__panel { display: contents; }

@media (max-width: 640px) {
  .nav { position: relative; }
  .nav__toggle { display: flex; }

  .nav__panel {
    display: grid;
    grid-template-rows: 0fr;
    overflow: hidden;
    transition: grid-template-rows .25s ease-in;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1;
    height: calc(100dvh - var(--nav-h) - var(--announce-h, 0px));
    pointer-events: none;
  }
  .nav__panel--open {
    grid-template-rows: 1fr;
    transition: grid-template-rows .3s ease-out;
    pointer-events: auto;
  }

  .nav__links {
    position: static;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 0 1.5rem;
    font-size: 1.15rem;
    background: var(--bg);
  }
  .nav__panel--open .nav__links {
    overflow-y: auto;
    padding: 1.5rem 1.5rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, .12);
  }

  .nav__links > li:first-child {
    margin-top: auto;
  }

  .site-header:has(.nav__panel--open) {
    background: rgba(19, 19, 26, .85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .nav__cta {
    font-size: 1.1rem;
    padding: .6rem 1.5rem;
  }
}


/* ---- In-menu stream info (mobile only) ---- */
.nav__stream { display: none; }

@media (max-width: 640px) {
  .nav__stream {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .75rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, .12);
    margin-top: auto;
  }
  .nav__stream-badge {
    display: inline-flex;
    align-items: center;
    align-self: center;
    gap: .35rem;
    background: #e33;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .08em;
    padding: .2rem .55rem;
    border-radius: 4px;
    text-transform: uppercase;
  }
  .nav__stream-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    animation: live-pulse 1.5s ease-in-out infinite;
  }
  .nav__stream-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .75rem;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }
  .nav__stream-channel {
    font-weight: 700;
    font-size: .85rem;
    color: var(--text);
    white-space: nowrap;
  }
  .nav__stream-sep {
    color: var(--text-muted);
    opacity: .4;
    flex-shrink: 0;
  }
  .nav__stream-game {
    font-size: .78rem;
    color: var(--accent);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  .nav__stream-viewers {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .72rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: auto;
  }
  .nav__stream-watch {
    background: var(--accent);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    padding: .3rem .6rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background .15s;
    flex-shrink: 0;
  }
  .nav__stream-watch:hover {
    background: var(--accent-hover);
  }
}


/* =========================================================
   Buttons
   ========================================================= */

.btn {
  display: inline-block;
  font-weight: 600;
  border-radius: var(--radius);
  transition: background .15s, box-shadow .15s, transform .1s;
  padding: .7rem 1.6rem;
  font-size: .95rem;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(.97); }

.btn--primary {
  background: var(--green);
  color: #111;
  box-shadow: 0 0 24px rgba(68, 223, 181, .35);
  position: relative;
  overflow: hidden;
  z-index: 0;
}
.btn--primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .3) 50%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}
.btn--primary.btn--shimmer::after {
  animation: btn-shimmer .6s ease-in-out forwards;
}
@keyframes btn-shimmer {
  from { left: -100%; }
  to   { left: 150%; }
}
.btn--primary:hover {
  background: #5eedc8;
  box-shadow: 0 0 32px rgba(68, 223, 181, .45);
}

.btn--ghost {
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn--ghost:hover {
  border-color: rgba(255, 255, 255, .15);
  color: var(--text);
}

.btn--lg {
  padding: .9rem 2.2rem;
  font-size: 1.1rem;
  border-radius: 10px;
}


/* =========================================================
   Hero
   ========================================================= */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 6rem;
  overflow: hidden;
}
/* Prevent scroll anchoring from jumping the page when the typing
   animation adds/removes <br> nodes inside the heading. */
.hero, .hero * { overflow-anchor: none; }
.hero__content {
  position: relative;
  z-index: 1;
  max-width: 44rem;
}
.hero__heading {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
  margin-bottom: 1.25rem;
  min-height: 2.4em;
}
.hero__tagline {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 34rem;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
  min-height: 3.2em;
}
.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Staggered hero entrance — heading/tagline handled by typing effect */
.hero__actions {
  opacity: 0;
  transform: translateY(20px);
}
.hero--animate .hero__actions {
  animation: hero-enter .6s ease-out forwards;
}
.hero--animate .hero__actions  { animation-delay: .4s; }

@keyframes hero-enter {
  to { opacity: 1; transform: translateY(0); }
}

/* Typing cursor */
.typed-cursor {
  display: inline-block;
  width: 3px;
  height: .85em;
  background: var(--text);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: cursor-blink .7s steps(1) infinite;
}
.hero__tagline .typed-cursor {
  width: 2px;
  background: var(--text-muted);
}
.typed-cursor--hidden {
  opacity: 0;
  animation: none;
}
@keyframes cursor-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Ambient glow behind hero — soft gradients instead of filter:blur for GPU efficiency */
.hero__glow {
  position: absolute;
  inset: -15%;
  background:
    radial-gradient(ellipse 80% 70% at 50% 45%, rgba(124, 108, 255, .28), rgba(124, 108, 255, .1) 40%, transparent 70%),
    radial-gradient(ellipse 60% 70% at 30% 60%, rgba(68, 223, 181, .1), rgba(68, 223, 181, .03) 40%, transparent 70%);
  pointer-events: none;
  animation: glow-drift 8s ease-in-out infinite alternate;
}

@keyframes glow-drift {
  0%   { transform: scale(1)   translate(0, 0);       opacity: .7; }
  33%  { transform: scale(1.1) translate(3%, -2%);     opacity: 1;  }
  66%  { transform: scale(.95) translate(-2%, 3%);     opacity: .8; }
  100% { transform: scale(1.05) translate(1%, -1%);    opacity: 1;  }
}

/* Floating whisper quotes */
.hero__whispers {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.hero__whisper {
  position: absolute;
  font-size: var(--size, 1rem);
  font-weight: 500;
  color: var(--text);
  opacity: 0;
  white-space: nowrap;
  user-select: none;
  animation: whisper-float var(--dur) ease-in-out var(--delay) forwards;
}

@keyframes whisper-float {
  0%   { opacity: 0; transform: translateY(10px); }
  15%  { opacity: .08; }
  50%  { opacity: .08; }
  85%  { opacity: .08; }
  100% { opacity: 0; transform: translateY(-10px); }
}


/* Hero logo marquee */
.hero__marquee-label {
  position: absolute;
  bottom: calc(2rem + 44px + 2.5rem);
  left: 0;
  right: 0;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: #fff;
  opacity: .18;
  transition: opacity .3s ease;
  z-index: 1;
  margin: 0;
}
.hero__marquee:hover ~ .hero__marquee-label,
.hero__marquee--dragging ~ .hero__marquee-label,
.hero__marquee-label:hover {
  opacity: .45;
}
@media (max-width: 640px) {
  .hero__marquee-label { bottom: calc(2rem + 28px + 1.5rem); font-size: .8rem; }
}
.hero__marquee {
  position: absolute;
  bottom: 2rem;
  left: 0;
  right: 0;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  z-index: 1;
  cursor: grab;
}
.hero__marquee--dragging { cursor: grabbing; }
.hero__marquee-track {
  display: flex;
  align-items: center;
  gap: 3.5rem;
  width: max-content;
  will-change: transform;
}
.hero__marquee-track img {
  height: 44px;
  width: auto;
  opacity: .18;
  transition: opacity .3s ease;
  flex-shrink: 0;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
.hero__marquee:hover .hero__marquee-track img,
.hero__marquee--dragging .hero__marquee-track img,
.hero:has(.hero__marquee-label:hover) .hero__marquee-track img {
  opacity: .45;
}
/* Normalise per-logo — sized by smallest readable text, not tallest glyph */
.hero__marquee-track img[src*="battlefield6"] { height: 34px; }
.hero__marquee-track img[src*="wreckfest2"]   { height: 38px; }
.hero__marquee-track img[src*="enshrouded"]   { height: 38px; }
.hero__marquee-track img[src*="minecraft"]    { height: 40px; }
.hero__marquee-track img[src*="valheim"]      { height: 50px; }
.hero__marquee-track img[src*="terraria"]     { height: 60px; }
.hero__marquee-track img[src*="7dtd"]         { height: 64px; }
.hero__marquee-track img[src*="the-forest"]   { height: 48px; }
.hero__marquee-track img[src*="sons-of-the"]  { height: 56px; }
@media (max-width: 640px) {
  .hero__marquee-track img { height: 28px; }
  .hero__marquee-track img[src*="battlefield6"] { height: 22px; }
  .hero__marquee-track img[src*="wreckfest2"]   { height: 24px; }
  .hero__marquee-track img[src*="enshrouded"]   { height: 24px; }
  .hero__marquee-track img[src*="minecraft"]    { height: 26px; }
  .hero__marquee-track img[src*="valheim"]      { height: 32px; }
  .hero__marquee-track img[src*="terraria"]     { height: 38px; }
  .hero__marquee-track img[src*="7dtd"]         { height: 40px; }
  .hero__marquee-track img[src*="the-forest"]   { height: 30px; }
  .hero__marquee-track img[src*="sons-of-the"]  { height: 36px; }
  .hero__marquee-track { gap: 2.5rem; }
}
/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .hero__actions {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .typed-cursor {
    animation: none;
  }
  .hero__glow {
    animation: none;
  }
  .hero__whispers {
    display: none;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}


/* =========================================================
   What We Play
   ========================================================= */

/* Scroll-triggered reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .5s ease-out, transform .5s ease-out;
}
.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Live Bar ---- */
@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}
@keyframes live-bar-in {
  from { opacity: 0; max-height: 0; }
  to   { opacity: 1; max-height: 44px; }
}
@keyframes live-bar-out {
  from { opacity: 1; max-height: 44px; }
  to   { opacity: 0; max-height: 0; }
}

/* Offset scroll anchors and subpage content for the taller header */
body.has-live-bar {
  scroll-padding-top: 7.75rem;
}
body.has-live-bar .servers-page {
  padding-top: calc(6rem + 44px);
}
body.has-live-bar .drivers-page,
body.has-live-bar .news-page,
body.has-live-bar .free-games-page {
  padding-top: calc(6rem + 44px);
}
body.has-announce.has-live-bar .servers-page,
body.has-announce.has-live-bar .drivers-page,
body.has-announce.has-live-bar .news-page,
body.has-announce.has-live-bar .free-games-page {
  padding-top: calc(6rem + 44px + var(--announce-h, 2rem));
}

.live-bar {
  border-top: 1px solid transparent;
  overflow: hidden;
  animation: live-bar-in .3s ease-out forwards;
  font-size: .82rem;
}
.live-bar--cached {
  animation: none;
}
.live-bar--hiding {
  animation: live-bar-out .25s ease-in forwards;
}

.live-bar__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: .5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
}

.live-bar__badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: #e33;
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  padding: .2rem .55rem;
  border-radius: 4px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.live-bar__badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: live-pulse 1.5s ease-in-out infinite;
}

/* Carousel slides container */
.live-bar__slides {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.live-bar__slide {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-width: 0;
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
}
.live-bar__slide--active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
}

/* Arrow buttons */
.live-bar__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  padding: .15rem;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color .15s, background .15s;
}
.live-bar__arrow:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .06);
}
/* Hide arrows when only 1 stream */
.live-bar:not(.live-bar--multi) .live-bar__arrow {
  display: none;
}

.live-bar__channel {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.live-bar__sep {
  color: var(--text-muted);
  opacity: .4;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.live-bar__title {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.live-bar__game {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.live-bar__viewers {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: .75rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.live-bar__watch {
  background: var(--accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: .25rem .6rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.live-bar__watch:hover {
  background: var(--accent-hover);
}

/* Voice slide */
.live-bar__voice-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}
.live-bar__voice-count {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}
.live-bar__voice-channels {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.live-bar__view {
  background: var(--accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: .25rem .6rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}
.live-bar__view:hover {
  background: var(--accent-hover);
}

.live-bar__dismiss {
  color: var(--text-muted);
  font-size: 1.2rem;
  padding: 0 .25rem;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
  transition: color .15s;
}
.live-bar__dismiss:hover {
  color: var(--text);
}

/* Responsive: hide non-essential info on mobile */
@media (max-width: 640px) {
  .live-bar__inner {
    gap: .5rem;
    padding: .5rem .75rem;
    font-size: .75rem;
  }
  .live-bar__title,
  .live-bar__sep,
  .live-bar__game,
  .live-bar__viewers,
  .live-bar__voice-channels {
    display: none;
  }
}

/* ---- Floating Player (PiP) ---- */
.floating-player {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  width: 380px;
  background: #111;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08);
  transition: box-shadow .15s;
}
.floating-player:hover {
  box-shadow: 0 8px 40px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.12);
}
.floating-player__bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .75rem;
  background: rgba(255,255,255,.05);
  cursor: grab;
  user-select: none;
}
.floating-player__bar:active { cursor: grabbing; }
.floating-player__badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: #e33;
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .08em;
  padding: .15rem .45rem;
  border-radius: 3px;
  text-transform: uppercase;
}
.floating-player__badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  animation: live-pulse 1.5s ease-in-out infinite;
}
.floating-player__name {
  flex: 1;
  color: var(--text, #e4e4ed);
  font-size: .8rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.floating-player__close {
  background: none;
  border: none;
  color: rgba(255,255,255,.5);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 .25rem;
  line-height: 1;
}
.floating-player__close:hover { color: #fff; }
.floating-player iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
}

@media (max-width: 640px) {
  .floating-player {
    width: 280px;
    bottom: 1rem;
    right: 1rem;
  }
}

.games {
  padding: var(--section-gap) 0;
  border-top: 1px solid var(--border);
}
.games__header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.games__header .section-label {
  margin-bottom: 0;
}
.games__live {
  font-size: .8rem;
  font-family: var(--font-mono);
  color: var(--green);
  font-weight: 500;
}
.games__live:not(:empty)::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  margin-right: .4rem;
  vertical-align: middle;
  box-shadow: 0 0 6px rgba(68, 223, 181, .5);
}
.games__header {
  margin-bottom: 2rem;
}
.games__list-wrap {
  position: relative;
}
.games__list-wrap::before,
.games__list-wrap::after {
  content: "";
  position: absolute;
  top: -1rem;
  bottom: -1.5rem;
  width: 6rem;
  z-index: 1;
  pointer-events: none;
  transition: opacity .3s ease;
}
.games__list-wrap::before {
  left: -1rem;
  background: linear-gradient(to right, var(--bg), transparent);
}
.games__list-wrap::after {
  right: -1rem;
  background: linear-gradient(to left, var(--bg), transparent);
}
.games__list-wrap--at-start::before {
  opacity: 0;
}
.games__list-wrap--at-end::after {
  opacity: 0;
}
.games__list {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 1rem 1rem 1.5rem;
  margin: -1rem -1rem -1.5rem;
}
.games__list::-webkit-scrollbar { display: none; }

.games__item {
  flex: 0 0 auto;
  min-width: 10rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.75rem;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.games__item:hover {
  border-color: rgba(124, 108, 255, .3);
  box-shadow: 0 0 20px rgba(124, 108, 255, .15), 0 0 40px rgba(124, 108, 255, .05);
  transform: translateY(-2px);
}
.games__name {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: .3rem;
}
.games__detail {
  font-size: .82rem;
  color: var(--text-muted);
}


/* =========================================================
   Highlights
   ========================================================= */

.highlights {
  padding: var(--section-gap) 0;
  border-top: 1px solid var(--border);
}
.highlights__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.highlights__header .section-label {
  margin-bottom: 0;
}
.highlights__all {
  font-size: .82rem;
  font-weight: 600;
  color: var(--accent);
  transition: color .15s;
}
.highlights__all:hover {
  color: var(--accent-hover);
}
.highlights__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.highlights__card {
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s, transform .2s;
  cursor: pointer;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  width: 100%;
}
.highlights__card:hover {
  border-color: rgba(124, 108, 255, .3);
  box-shadow: 0 0 20px rgba(124, 108, 255, .15), 0 0 40px rgba(124, 108, 255, .05);
  transform: translateY(-2px);
}
.highlights__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0d0d12;
  overflow: hidden;
}
.highlights__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.highlights__thumb--empty {
  background: var(--bg-subtle);
}
.highlights__dur {
  position: absolute;
  bottom: .5rem;
  right: .5rem;
  background: rgba(0, 0, 0, .75);
  color: var(--text);
  font-size: .72rem;
  font-family: var(--font-mono);
  padding: .15rem .4rem;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
}
.highlights__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: rgba(255, 255, 255, .8);
  background: rgba(0, 0, 0, .2);
  opacity: 0;
  transition: opacity .15s;
}
.highlights__card:hover .highlights__play {
  opacity: 1;
}
.highlights__info {
  padding: .75rem 1rem 1rem;
}
.highlights__title {
  font-size: .9rem;
  font-weight: 600;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.highlights__meta {
  font-size: .75rem;
  color: var(--text-muted);
  margin: .35rem 0 0;
}
.highlights__empty {
  text-align: center;
  color: var(--text-muted);
  font-size: .9rem;
  padding: 2rem 0;
}

@media (max-width: 900px) {
  .highlights__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .highlights__grid {
    grid-template-columns: 1fr;
  }
  .highlights__info {
    padding: .5rem .75rem .75rem;
  }
  .highlights__title {
    font-size: .85rem;
  }
}


/* ---- Clip modal ---- */

.clip-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .25s ease;
}
.clip-modal--visible { opacity: 1; }
.clip-modal[hidden] { display: none; }

.clip-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.clip-modal__wrapper {
  position: relative;
  width: 90vw;
  max-width: 960px;
  background: var(--bg-card, #1a1a24);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transform: scale(.96);
  transition: transform .25s ease;
}
.clip-modal--visible .clip-modal__wrapper {
  transform: scale(1);
}
.clip-modal__close {
  position: absolute;
  top: .5rem;
  right: .5rem;
  z-index: 2;
  background: rgba(0, 0, 0, .6);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  cursor: pointer;
  transition: background .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.clip-modal__close:hover {
  background: rgba(124, 108, 255, .5);
}
.clip-modal__video {
  aspect-ratio: 16 / 9;
  background: #000;
}
.clip-modal__player {
  width: 100%;
  height: 100%;
  display: block;
}
.clip-modal__info {
  padding: .75rem 1rem 1rem;
}
.clip-modal__title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}
.clip-modal__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: .3rem 0 0;
}
.clip-modal__meta {
  font-size: .8rem;
  color: var(--text-muted);
}
.clip-modal__link {
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  transition: color .15s;
}
.clip-modal__link:hover {
  color: var(--accent-hover);
}

/* =========================================================
   Why ITCH
   ========================================================= */

.why {
  padding: var(--section-gap) 0;
  border-top: 1px solid var(--border);
}
.why__list {
  display: grid;
  gap: 3rem;
}
.why__title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: .5rem;
}
.why__point p {
  color: var(--text-muted);
  max-width: 38rem;
  line-height: 1.7;
}

@media (min-width: 768px) {
  .why__list {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
}


/* =========================================================
   Join CTA
   ========================================================= */

.join {
  padding: var(--section-gap) 0;
  text-align: center;
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.join::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 80%, var(--accent-glow), transparent);
  filter: blur(60px);
  pointer-events: none;
}
.join .section-inner { position: relative; z-index: 1; }
.join__heading {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 1rem;
}
.join__body {
  color: var(--text-muted);
  max-width: 32rem;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
  line-height: 1.7;
}
.join__actions {
  margin-bottom: 1.5rem;
}
.join__suggestion {
  color: var(--text-muted);
  font-size: .85rem;
  opacity: .6;
  max-width: 28rem;
  margin: 0 auto;
}


/* =========================================================
   Servers Page
   ========================================================= */

.servers-page {
  padding: 6rem 0 var(--section-gap);
}
.servers-page .section-label {
  margin-bottom: .5rem;
}
.servers__subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}
.servers__updated {
  font-size: .8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 1.5rem;
}
.servers__hosting-hint {
  color: var(--text-muted);
  font-size: .95rem;
  margin-top: 1.5rem;
}
.servers__hosting-hint a {
  color: var(--accent);
  text-decoration: none;
}
.servers__hosting-hint a:hover {
  text-decoration: underline;
}
.servers__online {
  color: var(--green);
  font-weight: 500;
}
.servers__online::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  margin-right: .4rem;
  vertical-align: middle;
  box-shadow: 0 0 6px rgba(68, 223, 181, .5);
}

/* Server controls (sort & filter bar) */
.server-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1.5rem;
}
.server-controls__group {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.server-controls__label {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin-right: .25rem;
}
.server-pill {
  font-size: .78rem;
  font-weight: 600;
  padding: .35rem .75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .04);
  color: var(--text-muted);
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.server-pill:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, .15);
}
.server-pill--active {
  color: var(--text);
  border-color: rgba(124, 108, 255, .4);
  background: rgba(124, 108, 255, .12);
}
.server-pill--status::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dot-color);
  margin-right: .4rem;
  vertical-align: middle;
  opacity: .5;
  transition: opacity .15s;
}
.server-pill--status.server-pill--active::before {
  opacity: 1;
}

/* Empty state when all filters are off */
.servers__empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
  font-size: .95rem;
}

@media (max-width: 640px) {
  .server-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .server-controls__group {
    flex-wrap: wrap;
  }
  .server-pill {
    text-align: center;
    min-width: 0;
  }
}

/* Server list */
.server-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.server-list > :first-child { border-radius: var(--radius) var(--radius) 0 0; }
.server-list > :last-child  { border-radius: 0 0 var(--radius) var(--radius); }

.server-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto auto minmax(0, 1fr) auto auto auto;
  column-gap: 1rem;
  row-gap: 0;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--bg-raised);
  transition: background .15s;
}
.server-row + .server-row { border-top: 1px solid var(--border); }
.server-row:hover {
  background: var(--bg-subtle);
}

/* Status dot */
.server-row__status-wrap {
  flex-shrink: 0;
  cursor: default;
}
.server-row__status {
  position: relative;
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.server-row__status--online {
  background: var(--green);
  box-shadow: 0 0 8px rgba(68, 223, 181, .5);
}
.server-row__status--online::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1.5px solid var(--green);
  animation: status-ping 2.5s ease-out infinite;
}
@keyframes status-ping {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: .6; }
  70%  { transform: translate(-50%, -50%) scale(2.4); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(2.4); opacity: 0; }
}
.server-row__status--offline {
  background: #f04;
  box-shadow: 0 0 8px rgba(255, 0, 68, .35);
}
.server-row__status--suspended {
  background: var(--text-muted);
  opacity: .5;
}

/* Name column */
.server-row__name {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
}
.server-row__title {
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.server-row__lock-wrap {
  flex-shrink: 0;
  margin-left: .35rem;
  cursor: default;
}
.server-row__lock {
  color: var(--text-muted);
  opacity: .6;
  display: block;
}

/* Players column */
.server-row__players {
  font-size: .9rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  min-width: 10rem;
}
.server-row__players strong {
  color: var(--text);
  font-weight: 600;
}

/* Uptime column */
.server-row__uptime-col {
  white-space: nowrap;
  min-width: 3.5rem;
  text-align: right;
}

/* Sparkline */
.server-row__spark {
  display: inline-block;
  vertical-align: middle;
  margin-right: .5rem;
  opacity: .6;
}
.server-row:hover .server-row__spark {
  opacity: 1;
}

/* Address columns */
.server-row__host {
  font-size: .85rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  text-align: right;
}
.server-row__port {
  font-size: .85rem;
  font-family: var(--font-mono);
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}
.server-row__address {
  font-size: .85rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  white-space: nowrap;
  grid-column: span 2;
}

/* Copy button */
.server-row__copy {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .7rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
  white-space: nowrap;
}
.server-row__copy:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .07);
}
.server-row__copy--copied {
  color: var(--green);
  border-color: rgba(68, 223, 181, .3);
}

/* Info button */
.server-row__info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
  flex-shrink: 0;
}
.server-row__info:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .07);
}
.server-row__info--active {
  color: var(--accent);
  border-color: rgba(124, 108, 255, .3);
  background: rgba(124, 108, 255, .1);
}

/* Connection guide */
.server-row__guide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .25s ease;
}
.server-row__guide[hidden] {
  display: grid;
}
.server-row__guide--open {
  grid-template-rows: 1fr;
}
.server-row__guide-inner {
  overflow: hidden;
  padding: 0;
  transition: padding .25s ease;
}
.server-row__guide--open .server-row__guide-inner {
  padding: .75rem 0 .25rem;
}
.server-row__desc {
  margin: 0 0 .75rem;
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.server-row__steps {
  margin: 0;
  padding: 0 0 0 1.5rem;
  list-style: decimal;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.server-row__steps li {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.server-row__steps strong {
  color: var(--text);
  font-weight: 600;
}
.server-row__steps code {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--accent);
  background: rgba(124, 108, 255, .1);
  padding: .1rem .4rem;
  border-radius: 4px;
}
.server-row__steps a {
  color: var(--accent);
  text-decoration: none;
}
.server-row__steps a:hover {
  text-decoration: underline;
}

.server-row__password-note {
  margin: .6rem 0 0;
  font-size: .8rem;
  color: var(--text-muted);
}
.server-row__password-note a {
  color: var(--accent);
  text-decoration: none;
}
.server-row__password-note a:hover {
  text-decoration: underline;
}

.server-row__password {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: .6rem 0 0;
  font-size: .82rem;
}

.server-row__password-label {
  color: var(--text-muted);
  font-weight: 600;
}

.server-row__password-value {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text);
  filter: blur(5px);
  transition: filter .2s ease;
  user-select: none;
  cursor: default;
  padding: .1rem .3rem;
  background: rgba(255, 255, 255, .04);
  border-radius: 4px;
}

.server-row__password:hover .server-row__password-value,
.server-row__password--revealed .server-row__password-value {
  filter: blur(0);
  user-select: text;
  cursor: text;
}

.server-row__password-copy {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .5rem;
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
  border-radius: 5px;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
  white-space: nowrap;
}

.server-row__password-copy:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .07);
}

.server-row__password-copy--copied {
  color: var(--green);
  border-color: rgba(68, 223, 181, .3);
}

/* Player list */
.server-row__player-list {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding-top: .5rem;
}
.server-row__player {
  font-size: .75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .15rem .5rem;
}

/* Suspended row */
.server-row--suspended {
  opacity: .45;
}
.server-row--suspended .server-row__title::after {
  content: "Suspended";
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, .06);
  padding: .15rem .5rem;
  border-radius: 4px;
  margin-left: .75rem;
  vertical-align: middle;
}

/* Loading skeleton */
.server-skeleton {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.server-skeleton__row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--bg-raised);
}
.server-skeleton__bar {
  height: 1rem;
  border-radius: 4px;
  background: var(--bg-subtle);
  animation: pulse 1.5s ease-in-out infinite;
}
.server-skeleton__bar--dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.server-skeleton__bar--name { width: 40%; }
.server-skeleton__bar--players { width: 60px; }
.server-skeleton__bar--address { flex: 1; }
@keyframes pulse {
  0%, 100% { opacity: .3; }
  50% { opacity: .6; }
}

/* Error state */
.servers__error {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}
.servers__error strong {
  display: block;
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: .5rem;
}

/* Mobile */
@media (max-width: 640px) {
  .server-row {
    grid-template-columns: auto auto 1fr auto auto;
    gap: .4rem .75rem;
    padding: .85rem 1rem;
  }
  .server-row__name {
    grid-column: 1 / -1;
    grid-row: 1;
    min-width: 0;
  }
  .server-row__title {
    white-space: normal;
  }
  .server-row__players {
    grid-column: 1;
    grid-row: 2;
    text-align: left;
    min-width: 0;
  }
  .server-row__uptime-col {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
  }
  .server-row__spark {
    display: inline-block;
    width: 100px;
    height: 20px;
  }
  .server-row__host,
  .server-row__port,
  .server-row__address {
    display: none;
  }
  .server-row__info {
    grid-row: 2;
    grid-column: 4;
  }
  .server-row__copy {
    grid-row: 2;
    grid-column: 5;
  }
}


/* ---- Inline uptime badge (per server row) ---- */
.server-row__uptime {
  font-size: .7rem;
  font-weight: 600;
  font-family: var(--font-mono);
  padding: .15rem .45rem;
  border-radius: 4px;
  white-space: nowrap;
}
.server-row__uptime--good {
  color: var(--green);
  background: rgba(68, 223, 181, .1);
}
.server-row__uptime--warn {
  color: #f0c040;
  background: rgba(240, 192, 64, .1);
}
.server-row__uptime--poor {
  color: #f04;
  background: rgba(255, 0, 68, .1);
}
.server-row__uptime--none {
  color: var(--text-muted);
  opacity: .5;
}


/* =========================================================
   Voice / TeamSpeak (Servers page)
   ========================================================= */

/* Suppress CSS tooltips inside voice card — JS floating tooltip handles them */
#voiceStatus [data-tooltip]::after {
  display: none;
}

.voice {
  padding: var(--section-gap) 0;
  border-top: 1px solid var(--border);
}
.voice__subtitle {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: .95rem;
}
.voice__tree {
  border-top: 1px solid var(--border);
  padding: .75rem 1.5rem 1rem;
}

/* Channel tree */
.ts-tree {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ts-tree__channel {
  padding: .2rem 0;
}
.ts-tree__channel-name {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 500;
  font-size: .85rem;
  color: var(--text-muted);
}
.ts-tree__count {
  font-size: .75rem;
  font-weight: 600;
  color: var(--accent);
}
.ts-tree__nested {
  list-style: none;
  padding-left: 1.25rem;
  margin: 0;
  border-left: 1px solid var(--border);
  margin-left: .45rem;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .5rem;
}
/* Sub-channels take full width so they stack below clients */
.ts-tree__channel {
  flex-basis: 100%;
}
.ts-tree__client {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .15rem .5rem;
  font-size: .85rem;
  color: var(--text);
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
  border-radius: 4px;
}
@media (max-width: 640px) {
  .ts-tree__nested {
    flex-direction: column;
    gap: 0;
  }
  .ts-tree__client {
    background: none;
    border: none;
    border-radius: 0;
    padding: .15rem 0;
  }
}
.ts-tree__icon {
  flex-shrink: 0;
  opacity: .45;
}
.ts-tree__client .ts-tree__icon {
  opacity: .7;
  color: var(--accent);
}
.ts-tree__channel--empty > .ts-tree__channel-name {
  opacity: .35;
}
.ts-tree__platform-wrap {
  display: inline-flex;
  margin-left: .15rem;
}
.ts-tree__platform {
  flex-shrink: 0;
  opacity: .3;
}
.ts-tree__state {
  font-size: .65rem;
  font-weight: 700;
  color: var(--text-muted);
  opacity: .5;
  margin-left: .15rem;
}

/* Client enter/leave animations */
.ts-tree__client--entering {
  animation: ts-client-enter .3s ease-out;
}
.ts-tree__client--leaving {
  animation: ts-client-leave .25s ease-in forwards;
}
@keyframes ts-client-enter {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes ts-client-leave {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-8px); }
}

/* Voice stats (inside server-row__guide) */
.voice__stats {
  display: flex;
  gap: 1.5rem;
  padding: .4rem 0;
  font-size: .8rem;
  color: var(--text-muted);
}
.voice__stat {
  white-space: nowrap;
}
.voice__stat-label {
  font-weight: 600;
  opacity: .6;
  margin-right: .25rem;
  text-transform: uppercase;
  font-size: .65rem;
  letter-spacing: .04em;
}

@media (max-width: 640px) {
  .voice__stats { gap: 1rem; flex-wrap: wrap; }
  .voice__tree { padding: .75rem 1rem 1rem; }
}

/* =========================================================
   Uptime Section (Servers page)
   ========================================================= */

.uptime {
  padding: var(--section-gap) 0;
  border-top: 1px solid var(--border);
}
.uptime .section-label {
  margin-bottom: .5rem;
}
.uptime__subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

/* Combined uptime display */
.uptime-combined {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.uptime-combined__pct {
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  font-weight: 800;
  font-family: var(--font-mono);
  line-height: 1;
}
.uptime-combined__pct--good { color: var(--green); }
.uptime-combined__pct--warn { color: #f0c040; }
.uptime-combined__pct--poor { color: #f04; }
.uptime-combined__label {
  font-size: .95rem;
  color: var(--text-muted);
}
.uptime-combined__range {
  width: 100%;
  font-size: .8rem;
  color: var(--text-muted);
  opacity: .6;
}

.uptime-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}
/* Inline variant inside guide panel */
.uptime-row--inline {
  margin-bottom: .75rem;
}
.uptime-row__name {
  flex: 0 0 10rem;
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.uptime-row__bar {
  flex: 1;
  display: flex;
  gap: 3px;
  min-width: 0;
}
.uptime-row__cell {
  flex: 1;
  height: 20px;
  border-radius: 3px;
  position: relative;
  cursor: default;
  transition: opacity .15s;
}
.uptime-row__cell--good { background: var(--green); opacity: .8; }
.uptime-row__cell--warn { background: #f0c040; opacity: .8; }
.uptime-row__cell--poor { background: #f04; opacity: .8; }
.uptime-row__cell--none {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .06);
}
.uptime-row__cell:hover { opacity: 1; }
.uptime-row__cell--none:hover { background: rgba(255, 255, 255, .1); }

/* Tooltip on cell — only for cells outside the guide (guide cells use title attr) */
.uptime-row__cell[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: .25rem .5rem;
  font-size: .7rem;
  font-family: var(--font-mono);
  font-weight: 600;
  white-space: nowrap;
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
}
.uptime-row__cell[data-tooltip]:hover::after { opacity: 1; }

/* Floating tooltip for uptime cells inside guide panels */
.uptime-tip {
  position: fixed;
  transform: translate(-50%, -100%) translateY(-6px);
  padding: .25rem .5rem;
  font-size: .7rem;
  font-family: var(--font-mono);
  font-weight: 600;
  white-space: nowrap;
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
}
.uptime-tip--visible { opacity: 1; }

.uptime-row__pct {
  flex: 0 0 4rem;
  text-align: right;
  font-size: .85rem;
  font-weight: 600;
  font-family: var(--font-mono);
}
.uptime-row__pct--good { color: var(--green); }
.uptime-row__pct--warn { color: #f0c040; }
.uptime-row__pct--poor { color: #f04; }
.uptime-row__pct--none { color: var(--text-muted); opacity: .5; }

@media (max-width: 640px) {
  .uptime-row:not(.uptime-row--inline) {
    flex-wrap: wrap;
    gap: .35rem .75rem;
  }
  .uptime-row:not(.uptime-row--inline) .uptime-row__name {
    flex: 0 0 auto;
    max-width: 60%;
  }
  .uptime-row:not(.uptime-row--inline) .uptime-row__pct {
    flex: 0 0 auto;
    margin-left: auto;
  }
  .uptime-row:not(.uptime-row--inline) .uptime-row__bar {
    flex: 0 0 100%;
    order: 1;
  }
  .uptime-row__cell {
    height: 18px;
  }
}


/* =========================================================
   Hardware Section (Servers page)
   ========================================================= */

.hardware {
  padding: var(--section-gap) 0;
  border-top: 1px solid var(--border);
}
.hardware .section-label {
  margin-bottom: .5rem;
}
.hardware__subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}
.hardware__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.hardware__card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color .2s, transform .15s;
}
.hardware__card:hover {
  border-color: rgba(255, 255, 255, .12);
  transform: translateY(-2px);
}
.hardware__card-title {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.hardware__specs {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.hardware__specs li {
  font-size: .95rem;
  color: var(--text);
  line-height: 1.3;
}
.hardware__spec-label {
  display: block;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .15rem;
}
@media (max-width: 900px) {
  .hardware__grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   Support Section (Servers page)
   ========================================================= */

.support {
  padding: var(--section-gap) 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.support .section-label {
  margin-bottom: 1.5rem;
}
.support__body {
  color: var(--text-muted);
  max-width: 36rem;
  margin: 0 auto .75rem;
  font-size: 1.05rem;
  line-height: 1.7;
}
.support__actions {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}


/* =========================================================
   Drivers Page
   ========================================================= */

.drivers-page {
  padding: 6rem 0 4rem;
}
.drivers-page .section-label {
  margin-bottom: .5rem;
}
.drivers__subtitle {
  color: var(--text-muted);
  margin-bottom: .5rem;
}
.drivers__subtitle a {
  color: var(--accent);
  text-decoration: none;
}
.drivers__subtitle a:hover {
  text-decoration: underline;
}
.drivers__updated {
  font-size: .8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 2rem;
}
.drivers__empty {
  color: var(--text-muted);
}

.driver-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.driver-list > :first-child { border-radius: var(--radius) var(--radius) 0 0; }
.driver-list > :last-child  { border-radius: 0 0 var(--radius) var(--radius); }

.driver-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  column-gap: 1.5rem;
  row-gap: 0;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--bg-raised);
  transition: background .15s;
}
.driver-row:hover {
  background: var(--bg-subtle);
}

.driver-row__version {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.driver-row__number {
  font-weight: 700;
  font-size: 1.05rem;
  font-family: var(--font-mono);
}
.driver-row__tag {
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--green);
  background: rgba(68, 223, 181, .1);
  padding: .15rem .45rem;
  border-radius: 4px;
}
.driver-row__badge {
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  background: rgba(124, 108, 255, .12);
  padding: .15rem .45rem;
  border-radius: 4px;
}
/* Source badge */
.update-row__source {
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--source-color, var(--text-muted));
  background: color-mix(in srgb, var(--source-color, #888) 15%, transparent);
  padding: .15rem .45rem;
  border-radius: 4px;
  white-space: nowrap;
}

/* Filter buttons */
.updates__filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
}
.updates__filter {
  font-size: .78rem;
  font-weight: 600;
  padding: .35rem .75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .04);
  color: var(--text-muted);
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.updates__filter:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, .15);
}
.updates__filter--active {
  color: var(--filter-color, var(--text));
  border-color: color-mix(in srgb, var(--filter-color, #888) 40%, transparent);
  background: color-mix(in srgb, var(--filter-color, #888) 12%, transparent);
}

.driver-row__note {
  font-size: .7rem;
  color: var(--text-muted);
  font-weight: 400;
}
.driver-row--latest {
  border-left: 3px solid var(--accent);
}
.driver-row__date {
  font-size: .85rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.driver-row__link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.driver-row__link:hover {
  text-decoration: underline;
}

/* Info button */
.driver-row__info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
  flex-shrink: 0;
}
.driver-row__info:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .07);
}
.driver-row__info--active {
  color: var(--accent);
  border-color: rgba(124, 108, 255, .3);
  background: rgba(124, 108, 255, .1);
}

/* Release notes panel (slide open) */
.driver-row__notes {
  grid-column: 1 / -1;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .25s ease;
}
.driver-row__notes--open {
  grid-template-rows: 1fr;
}
.driver-row__notes-inner {
  overflow: hidden;
  padding: 0;
  transition: padding .25s ease;
}
.driver-row__notes--open .driver-row__notes-inner {
  padding: .75rem 0 .25rem;
}
.driver-notes__summary {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 .5rem;
}
.driver-notes__fixes {
  font-size: .82rem;
  color: var(--text-muted);
}
.driver-notes__fixes strong {
  color: var(--text);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.driver-notes__fixes ul {
  margin: .3rem 0 0;
  padding: 0 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.driver-notes__fixes li {
  line-height: 1.5;
}
.fix-tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 3px;
  padding: .05em .4em;
  margin-right: .4em;
  vertical-align: baseline;
}
.fix-badge {
  display: inline-block;
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-radius: 3px;
  padding: .1em .35em;
  margin-right: .35em;
  vertical-align: baseline;
}
.fix-badge--new {
  color: #7c6cff;
  background: rgba(124,108,255,.12);
}
.fix-badge--fix {
  color: #44dfb5;
  background: rgba(68,223,181,.10);
}
.driver-notes__empty {
  font-size: .85rem;
  color: var(--text-muted);
  margin: 0;
  font-style: italic;
}

@media (max-width: 600px) {
  .driver-row {
    grid-template-columns: 1fr auto;
    gap: .4rem .75rem;
    padding: .85rem 1rem;
  }
  .driver-row__version {
    flex-wrap: wrap;
    gap: .3rem .5rem;
    min-width: 0;
  }
  .driver-row__number {
    font-size: .95rem;
  }
  .driver-row__date {
    grid-column: 1;
    grid-row: 2;
    font-size: .78rem;
  }
  .driver-row__link {
    display: none;
  }
  .driver-row__info {
    grid-row: 1 / 3;
    grid-column: 2;
  }
}

/* =========================================================
   Free Games Page
   ========================================================= */

.free-games-page {
  padding: 6rem 0 4rem;
}

.free-games__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 540px) {
  .free-games__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 900px) {
  .free-games__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.free-games-page .section-label {
  margin-bottom: .5rem;
}
.free-games__section-header {
  margin-top: 4rem;
  margin-bottom: 1.5rem;
}
.free-games__section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.free-game-card__link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.free-game-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, transform .15s;
}
.free-game-card:hover {
  border-color: rgba(255, 255, 255, .12);
  transform: translateY(-2px);
}

.free-game-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.free-game-card__image--placeholder {
  background: var(--bg-subtle);
}

.free-game-card__body {
  padding: 1rem 1.25rem 1.25rem;
}

.free-game-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: .4rem 0 .3rem;
  line-height: 1.3;
}

.free-game-card__status {
  display: inline-block;
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .15rem .5rem;
  border-radius: 4px;
}
.free-game-card__status--free {
  color: var(--green);
  background: rgba(68, 223, 181, .12);
}
.free-game-card__status--upcoming {
  color: #a78bfa;
  background: rgba(167, 139, 250, .12);
}
.free-game-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
}
.free-game-card__platform,
.free-game-card__worth {
  display: inline-block;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .06em;
  padding: .15rem .5rem;
  border-radius: 4px;
}
.free-game-card__platform {
  color: var(--text-muted);
  background: rgba(255,255,255,.06);
}
.free-game-card__worth {
  color: var(--green);
  background: transparent;
  padding-left: 0;
  padding-right: 0;
}

.free-game-card__dates {
  display: block;
  font-size: .78rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-top: .25rem;
}

.free-game-card__desc {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: .5rem 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* =========================================================
   News Page
   ========================================================= */

.news-page {
  padding: 6rem 0 4rem;
}
.news-page .section-label {
  margin-bottom: .5rem;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.news-list > :first-child { border-radius: var(--radius) var(--radius) 0 0; }
.news-list > :last-child  { border-radius: 0 0 var(--radius) var(--radius); }

.news-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  column-gap: 1rem;
  align-items: center;
  padding: .85rem 1.5rem;
  background: var(--bg-raised);
  transition: background .15s;
}
.news-row:hover {
  background: var(--bg-subtle);
}

.news-row__game {
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--source-color, var(--text-muted));
  background: color-mix(in srgb, var(--source-color, #888) 15%, transparent);
  padding: .15rem .45rem;
  border-radius: 4px;
  white-space: nowrap;
}

.news-row__title {
  font-size: .92rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.news-row__title:hover {
  color: var(--accent);
}

.news-row__date {
  font-size: .8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.news-row__source {
  font-size: .72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .news-row {
    grid-template-columns: auto 1fr;
    gap: .3rem .75rem;
    padding: .75rem 1rem;
  }
  .news-row__title {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: .85rem;
  }
  .news-row__date {
    font-size: .72rem;
  }
  .news-row__source {
    display: none;
  }
}


/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: .82rem;
  color: var(--text-muted);
}
.site-footer__links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: .75rem;
}
.site-footer__links a {
  color: var(--text-muted);
  transition: color .15s;
}
.site-footer__links a:hover {
  color: var(--text);
}
.site-footer__credit {
  margin-bottom: .5rem;
  color: var(--text-muted);
  opacity: .6;
}

/* Decode scramble effect */
.decode-slot {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: inherit;
  color: inherit;
  letter-spacing: .5px;
  min-width: 140px;
  text-align: left;
  margin-left: .3em;
}
.decode-slot .char {
  display: inline-block;
  transition: color .15s;
}
.decode-slot .char.scrambling {
  color: #3a5a3a;
}
.decode-slot .char.resolved {
  color: inherit;
}

/* =========================================================
   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 !important;
    transform: none !important;
  }
  @view-transition {
    navigation: none;
  }
}
