:root {
  color-scheme: dark;
  --background: #0b0e12;
  --surface: #12171d;
  --surface-2: #171e25;
  --line: #28313a;
  --text: #f3f6f4;
  --muted: #8e9aa4;
  --lime: #b8f452;
  --cyan: #4fd8d1;
  --orange: #ff7653;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  background:
    radial-gradient(circle at 16% -8%, rgba(79, 216, 209, 0.11), transparent 28rem),
    radial-gradient(circle at 90% 20%, rgba(184, 244, 82, 0.07), transparent 24rem),
    var(--background);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }
button,
input,
select,
textarea { font: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.radar-header {
  display: grid;
  width: min(100% - 40px, 1240px);
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin: 0 auto;
  padding: 22px 0;
}

.back-link {
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.radar-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-self: center;
}

.radar-brand strong,
.radar-brand small { display: block; }
.radar-brand strong { font-size: 13px; }
.radar-brand small { margin-top: 3px; color: var(--muted); font-size: 7px; letter-spacing: 0.16em; }

.brand-signal {
  position: relative;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(184, 244, 82, 0.38);
  border-radius: 50%;
}

.brand-signal::before,
.brand-signal::after {
  position: absolute;
  border: 1px solid rgba(184, 244, 82, 0.2);
  border-radius: 50%;
  content: "";
}
.brand-signal::before { inset: 5px; }
.brand-signal::after { inset: 10px; }
.brand-signal i { width: 5px; height: 5px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px var(--lime); }

.update-state {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-self: end;
  color: var(--muted);
  font-size: 10px;
}
.update-state i { width: 7px; height: 7px; border-radius: 50%; background: #e5bd52; }
.update-state.online i { background: var(--lime); box-shadow: 0 0 0 4px rgba(184, 244, 82, 0.1); }
.update-state.error i { background: var(--orange); }

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-self: end;
}

.watch-filter,
.partner-link {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 23, 29, 0.86);
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}
.watch-filter b { margin-left: 4px; color: var(--lime); }
.watch-filter[aria-pressed="true"],
.partner-link:hover { border-color: rgba(184, 244, 82, 0.58); color: var(--text); }
.partner-link { display: inline-flex; align-items: center; }

.radar-shell {
  width: min(100% - 40px, 1240px);
  margin: 0 auto;
  padding-bottom: 64px;
}

.radar-hero {
  display: grid;
  overflow: hidden;
  grid-template-columns: 1fr 300px;
  align-items: center;
  min-height: 260px;
  padding: clamp(34px, 6vw, 72px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(23, 30, 37, 0.96), rgba(13, 17, 21, 0.96));
  box-shadow: var(--shadow);
}

.edition-label,
.panel-heading span,
.list-heading span {
  color: var(--lime);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.radar-hero h1 {
  max-width: 760px;
  margin: 14px 0 12px;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(38px, 5vw, 68px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.radar-hero p { max-width: 620px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }

.radar-sweep {
  position: relative;
  width: 220px;
  height: 220px;
  justify-self: end;
  border: 1px solid rgba(79, 216, 209, 0.24);
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 34px, rgba(79, 216, 209, 0.12) 35px 36px);
}
.radar-sweep::before,
.radar-sweep::after { position: absolute; background: rgba(79, 216, 209, 0.15); content: ""; }
.radar-sweep::before { top: 50%; right: 0; left: 0; height: 1px; }
.radar-sweep::after { top: 0; bottom: 0; left: 50%; width: 1px; }
.radar-sweep i { position: absolute; inset: 50% 50% 0 0; border-radius: 100% 0 0 0; background: linear-gradient(35deg, rgba(79, 216, 209, 0), rgba(79, 216, 209, 0.24)); transform-origin: 100% 0; animation: sweep 4s linear infinite; }
.radar-sweep b,
.radar-sweep span { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px var(--lime); }
.radar-sweep b { top: 54px; right: 48px; }
.radar-sweep span { bottom: 48px; left: 60px; background: var(--orange); box-shadow: 0 0 12px var(--orange); }
@keyframes sweep { to { transform: rotate(360deg); } }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.stat-card,
.pulse-panel,
.source-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(18, 23, 29, 0.92);
}

.stat-card { padding: 18px 20px; }
.stat-card > span,
.stat-card small { display: block; color: var(--muted); font-size: 9px; }
.stat-card strong { display: inline-block; margin: 10px 5px 5px 0; font-family: "SFMono-Regular", Consolas, monospace; font-size: 30px; }
.source-stat strong { color: var(--lime); }

.curated-section { margin-top: 42px; }
.curated-section .list-heading small { color: var(--muted); font-size: 9px; }
.curated-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.curated-card {
  position: relative;
  display: grid;
  overflow: hidden;
  min-height: 175px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.curated-card::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11, 14, 18, 0.98) 0 48%, rgba(11, 14, 18, 0.42)), var(--cover) center / cover;
  content: "";
  z-index: 0;
}
.curated-card > * { position: relative; z-index: 1; }
.curated-card small { align-self: start; color: var(--lime); font-size: 8px; font-weight: 800; letter-spacing: 0.1em; }
.curated-card h3 { max-width: 70%; margin: 30px 0 8px; font-size: 18px; line-height: 1.2; }
.curated-card p { align-self: end; max-width: 72%; margin: 0; color: #c3ccd0; font-size: 9px; line-height: 1.5; }
.curated-card:hover { border-color: rgba(184, 244, 82, 0.58); }

.monitor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.7fr);
  gap: 14px;
  margin-top: 14px;
}

.pulse-panel,
.source-panel { padding: 22px; }
.panel-heading,
.list-heading { display: flex; align-items: end; justify-content: space-between; }
.panel-heading h2,
.list-heading h2 { margin: 6px 0 0; font-size: 16px; }
.panel-heading small { color: var(--muted); font-size: 9px; }

.pulse-chart {
  display: grid;
  height: 150px;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  align-items: end;
  margin-top: 24px;
}
.pulse-day { display: grid; height: 100%; grid-template-rows: 1fr auto; gap: 8px; align-items: end; text-align: center; }
.pulse-track { position: relative; height: 100%; border-radius: 8px; background: #0c1115; }
.pulse-bar { position: absolute; right: 0; bottom: 0; left: 0; min-height: 4px; border-radius: 8px; background: linear-gradient(180deg, var(--lime), #568b30); }
.pulse-bar::before { position: absolute; top: -17px; left: 50%; color: var(--text); content: attr(data-count); font-size: 9px; transform: translateX(-50%); }
.pulse-day small { color: var(--muted); font-size: 8px; }

.source-list { margin-top: 18px; }
.source-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.source-row i { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(184, 244, 82, 0.1); }
.source-row strong,
.source-row small { display: block; }
.source-row strong { font-size: 11px; }
.source-row small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.source-row > span:last-child { color: var(--lime); font-family: monospace; font-size: 11px; }
.source-panel > p { margin: 14px 0 0; color: var(--muted); font-size: 9px; line-height: 1.7; }

.developer-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 26px;
  align-items: center;
  margin-top: 14px;
  padding: 22px;
  border: 1px solid rgba(184, 244, 82, 0.34);
  border-radius: 18px;
  background: linear-gradient(120deg, rgba(184, 244, 82, 0.09), rgba(18, 23, 29, 0.94) 42%);
}
.developer-panel > div:first-child > span,
.submission-aside > span { color: var(--lime); font-size: 8px; font-weight: 800; letter-spacing: 0.13em; }
.developer-panel h2 { margin: 7px 0 6px; font-size: 17px; }
.developer-panel p { max-width: 540px; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.7; }
.package-row { display: flex; gap: 8px; }
.package-row span { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--lime); font-family: monospace; font-size: 10px; white-space: nowrap; }
.package-row b { display: block; margin-bottom: 4px; color: var(--text); font-family: inherit; font-size: 8px; }
.developer-cta,
.submission-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: var(--lime);
  color: #11170c;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.games-section { margin-top: 48px; }
.list-heading strong { color: var(--muted); font-family: monospace; font-size: 11px; }

.filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto repeat(3, minmax(120px, auto));
  gap: 9px;
  margin: 18px 0;
}

.filter-bar input,
.filter-bar select,
.status-tabs {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}
.filter-bar input,
.filter-bar select { width: 100%; padding: 0 12px; outline: none; }
.filter-bar input:focus,
.filter-bar select:focus { border-color: var(--cyan); }
.filter-bar select { cursor: pointer; }
.status-tabs { display: flex; padding: 3px; }
.status-tabs button { padding: 0 11px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; }
.status-tabs button[aria-pressed="true"] { background: var(--lime); color: #12170e; font-weight: 800; }

.game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.game-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); transition: transform 160ms ease, border-color 160ms ease; }
.game-card:hover { border-color: rgba(184, 244, 82, 0.55); transform: translateY(-3px); }
.game-card-main { display: block; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; text-align: left; }
.cover-wrap { position: relative; aspect-ratio: 231 / 87; overflow: hidden; background: #222b33; }
.cover-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 220ms ease; }
.game-card:hover img { transform: scale(1.025); }
.cover-wrap img.failed { display: none; }
.release-badge { position: absolute; top: 10px; left: 10px; padding: 5px 7px; border-radius: 999px; background: rgba(10, 13, 16, 0.84); color: var(--lime); font-size: 8px; font-weight: 800; backdrop-filter: blur(8px); }
.release-badge.upcoming { color: var(--cyan); }
.discount-badge { position: absolute; top: 10px; right: 10px; padding: 5px 7px; border-radius: 6px; background: var(--orange); color: white; font-size: 8px; font-weight: 800; }
.game-body { padding: 15px; }
.game-meta { display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: 8px; }
.game-meta i { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }
.game-card h3 { min-height: 42px; margin: 9px 0 12px; font-size: 15px; line-height: 1.35; }
.game-footer { display: flex; align-items: end; justify-content: space-between; }
.price-block span,
.price-block small { display: block; }
.price-block span { font-size: 13px; font-weight: 800; }
.price-block small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.heat-block { width: 94px; text-align: right; }
.heat-block span { color: var(--muted); font-size: 8px; }
.heat-meter { height: 4px; margin-top: 6px; overflow: hidden; border-radius: 5px; background: #293139; }
.heat-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--lime)); }
.quick-watch {
  position: absolute;
  right: 11px;
  bottom: 12px;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(11, 14, 18, 0.9);
  color: var(--muted);
  cursor: pointer;
  z-index: 2;
}
.quick-watch[aria-pressed="true"] { border-color: var(--lime); color: var(--lime); }
.game-card .heat-block { margin-right: 34px; }

.empty-state { padding: 72px 20px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); text-align: center; }
.load-more { display: block; margin: 22px auto 0; padding: 11px 22px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); cursor: pointer; }
.load-more:hover { border-color: var(--lime); }

.game-dialog {
  width: min(92vw, 720px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}
.game-dialog::backdrop { background: rgba(2, 4, 6, 0.78); backdrop-filter: blur(6px); }
.dialog-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; background: rgba(8, 11, 14, .78); color: var(--text); cursor: pointer; font-size: 20px; z-index: 2; }
.dialog-cover { aspect-ratio: 3 / 1; width: 100%; object-fit: cover; background: var(--surface-2); }
.dialog-body { padding: 26px; }
.dialog-kicker { color: var(--lime); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.dialog-body h2 { margin: 8px 0 10px; font-size: clamp(24px, 5vw, 38px); }
.dialog-meta { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 10px; }
.dialog-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 24px 0; }
.dialog-summary span { padding: 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-size: 9px; }
.dialog-summary b { display: block; margin-top: 5px; color: var(--text); font-size: 13px; }
.dialog-actions { display: flex; gap: 10px; }
.dialog-actions a,
.dialog-actions button { flex: 1; min-height: 42px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--text); cursor: pointer; font-weight: 700; }
.dialog-actions a { display: inline-flex; align-items: center; justify-content: center; }
.dialog-actions .dialog-watch[aria-pressed="true"] { border-color: var(--lime); color: var(--lime); }

.submission-shell { width: min(100% - 40px, 1040px); margin: 0 auto; padding: 40px 0 80px; }
.submission-intro { max-width: 720px; margin-bottom: 30px; }
.submission-intro h1 { margin: 12px 0; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(40px, 7vw, 72px); font-weight: 500; }
.submission-intro p { color: var(--muted); font-size: 12px; line-height: 1.8; }
.submission-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(250px, .7fr); gap: 14px; }
.submission-form,
.submission-aside { padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.submission-form { display: grid; gap: 16px; }
.submission-form label { display: grid; gap: 7px; color: var(--muted); font-size: 10px; }
.submission-form input,
.submission-form select,
.submission-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #0d1116; color: var(--text); outline: none; }
.submission-form input,
.submission-form select { height: 42px; padding: 0 12px; }
.submission-form textarea { padding: 12px; resize: vertical; }
.submission-form input:focus,
.submission-form select:focus,
.submission-form textarea:focus { border-color: var(--cyan); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-note { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.6; }
.submission-ready { display: grid; gap: 7px; padding: 15px; border: 1px solid rgba(184, 244, 82, .38); border-radius: 12px; background: rgba(184, 244, 82, .07); }
.submission-ready[hidden] { display: none; }
.submission-ready strong { color: var(--lime); font-size: 12px; }
.submission-ready span { color: var(--muted); font-size: 9px; }
.submission-ready a { width: fit-content; margin-top: 4px; color: var(--text); font-size: 10px; font-weight: 800; }
.submission-aside ol { display: grid; gap: 0; margin: 22px 0; padding: 0; list-style: none; }
.submission-aside li { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.submission-aside li b { color: var(--text); font-size: 12px; }
.submission-aside li small,
.submission-aside p { color: var(--muted); font-size: 9px; line-height: 1.6; }

@media (max-width: 980px) {
  .radar-hero { grid-template-columns: 1fr 190px; }
  .radar-sweep { width: 170px; height: 170px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .filter-bar { grid-template-columns: 1fr 1fr 1fr; }
  .search-field { grid-column: span 2; }
  .status-tabs { grid-column: span 1; }
  .game-grid { grid-template-columns: 1fr 1fr; }
  .curated-grid { grid-template-columns: 1fr 1fr; }
  .curated-card:last-child { grid-column: 1 / -1; }
  .developer-panel { grid-template-columns: 1fr; }
  .package-row { flex-wrap: wrap; }
}

@media (max-width: 680px) {
  .radar-header,
  .radar-shell { width: min(100% - 22px, 1240px); }
  .radar-header { grid-template-columns: auto 1fr; }
  .radar-brand { justify-self: end; }
  .update-state { display: none; }
  .partner-link { display: none; }
  .radar-hero { grid-template-columns: 1fr; padding: 30px 24px; }
  .radar-sweep { display: none; }
  .stats-grid,
  .monitor-grid,
  .game-grid,
  .curated-grid,
  .submission-layout { grid-template-columns: 1fr; }
  .curated-card:last-child { grid-column: auto; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .search-field,
  .status-tabs { grid-column: 1 / -1; }
  .filter-bar label:last-child { grid-column: 1 / -1; }
  .pulse-chart { gap: 6px; }
  .curated-section .list-heading small { display: none; }
  .dialog-summary,
  .form-row { grid-template-columns: 1fr; }
  .dialog-actions { flex-direction: column; }
  .submission-shell { width: min(100% - 22px, 1040px); padding-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
