:root {
  --bg: #0b1631;
  --panel: rgba(10, 18, 42, 0.88);
  --text: #f5fbff;
  --muted: #a5b3d2;
  --line: rgba(255, 255, 255, 0.1);
  --yellow: #ffd44d;
  --orange: #ff9347;
  --fire: #ff6524;
  --fire-soft: rgba(255, 101, 36, 0.35);
  --cyan: #39c7ff;
  --mint: #77f6cb;
  --pink: #ff76bd;
  --radius-xl: 34px;
  --radius-lg: 26px;
  --shadow: 0 24px 60px rgba(3, 7, 22, 0.42);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(57, 199, 255, 0.26), transparent 24%),
    radial-gradient(circle at top right, rgba(255, 148, 71, 0.22), transparent 28%),
    linear-gradient(180deg, #0f214b 0%, #081124 100%);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
button { border: 0; cursor: pointer; }

.site-shell, .detail-shell { max-width: 1600px; margin: 0 auto; padding: 24px; }
.site-shell { display: grid; grid-template-columns: 280px 1fr; gap: 24px; }
.sidebar { position: sticky; top: 24px; height: calc(100vh - 48px); display: flex; flex-direction: column; gap: 18px; }

.brand, .sidebar-card, .page-panel, .stat-card, .hero-feature, .game-card, .player-card, .article-card, .info-card, .content-block, .site-footer {
  backdrop-filter: blur(16px);
}
.brand {
  display: inline-flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.1); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.brand-mark {
  width: 56px; height: 56px; display: grid; place-items: center; border-radius: 18px;
  background:
    radial-gradient(circle at 30% 28%, rgba(255,255,255,0.58), transparent 16%),
    linear-gradient(135deg, #7af7ff, #2ba6ff 48%, #ff6524 100%);
  color: #081124; font: 800 1.25rem "Baloo 2", cursive; letter-spacing: 0.08em;
  box-shadow: 0 14px 32px rgba(43, 166, 255, 0.26), 0 10px 28px rgba(255, 101, 36, 0.24);
}
.brand strong, .brand small { display: block; }
.brand strong { font: 800 1.45rem "Baloo 2", cursive; line-height: 1; }
.brand small { margin-top: 2px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

.sidebar-nav { display: grid; gap: 10px; }
.sidebar-link, .category-pill, .primary-button, .ghost-link {
  border-radius: 999px; transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}
.sidebar-link, .ghost-link {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px;
  background: rgba(255,255,255,0.08); border: 1px solid var(--line);
}
.sidebar-link.active, .sidebar-link:hover, .ghost-link:hover { transform: translateY(-2px); background: rgba(255,255,255,0.14); }

.sidebar-card, .page-panel, .player-card, .article-card, .info-card, .content-block, .site-footer {
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.sidebar-card, .content-block, .article-card, .site-footer { padding: 24px; border-radius: var(--radius-xl); }
.sidebar-card { margin-top: auto; }
.page-panel { padding: 26px; border-radius: 40px; }

.eyebrow {
  margin: 0 0 10px; color: var(--mint); text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.78rem; font-weight: 800;
}
h1, h2, h3 { margin: 0; line-height: 0.95; font-family: "Baloo 2", cursive; }
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr); gap: 22px; }
.hero-copy { padding: 12px 4px 18px; }
.hero-copy h1 { font-size: clamp(3rem, 5vw, 5.7rem); max-width: 10ch; }
.hero-text { color: var(--muted); line-height: 1.7; max-width: 66ch; margin: 16px 0 0; }
.search-wrap { display: block; margin: 22px 0 18px; max-width: 560px; }
.search-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 0.92rem; }
#search-input {
  width: 100%; min-height: 58px; padding: 0 20px; border-radius: 20px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.08); color: var(--text); outline: none;
}
.category-pills, .player-actions, .footer-nav { display: flex; flex-wrap: wrap; gap: 10px; }
.category-pill {
  min-height: 46px; padding: 0 18px; background: rgba(255,255,255,0.08); color: var(--text); border: 1px solid var(--line);
}
.category-pill.active, .category-pill:hover { background: rgba(57,199,255,0.14); border-color: rgba(57,199,255,0.34); transform: translateY(-2px); }
.hero-stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.hero-spotlight {
  position: relative;
  grid-column: 1 / -1;
  min-height: 360px;
  width: 100%;
  overflow: hidden;
  border-radius: 34px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(135deg, rgba(10,16,34,0.92), rgba(41,14,8,0.94));
  box-shadow: 0 30px 80px rgba(255, 88, 31, 0.24);
}
.hero-spotlight-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
}
.hero-spotlight-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 132, 0, 0.28), transparent 26%),
    radial-gradient(circle at 75% 30%, rgba(255, 64, 0, 0.24), transparent 22%),
    linear-gradient(180deg, rgba(8,14,31,0.25), rgba(8,14,31,0.9));
}
.hero-spotlight-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  min-height: 360px;
  padding: 28px;
}
.hero-spotlight-badges {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}
.spotlight-kicker {
  margin: 0 0 10px;
  color: #ffd4bf;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hot-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffd44d, #ff6524);
  color: #210d05;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 0 10px 26px rgba(255, 101, 36, 0.35);
}
.hot-badge.alt {
  background: rgba(255,255,255,0.12);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: none;
}
.hero-spotlight-logo {
  width: min(640px, 90%);
  filter:
    drop-shadow(0 0 14px rgba(255, 130, 44, 0.9))
    drop-shadow(0 0 36px rgba(255, 74, 28, 0.68))
    drop-shadow(0 0 70px rgba(255, 156, 52, 0.42));
}
.hero-spotlight-copy p {
  max-width: 60ch;
  margin: 16px 0 0;
  color: #ffe9dc;
  font-size: 1.02rem;
  line-height: 1.7;
}
.hero-feature, .game-card {
  position: relative; overflow: hidden; border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(8,15,33,0.94)); border: 1px solid rgba(255,255,255,0.1);
}
.hero-feature { min-height: 200px; }
.hero-feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-feature::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent, rgba(8,14,31,0.84)); }
.hero-feature-copy { position: absolute; inset: auto 16px 16px 16px; z-index: 1; }

.stats-strip, .game-grid, .player-support { display: grid; gap: 16px; }
.stats-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 24px 0; }
.stat-card { padding: 20px; border-radius: 24px; background: rgba(255,255,255,0.08); border: 1px solid var(--line); }
.stat-card span { display: block; font: 800 2.1rem "Baloo 2", cursive; }
.stat-card small, .results-label, .game-card p, .article-card p, .info-card p, .source-list a, .site-footer p, .legal-page li { color: var(--muted); }
.home-search-bar {
  margin-bottom: 20px;
}
.compact-search {
  margin: 0;
  max-width: 460px;
}
.compact-search #search-input {
  min-height: 50px;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
}

.section-title { margin-bottom: 16px; }
.section-title.row { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.section-title h2 { font-size: 2.4rem; }
.content-block { margin-bottom: 24px; }
.game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 12px;
  grid-auto-flow: dense;
  align-items: start;
}
.compact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.logo-grid > .library-item { display: contents; }
.library-item[hidden] { display: none; }
.logo-tile {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow);
}
.logo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease, filter 220ms ease;
}
.logo-tile-overlay {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  min-height: 40%;
  padding: 14px 12px 12px;
  background: linear-gradient(180deg, transparent, rgba(5, 9, 20, 0.88));
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 220ms ease, transform 220ms ease;
}
.logo-tile-overlay strong {
  font-family: "Baloo 2", cursive;
  font-size: 1.1rem;
  line-height: 0.95;
}
.logo-tile-overlay small {
  color: #d7e6ff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 800;
}
.logo-tile:hover img,
.logo-tile:focus-visible img {
  transform: scale(1.05);
  filter: brightness(0.86);
}
.logo-tile:hover .logo-tile-overlay,
.logo-tile:focus-visible .logo-tile-overlay {
  opacity: 1;
  transform: translateY(0);
}
.logo-tile-featured {
  box-shadow: 0 20px 46px rgba(255, 101, 36, 0.24);
  border-color: rgba(255, 149, 71, 0.4);
}
.logo-tile-large {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 228px;
}
.logo-tile-large .logo-tile-overlay strong {
  font-size: 1.5rem;
}
.game-card { min-height: 100%; padding: 14px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.game-card::before {
  content: ""; position: absolute; width: 180px; height: 180px; right: -40px; bottom: -70px; border-radius: 50%;
  background: var(--card-accent, rgba(255,212,77,0.26)); filter: blur(10px);
}
.game-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.2); }
.game-card-media { position: relative; z-index: 1; border-radius: 20px; overflow: hidden; aspect-ratio: 16 / 10; background: rgba(255,255,255,0.08); }
.game-card-media img { width: 100%; height: 100%; object-fit: cover; }
.game-card-body { position: relative; z-index: 1; }
.card-topline { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.badge { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; background: rgba(255,255,255,0.12); }
.game-card h3 { font-size: 1.65rem; }
.game-card p { line-height: 1.65; }

.detail-topbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 24px; }
.detail-layout { display: grid; gap: 24px; }
.player-card { padding: 26px; border-radius: 40px; }
.player-card-space-waves {
  padding: 18px;
  background: linear-gradient(180deg, rgba(17, 26, 58, 0.96), rgba(12, 20, 46, 0.94));
}
.player-head { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.player-head h1, .legal-page h1 { font-size: clamp(2.8rem, 4vw, 4.8rem); max-width: 12ch; }
.detail-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.detail-game-logo {
  width: min(150px, 42vw);
  margin-bottom: 8px;
  border-radius: 18px;
  filter:
    drop-shadow(0 0 16px rgba(255, 129, 44, 0.92))
    drop-shadow(0 0 40px rgba(255, 74, 28, 0.68))
    drop-shadow(0 0 70px rgba(255, 164, 64, 0.36));
}
.detail-game-logo.compact {
  width: 72px;
  min-width: 72px;
  margin: 0;
  border-radius: 16px;
}
.primary-button { min-height: 52px; padding: 0 22px; background: linear-gradient(135deg, var(--yellow), var(--orange)); color: #102144; font-weight: 800; }
.primary-button:hover { transform: translateY(-2px); }
.player-stage { margin: 22px 0; border-radius: 28px; overflow: hidden; border: 1px solid var(--line); background: #050914; aspect-ratio: 16 / 9; }
.player-stage iframe { width: 100%; height: 100%; border: 0; background: #050914; }
.player-stage-space-waves {
  margin: 0;
  border-radius: 26px 26px 0 0;
  border: 0;
  background: #17345d;
  aspect-ratio: 16 / 6.7;
  box-shadow: inset 0 0 0 1px rgba(130, 252, 230, 0.16), 0 18px 44px rgba(87, 232, 213, 0.2);
}
.space-waves-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 0 0 26px 26px;
  background: linear-gradient(180deg, rgba(250, 250, 252, 0.98), rgba(232, 239, 247, 0.96));
  color: #17345d;
}
.space-waves-meta-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.space-waves-meta-copy h1 {
  max-width: none;
  color: #17345d;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}
.space-waves-meta-copy p {
  margin: 6px 0 0;
  color: rgba(23, 52, 93, 0.72);
  line-height: 1.5;
}
.space-waves-meta-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}
.space-waves-meta-bar .detail-hero-badges {
  margin-bottom: 10px;
}
.space-waves-meta-bar .hot-badge.alt {
  background: rgba(23, 52, 93, 0.12);
  color: #17345d;
  border-color: rgba(23, 52, 93, 0.14);
}
.player-support { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.info-card { padding: 20px; border-radius: 24px; }
.control-list, .legal-page ul { margin: 0; padding-left: 18px; color: var(--muted); line-height: 1.8; }

.article-card { line-height: 1.8; }
.homepage-article .article-prose {
  max-width: 1040px;
}
.homepage-article .article-prose p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 1rem;
}
.homepage-article .article-prose h3 {
  margin: 22px 0 10px;
  font-size: 1.35rem;
}
.homepage-article .article-prose strong {
  color: var(--text);
}
.homepage-article .article-prose em {
  color: #dffcff;
}
.homepage-article .article-prose a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.space-waves-page {
  border-color: rgba(255, 101, 36, 0.34);
  box-shadow: 0 26px 70px rgba(255, 92, 31, 0.18);
}
.space-waves-page .section-title h2,
.space-waves-page .article-section h2 {
  color: #fff4ec;
}
.space-waves-page .article-section a {
  color: #ffbf8d;
}
.space-waves-page .article-section em {
  color: #ffd0b1;
}
.article-card .section-title h2 { font-size: 2.8rem; }
.article-section + .article-section { margin-top: 26px; }
.article-section h2 { font-size: 2rem; margin-bottom: 12px; }
.article-section h3 { font-size: 1.35rem; margin: 18px 0 8px; }
.article-section p { margin: 0 0 14px; font-size: 1.02rem; color: var(--muted); }
.article-section a, .source-list a, .legal-page a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.article-section em { color: var(--text); font-style: italic; }
.article-figure {
  margin: 18px 0 18px;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}
.article-figure img {
  display: block;
  width: 100%;
  height: auto;
}
.article-figure figcaption {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
.source-list { margin: 10px 0 0; padding-left: 18px; }

.site-footer { display: flex; justify-content: space-between; align-items: start; gap: 18px; margin-top: 8px; }
.footer-brand { max-width: 560px; }
.footer-brand strong { display: block; font-size: 1.2rem; margin-bottom: 8px; font-family: "Baloo 2", cursive; }
.footer-nav a { color: var(--text); padding: 10px 14px; background: rgba(255,255,255,0.06); border: 1px solid var(--line); border-radius: 999px; }
.footer-nav a:hover { background: rgba(255,255,255,0.12); }
.legal-page h1 { max-width: none; }

@media (max-width: 1180px) {
  .site-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .hero { grid-template-columns: 1fr; }
  .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .compact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logo-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
}
@media (max-width: 760px) {
  .site-shell, .detail-shell { padding: 16px; }
  .page-panel, .player-card { padding: 18px; border-radius: 28px; }
  .stats-strip, .game-grid, .compact-grid, .player-support { grid-template-columns: 1fr; }
  .detail-topbar, .player-head, .section-title.row, .site-footer { flex-direction: column; align-items: stretch; }
  .sidebar-nav, .sidebar-card { display: none; }
  .space-waves-meta-bar, .space-waves-meta-main { flex-direction: column; align-items: flex-start; }
  .space-waves-meta-actions { width: 100%; justify-content: flex-start; }
  .hero-stack { grid-template-columns: 1fr; }
  .hero-spotlight,
  .hero-spotlight-copy { min-height: 300px; }
  .hero-spotlight-logo { width: 100%; }
  .hero-copy h1 { font-size: 3rem; }
  .logo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .logo-tile-large { grid-column: span 1; grid-row: span 1; min-height: 0; }
}
