:root {
  --bg: #06100c;
  --surface: #0b1913;
  --surface-2: #10241b;
  --line: rgba(52, 211, 153, 0.24);
  --emerald: #10b981;
  --emerald-bright: #34d399;
  --gold: #f5b942;
  --text: #ecfdf5;
  --sage: #9ec5b2;
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top right, #0d2b20 0%, var(--bg) 52%);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
}
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.display { font-weight: 900; letter-spacing: 0.03em; }

.arc-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 18px 48px;
}

/* Header */
.arc-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: rgba(11, 25, 19, 0.88);
  border: 1px solid var(--line);
  border-radius: 18px;
  margin-bottom: 18px;
}
.arc-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.arc-crown {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--emerald-bright), #047857);
  color: #03140d; display: grid; place-items: center; font-weight: 900; font-size: 18px;
}
.arc-nav-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.arc-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 11px;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
}
.arc-pill:hover, .arc-pill.active { border-color: var(--emerald-bright); background: rgba(16, 185, 129, 0.2); }
.arc-pill.controller-on { border-color: var(--gold); color: var(--gold); }

/* Featured Hero */
.arc-hero {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(11, 25, 19, 0.94));
  border: 1px solid rgba(52, 211, 153, 0.42);
  border-radius: 22px;
  padding: 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
}
.arc-kicker { font-size: 11px; color: var(--gold); letter-spacing: 0.14em; margin-bottom: 6px; }
.arc-hero h1 { margin: 0 0 8px; font-size: clamp(24px, 4vw, 38px); line-height: 1.08; }
.arc-hero p { margin: 0 0 16px; color: var(--sage); font-size: 14px; line-height: 1.5; max-width: 60ch; }
.arc-ctas { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-primary {
  background: linear-gradient(135deg, var(--emerald-bright), var(--emerald));
  color: #03150d; border: none; border-radius: 12px;
  padding: 10px 16px; font-size: 12.5px; font-weight: 800;
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 42px;
}
.btn-secondary {
  background: rgba(16, 185, 129, 0.12);
  color: var(--text); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; font-size: 12px; font-weight: 700;
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 42px;
}
.btn-secondary:hover { border-color: var(--emerald-bright); }

/* Continue Playing Card */
.continue-card {
  background: var(--surface);
  border: 1px solid rgba(245, 185, 66, 0.4);
  border-radius: 16px;
  padding: 16px;
}

/* Filter Bar */
.cat-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.cat-btn {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--sage);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  min-height: 36px;
}
.cat-btn.active, .cat-btn:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--emerald-bright);
  color: var(--text);
}

/* Game Grid */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}
.game-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.game-card:hover, .game-card.gamepad-focus {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}
.game-icon { font-size: 28px; margin-bottom: 4px; }
.game-tag { font-size: 10px; color: var(--gold); letter-spacing: 0.12em; }
.game-card h3 { margin: 4px 0 6px; font-size: 16px; }
.game-card p { margin: 0; font-size: 12.5px; color: var(--sage); line-height: 1.45; }

/* Trailers Shelf */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 22px 0 10px;
}
.trailer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.trailer-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}
.trailer-card:hover { border-color: var(--emerald-bright); }

/* Reusable Overlay Backdrop (matches media-overlay.js) */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 45;
  background: rgba(2, 8, 5, 0.68);
  display: none; align-items: center; justify-content: center; padding: 14px;
}
.drawer-backdrop.open { display: flex; }
.drawer-sheet {
  width: min(680px, 100%); max-height: 82vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; padding: 18px;
}
.drawer-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.drawer-close {
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line);
  color: var(--text); border-radius: 10px; width: 34px; height: 34px; cursor: pointer; font-weight: 800;
}

.arc-footer {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--sage);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 780px) {
  .arc-hero { grid-template-columns: 1fr; padding: 18px; }
  .arc-shell { padding: 12px 12px 36px; }
}
