/* ── Global CSS Variables & Base Reset ─────────────────────────────── */

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

:root {
  --bg-deep: #08090e;
  --bg-surface: #0f1118;
  --bg-card: #161822;
  --bg-card-hover: #1c1e2c;
  --accent: #c49a6c;
  --accent-light: #dfc09a;
  --accent-dim: #8a6d4a;
  --cyan: #5a9ea6;
  --cyan-light: #7ec4cc;
  --cyan-dim: #3a7078;
  --text: #c8c4bc;
  --text-bright: #e8e4dc;
  --text-muted: #6e6a62;
  --text-faint: #4a4840;
  --border: #222433;
  --border-light: #2e3044;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --radius: 2px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Film grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  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");
  background-repeat: repeat;
  background-size: 256px 256px;
}

a { color: var(--cyan); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--cyan-light); }

.hidden { display: none !important; }

/* ── Shared section styles ───────────────────────────────────────── */

.section-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 20px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 4.5vw, 38px);
  font-weight: 400;
  color: var(--text-bright);
  line-height: 1.25;
  margin-bottom: 36px;
}

/* ── Shared theme card styles ────────────────────────────────────── */

.theme-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.theme-card:hover {
  border-color: var(--cyan-dim);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.theme-card-hero {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.theme-card-hero-empty {
  width: 100%;
  height: 100px;
  background: linear-gradient(135deg, var(--bg-card-hover) 0%, var(--bg-card) 100%);
}

.theme-card-body { padding: 24px; }

.theme-card-name {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text-bright);
  margin-bottom: 8px;
}

.theme-card-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.theme-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.theme-card-meta {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.theme-card-play {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cyan);
  transition: color 0.2s;
}

.theme-card:hover .theme-card-play { color: var(--accent); }

/* ── Shared button styles ────────────────────────────────────────── */

.btn-cta {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 16px 48px;
  color: var(--accent-light);
  background: transparent;
  border: 1px solid var(--accent-dim);
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
}

.btn-cta:hover {
  background: rgba(196, 154, 108, 0.08);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-secondary {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 12px 32px;
  color: var(--cyan);
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: var(--cyan-dim);
  color: var(--cyan-light);
}

/* ── Footer ──────────────────────────────────────────────────────── */

.site-footer {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-faint);
  font-size: 12px;
  letter-spacing: 1px;
}

.site-footer a {
  color: var(--text-faint);
  text-decoration: none;
  transition: color 0.2s;
}

.site-footer a:hover { color: var(--text); }

.footer-links {
  margin-top: 16px;
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* ── Animations ──────────────────────────────────────────────────── */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 0.4; }
}

/* ── Page container ──────────────────────────────────────────────── */

.page-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 80px 24px 60px;
}

/* ── Theme grid ──────────────────────────────────────────────────── */

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.theme-grid-loading {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 0;
  font-style: italic;
}

/* ── Responsive ──────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .theme-grid { grid-template-columns: 1fr; }
  .theme-card-hero { height: 160px; }
  .page-container { padding: 70px 16px 40px; }
}
