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

:root {
  --bg-deep: #030510;
  --surface: rgba(8, 12, 28, 0.72);
  --surface-glass: rgba(6, 10, 22, 0.62);
  --surface-border: rgba(120, 180, 255, 0.12);
  --text: #d4e4f8;
  --text-muted: #6b8aab;
  --accent: #5eeaff;
  --accent-glow: rgba(94, 234, 255, 0.35);
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Exo 2', sans-serif;
  --radius: 14px;
  --transition-bg: 1.1s cubic-bezier(0.4, 0, 0.2, 1);
  --game-accent: #5eeaff;
  --game-accent-2: #a8e6ff;
  --blur-glass: blur(18px) saturate(1.2);
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-deep);
}

.hidden { display: none !important; }

/* ── Dynamic backgrounds ── */
.bg-stack {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.bg-layer {
  position: absolute;
  inset: -4%;
  opacity: 0;
  transition: opacity var(--transition-bg);
  overflow: hidden;
}

.bg-layer.active {
  opacity: 1;
}

.bg-layer.active .bg-photo {
  transform: scale(1);
}

.bg-photo {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.08);
  transition: transform 12s cubic-bezier(0.25, 0.1, 0.25, 1);
  filter: saturate(1.05) brightness(0.75);
}

.bg-tint {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bg-default .bg-tint {
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(42, 84, 148, 0.35) 0%, transparent 55%),
    linear-gradient(160deg, rgba(6, 14, 26, 0.55) 0%, rgba(3, 5, 16, 0.85) 100%);
}

.bg-lumina .bg-tint {
  background:
    radial-gradient(ellipse 70% 55% at 75% 18%, rgba(96, 144, 224, 0.25) 0%, transparent 55%),
    linear-gradient(180deg, rgba(8, 12, 28, 0.35) 0%, rgba(3, 5, 16, 0.88) 100%);
}

.bg-black-horizon .bg-tint {
  background:
    radial-gradient(ellipse 90% 40% at 50% 100%, rgba(232, 93, 42, 0.35) 0%, transparent 55%),
    linear-gradient(180deg, rgba(3, 5, 8, 0.4) 0%, rgba(18, 8, 4, 0.9) 100%);
}

.bg-nightscope .bg-tint {
  background:
    radial-gradient(ellipse 65% 50% at 50% 15%, rgba(74, 158, 255, 0.2) 0%, transparent 55%),
    linear-gradient(180deg, rgba(10, 14, 26, 0.45) 0%, rgba(3, 5, 8, 0.92) 100%);
}

/* Legacy gradient fallbacks if image fails */
.bg-default:not(:has(.bg-photo)) {
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(42, 84, 148, 0.45) 0%, transparent 55%),
    linear-gradient(160deg, #060e1a 0%, #030510 100%);
}

.bg-lumina:not(:has(.bg-photo)) {
  background: linear-gradient(180deg, #080c1c 0%, #030510 100%);
}

.bg-black-horizon:not(:has(.bg-photo)) {
  background: linear-gradient(180deg, #030508 0%, #120804 100%);
}

.bg-nightscope:not(:has(.bg-photo)) {
  background: linear-gradient(180deg, #0a0e1a 0%, #030508 100%);
}

.bg-symbiose .bg-tint {
  background:
    radial-gradient(ellipse 60% 50% at 30% 25%, rgba(74, 222, 128, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 80% 70%, rgba(34, 100, 60, 0.25) 0%, transparent 50%),
    linear-gradient(180deg, rgba(4, 12, 8, 0.35) 0%, rgba(3, 8, 5, 0.92) 100%);
}

.bg-symbiose:not(:has(.bg-photo)) {
  background: linear-gradient(180deg, #041208 0%, #030805 100%);
}

.game-card-badge {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4ade80;
  margin-top: 4px;
}

.game-card-badge.locked {
  color: #e8a02a;
}

/* ── Paywall & Tip ── */
.panel-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
  color: var(--text);
}

.panel-optional {
  font-weight: 400;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.75rem;
}

.panel-text {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.panel-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.5;
}

.panel-status {
  font-size: 0.8rem;
  margin-top: 10px;
  min-height: 1.2em;
}

.panel-status.ok { color: #3ecfb2; }
.panel-status.err { color: #e85d6a; }

.paywall-panel,
.tip-panel {
  margin: 20px 0;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--surface-border);
  background: rgba(0, 0, 0, 0.35);
}

.paywall-panel {
  border-color: color-mix(in srgb, #4ade80 35%, var(--surface-border));
  background: rgba(4, 20, 10, 0.45);
}

.pay-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.field-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.field-input {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--surface-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
}

.field-input:focus {
  outline: none;
  border-color: var(--game-accent);
}

.amount-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.preset-btn:hover {
  border-color: var(--game-accent);
  color: var(--text);
}

.btn-symbiose {
  background: linear-gradient(135deg, #4ade80, #22c55e) !important;
  color: #041208 !important;
  box-shadow: 0 4px 24px rgba(74, 222, 128, 0.35) !important;
}

.detail-preview {
  margin: 16px 0;
  padding: 16px 18px;
  border-radius: var(--radius);
  border-left: 3px solid #4ade80;
  background: rgba(4, 20, 10, 0.35);
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--text-muted);
}

.detail-preview p { margin-bottom: 0.75em; }
.detail-preview p:last-child { margin-bottom: 0; }

/* ── Reader ── */
.reader-modal {
  position: fixed;
  inset: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid var(--surface-border);
  background: rgba(4, 8, 14, 0.97);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
  overflow: hidden;
}

.reader-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--surface-border);
  background: rgba(0, 0, 0, 0.35);
}

.reader-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #4ade80;
  margin-bottom: 4px;
}

.reader-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.reader-author {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.reader-close {
  font-size: 1.6rem;
  padding: 8px 12px;
}

.reader-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px 40px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.reader-prose {
  font-size: 1rem;
  line-height: 1.85;
  color: #c8d8e8;
}

.reader-prose p { margin-bottom: 1em; }

.reader-chapter {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--surface-border);
}

.reader-chapter:last-child { border-bottom: none; }

.reader-chapter-title {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: #86efac;
  margin-bottom: 16px;
}

.reader-paywall-inline {
  margin: 32px 0;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid rgba(74, 222, 128, 0.25);
  background: rgba(4, 24, 12, 0.5);
}

@media (max-width: 800px) {
  .reader-modal { inset: 0; border-radius: 0; }
  .reader-body { padding: 20px 18px 32px; }
}

.bg-aurora {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 35% at 15% 20%, rgba(94, 234, 255, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 45% 30% at 85% 75%, rgba(232, 93, 42, 0.06) 0%, transparent 55%);
  animation: aurora-shift 18s ease-in-out infinite alternate;
}

@keyframes aurora-shift {
  0% { opacity: 0.7; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}

.bg-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 80% at 50% 50%, transparent 25%, rgba(0, 0, 0, 0.7) 100%);
  pointer-events: none;
}

.bg-grain {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

#particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.6;
}

/* ── App shell ── */
.app {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid var(--surface-border);
  background: var(--surface-glass);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  filter: drop-shadow(0 0 12px var(--accent-glow));
  transition: filter 0.4s ease;
}

.brand:hover .brand-logo {
  filter: drop-shadow(0 0 18px var(--game-accent));
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #a8e6ff;
}

.brand-sub {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.header-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.main {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 360px;
  min-height: 0;
  overflow: hidden;
  gap: 0;
}

/* ── Game rail (top) ── */
.game-rail {
  flex-shrink: 0;
  border-bottom: 1px solid var(--surface-border);
  background: var(--surface-glass);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  padding: 14px 20px 16px;
}

.game-rail-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 28px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(120, 180, 255, 0.25) transparent;
  padding-bottom: 4px;
}

.game-rail-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-shrink: 0;
}

.game-rail-label {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 8px 0;
  flex-shrink: 0;
}

.game-rail-list {
  list-style: none;
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.game-tile {
  display: flex;
  flex-direction: column;
  width: 132px;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  overflow: hidden;
  color: inherit;
  font: inherit;
  text-align: left;
  transition: border-color 0.25s, box-shadow 0.35s, transform 0.2s, background 0.25s;
}

.game-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
}

.game-tile.selected {
  border-color: color-mix(in srgb, var(--game-accent) 60%, transparent);
  box-shadow:
    0 0 24px color-mix(in srgb, var(--game-accent) 28%, transparent),
    0 8px 24px rgba(0, 0, 0, 0.35);
  transform: translateY(-4px);
}

.game-tile-featured {
  width: 148px;
  border-color: color-mix(in srgb, var(--game-accent) 35%, transparent);
}

.game-tile-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
}

.game-tile-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.game-tile:hover .game-tile-cover img,
.game-tile.selected .game-tile-cover img {
  transform: scale(1.06);
}

.game-tile-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  background: rgba(0, 0, 0, 0.7);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.35);
}

.game-tile-badge.locked {
  color: #e8a02a;
  border-color: rgba(232, 160, 42, 0.35);
}

.game-tile-star {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 0.7rem;
  color: var(--game-accent);
  text-shadow: 0 0 8px color-mix(in srgb, var(--game-accent) 60%, transparent);
}

.game-tile-info {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.game-tile-title {
  font-family: var(--font-display);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-tile-sub {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-tile.selected .game-tile-sub {
  color: var(--game-accent-2);
}

/* ── Preview stage (center) ── */
.preview-stage {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 16px 20px;
}

.preview-stage-frame {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--game-accent) 22%, var(--surface-border));
  background: rgba(0, 0, 0, 0.45);
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 12px 48px rgba(0, 0, 0, 0.45);
}

.preview-stage-glow {
  position: absolute;
  inset: 16px 16px 16px 20px;
  border-radius: 16px;
  pointer-events: none;
  box-shadow: 0 0 60px color-mix(in srgb, var(--game-accent) 12%, transparent);
  z-index: 0;
}

.preview-empty,
.preview-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  z-index: 1;
}

.preview-empty-icon {
  font-size: 2.2rem;
  opacity: 0.35;
  color: var(--accent);
}

.preview-loading {
  flex-direction: row;
  background: rgba(3, 5, 16, 0.75);
  backdrop-filter: blur(8px);
  font-size: 0.85rem;
}

.preview-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--game-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.preview-cover {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.preview-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.preview-cover-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 5, 16, 0.2) 0%, rgba(3, 5, 16, 0.85) 100%),
    radial-gradient(ellipse 60% 50% at 50% 40%, transparent 0%, rgba(0, 0, 0, 0.5) 100%);
}

.preview-cover-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

.preview-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
  z-index: 2;
}

.preview-reader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  z-index: 2;
  background: rgba(3, 5, 16, 0.92);
}

.preview-reader-head {
  flex-shrink: 0;
  padding: 16px 20px;
  border-bottom: 1px solid var(--surface-border);
  background: rgba(0, 0, 0, 0.35);
}

.preview-reader-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 28px;
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
}

/* ── Detail sidebar ── */
.detail-panel {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--surface-border);
  background: var(--surface-glass);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  padding: 24px 22px 28px;
  scrollbar-width: thin;
}

.detail-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 12px;
  padding: 24px;
}

.detail-empty-icon {
  font-size: 2rem;
  opacity: 0.3;
  color: var(--accent);
}

.detail-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.detail-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: 6px;
  text-shadow: 0 0 32px color-mix(in srgb, var(--game-accent) 35%, transparent);
}

.detail-subtitle {
  display: block;
  font-size: 0.42em;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--game-accent-2);
  margin-top: 4px;
}

.detail-desc {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 14px 0;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.detail-version,
.detail-path-status {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.detail-path-status.ok { color: #3ecfb2; }
.detail-path-status.warn { color: #e8a02a; }
.detail-path-status.err { color: #e85d6a; }

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.paywall-panel,
.tip-panel {
  margin: 16px 0;
  padding: 16px;
}

.pay-form {
  max-width: 100%;
}

/* ── Badges & buttons ── */
.badge {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--game-accent) 20%, transparent);
  color: var(--game-accent);
  border: 1px solid color-mix(in srgb, var(--game-accent) 35%, transparent);
}

.badge-muted {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border-color: var(--surface-border);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  border: none;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.25s, background 0.25s;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

.btn:not(:disabled):hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--game-accent), color-mix(in srgb, var(--game-accent-2) 70%, var(--game-accent)));
  color: #030510;
  box-shadow: 0 4px 24px color-mix(in srgb, var(--game-accent) 40%, transparent);
}

.btn-primary:not(:disabled):hover {
  box-shadow: 0 8px 32px color-mix(in srgb, var(--game-accent) 55%, transparent);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--surface-border);
}

.btn-secondary:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--game-accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  padding: 12px 16px;
}

.btn-ghost:not(:disabled):hover {
  color: var(--text);
  border-color: var(--surface-border);
}

.btn-icon { font-size: 0.9em; }

.btn-icon-only {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.btn-icon-only:hover { color: var(--text); }

/* ── Update log ── */
.update-log {
  margin-top: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--surface-border);
  background: rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.update-log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--surface-border);
}

#update-log-text {
  padding: 16px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.75rem;
  line-height: 1.6;
  color: #8ab4d4;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── Footer ── */
.footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  font-size: 0.72rem;
  color: var(--text-muted);
  border-top: 1px solid var(--surface-border);
  background: var(--surface-glass);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
}

.footer-sep { opacity: 0.4; }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  padding: 12px 24px;
  border-radius: 10px;
  background: rgba(8, 14, 28, 0.95);
  border: 1px solid var(--surface-border);
  font-size: 0.85rem;
  z-index: 100;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.error {
  border-color: rgba(232, 93, 106, 0.5);
  color: #f0a0a8;
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .main {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(280px, 1fr) auto;
  }

  .detail-panel {
    border-left: none;
    border-top: 1px solid var(--surface-border);
    max-height: 42vh;
  }

  .preview-stage {
    padding: 12px;
  }

  .preview-stage-glow {
    inset: 12px;
  }

  .header-tagline { display: none; }
}

@media (max-width: 600px) {
  .game-tile { width: 118px; }
  .game-tile-featured { width: 128px; }
  .game-rail { padding: 10px 12px; }
}
