/* Playblin Phase 1 — storefront styles. Static, no build step. */
:root {
  --bg: #14101f;
  --bg-soft: #1d1530;
  --card: #221a3a;
  --card-border: #352a5c;
  --ink: #f5efe4;
  --ink-dim: #b9aecb;
  --orange: #ff8c2e;
  --orange-deep: #e06f14;
  --purple: #8b5cf6;
  --teal: #2dd4bf;
  --gold: #ffc94d;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, .wordmark {
  font-family: "Fredoka", "Inter", system-ui, sans-serif;
  line-height: 1.2;
}

img { max-width: 100%; display: block; }
a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--gold); }

.wrap { width: min(1120px, 92%); margin: 0 auto; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 16, 31, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--card-border);
}
.nav-inner {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0;
}
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }
.wordmark { font-size: 1.6rem; font-weight: 700; letter-spacing: 0.5px; color: var(--ink); }
.wordmark .play { color: var(--orange); }
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a { color: var(--ink-dim); font-weight: 600; }
.nav-links a:hover { color: var(--ink); }
.btn {
  display: inline-block; padding: 12px 24px; border-radius: 999px;
  font-weight: 700; border: 0; cursor: pointer; font-size: 1rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn-primary { background: linear-gradient(135deg, var(--orange), var(--orange-deep)); color: #1a0e02; box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-2px); color: #1a0e02; }
.btn-ghost { background: transparent; color: var(--ink); border: 2px solid var(--card-border); }
.btn-ghost:hover { border-color: var(--purple); color: var(--ink); }
.btn-sm { padding: 8px 16px; font-size: 0.9rem; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: #0e0a18 url("../assets/hero-halloween-banner.webp") center/cover no-repeat;
  min-height: 480px; display: flex; align-items: center;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(14,10,24,0.94) 20%, rgba(14,10,24,0.55) 55%, rgba(14,10,24,0.15) 100%);
}
.hero-inner { position: relative; z-index: 2; display: flex; gap: 32px; align-items: center; padding: 64px 0; width: 100%; }
.hero-copy { flex: 1.2; }
.hero-kicker {
  display: inline-block; font-size: 0.85rem; font-weight: 700; letter-spacing: 2px;
  color: var(--gold); text-transform: uppercase; margin-bottom: 14px;
}
.hero h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); margin-bottom: 16px; }
.hero h1 .accent { color: var(--orange); }
.hero p.lede { font-size: 1.2rem; color: var(--ink-dim); max-width: 34rem; margin-bottom: 28px; }
.hero p.lede strong { color: var(--ink); }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-mascot { flex: 0.8; text-align: center; }
.hero-mascot img {
  width: min(300px, 70vw); border-radius: 24px;
  filter: drop-shadow(0 18px 40px rgba(139, 92, 246, 0.35));
  animation: float 5s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.hero-mascot figcaption { margin-top: 10px; color: var(--ink-dim); font-size: 0.95rem; }
.hero-mascot figcaption strong { color: var(--gold); }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
.section-head { text-align: center; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); margin-bottom: 10px; }
.section-head p { color: var(--ink-dim); max-width: 40rem; margin: 0 auto; }

/* ---------- Game cards ---------- */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.game-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
  display: flex; flex-direction: column;
}
.game-card:hover { transform: translateY(-4px); border-color: var(--purple); }
.game-card .cover { aspect-ratio: 16/9; overflow: hidden; }
.game-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.game-card .body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.game-card h3 { font-size: 1.3rem; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-size: 0.75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: rgba(139, 92, 246, 0.18); color: #c4b0ff; border: 1px solid rgba(139,92,246,0.4);
}
.tag.soon { background: rgba(255,140,46,0.14); color: var(--gold); border-color: rgba(255,140,46,0.45); }
.game-card p.desc { color: var(--ink-dim); font-size: 0.95rem; flex: 1; }
.card-actions { display: flex; gap: 10px; margin-top: 6px; }

/* ---------- How it works ---------- */
.how { background: var(--bg-soft); border-top: 1px solid var(--card-border); border-bottom: 1px solid var(--card-border); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.step {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 28px 24px; text-align: center;
}
.step .num {
  width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), #6d3ff0);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 800; font-family: "Fredoka", sans-serif;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--ink-dim); font-size: 0.95rem; }
.step .big { font-size: 2rem; font-weight: 800; color: var(--gold); font-family: "Fredoka", sans-serif; }

/* ---------- Detail page ---------- */
.detail-hero { position: relative; }
.detail-hero .cover-wide { width: 100%; max-height: 420px; object-fit: cover; }
.detail-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,16,31,0) 40%, var(--bg) 100%);
}
.detail-head { position: relative; margin-top: -90px; z-index: 2; }
.detail-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 12px 0; }
.detail-meta { color: var(--ink-dim); margin-bottom: 24px; }
.player-shell {
  background: #000; border: 1px solid var(--card-border); border-radius: var(--radius);
  overflow: hidden; margin: 28px 0;
}
.player-frame { position: relative; aspect-ratio: 16/9; background: #0a0714; }
.player-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 24px;
}
.player-placeholder img { width: 120px; border-radius: 20px; opacity: 0.9; }
.player-placeholder p { color: var(--ink-dim); max-width: 30rem; }
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; margin: 32px 0; }
.detail-desc p { margin-bottom: 14px; color: var(--ink-dim); }
.detail-desc p strong { color: var(--ink); }
.side-card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 24px; align-self: start; }
.side-card h3 { margin-bottom: 14px; }
.side-card .row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--card-border); font-size: 0.95rem; }
.side-card .row:last-child { border-bottom: 0; }
.side-card .row span:first-child { color: var(--ink-dim); }

/* ---------- Footer ---------- */
footer { margin-top: auto; background: #0d0917; border-top: 1px solid var(--card-border); padding: 40px 0 28px; }
.foot-grid { display: flex; gap: 32px; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; }
.foot-brand { display: flex; gap: 12px; align-items: center; }
.foot-brand img { width: 52px; border-radius: 12px; }
.foot-note { color: var(--ink-dim); font-size: 0.9rem; margin-top: 16px; max-width: 60rem; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a { color: var(--ink-dim); font-size: 0.95rem; }
.copyright { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--card-border); color: var(--ink-dim); font-size: 0.85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-inner { flex-direction: column; text-align: center; padding: 48px 0; }
  .hero p.lede { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .hero-mascot img { width: min(220px, 60vw); }
  .detail-grid { grid-template-columns: 1fr; }
  .nav-links a:not(.btn):not(.nav-keep) { display: none; }
  section { padding: 44px 0; }
}

/* ============================================================
   Playblin Phase 2 — auth, dashboard, review queue
   ============================================================ */

.setup-banner {
  background: #2a1f14;
  border: 1px solid var(--orange-deep);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 28px;
  color: var(--ink);
}
.setup-banner code {
  background: rgba(0,0,0,0.35);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.9em;
}

.card-form {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  font-family: "Fredoka", sans-serif;
}
.field .opt { font-weight: 400; color: var(--ink-dim); font-size: 0.85em; }
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="url"],
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--bg-soft);
  color: var(--ink);
  font: inherit;
}
.field input:focus, .field textarea:focus {
  outline: 2px solid var(--orange);
  border-color: var(--orange);
}
.field input:disabled, .field textarea:disabled { opacity: 0.5; }
.field small { color: var(--ink-dim); font-size: 0.85em; }
.field input[type="file"] { color: var(--ink-dim); }
.checkrow { display: flex; gap: 16px; flex-wrap: wrap; }
.checkrow label {
  display: flex; align-items: center; gap: 6px;
  font-family: "Inter", sans-serif; font-weight: 400; margin: 0;
}
.checkrow input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--orange); }
.fineprint { color: var(--ink-dim); font-size: 0.9em; margin-top: 14px; }
.muted { color: var(--ink-dim); }

.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.alert {
  background: #3a1620;
  border: 1px solid #a33;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 18px;
}
.alert.ok { background: #14301f; border-color: #3a7; }

.tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.tab {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--bg-soft);
  color: var(--ink-dim);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.tab.active { background: var(--card); color: var(--ink); border-color: var(--orange); }

.dash-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-grid h3 { margin-bottom: 16px; }

.sub-card {
  display: flex;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
}
.sub-cover {
  width: 88px; height: 88px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.sub-body h4 { margin-bottom: 6px; }
.sub-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.linklike {
  background: none; border: none; padding: 0;
  color: var(--ink-dim); font: inherit; font-size: 0.85em;
  cursor: pointer; text-decoration: underline;
}
.linklike:hover { color: #f66; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8em;
  font-weight: 700;
}
.badge.wait { background: #3a2f14; color: var(--gold); }
.badge.ok { background: #14301f; color: #5d5; }
.badge.bad { background: #3a1620; color: #f88; }

.note-box {
  margin-top: 10px;
  background: var(--bg-soft);
  border-left: 3px solid var(--orange);
  border-radius: 0 8px 8px 0;
  padding: 10px 12px;
  font-size: 0.9em;
  color: var(--ink-dim);
}
.note-box strong { color: var(--ink); }

.review-card {
  display: flex;
  gap: 20px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  transition: opacity 0.3s;
}
@media (max-width: 700px) { .review-card { flex-direction: column; } }
.review-cover {
  width: 180px; height: 180px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}
.review-body { flex: 1; min-width: 0; }
.review-body h3 { margin-bottom: 4px; }
.review-meta { color: var(--ink-dim); font-size: 0.9em; margin-bottom: 10px; }
.review-short { font-style: italic; color: var(--ink-dim); margin: 10px 0; }
.review-desc { margin-bottom: 12px; }
.review-desc p { margin-bottom: 8px; }
.review-links { margin-bottom: 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.review-actions { display: flex; gap: 10px; margin-top: 12px; }
.empty-queue { text-align: center; padding: 60px 0; }
.empty-queue h3 { margin: 12px 0 8px; }

.nav-user { color: var(--gold); font-weight: 700; font-size: 0.9em; }
#nav-auth { display: inline-flex; gap: 14px; align-items: center; }


/* ---------- Playblin case treatment (uniform game art — brand rule) ----------
   Wii-keep-case style: white header band with the curved swoosh edge,
   PLAYBLIN in raised 3D letters top-right (where the Wii logo sits),
   art fills the case below the band — nothing important ever covered.
   Seal stamped bottom-left. Two colorways: .pb-case-a (black + purple)
   and .pb-case-b (orange + blue). Templates carry "pb-case pb-case-a" —
   switching colorways is a class swap. */
.pb-case {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #0b0b0f;
}
/* Wii header band — curved swoosh bottom edge, wears the colorway */
.pb-wii {
  flex-shrink: 0;
  height: 44px;
  border-bottom-left-radius: 70px;
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: 24px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
  position: relative; z-index: 3;
}
.pb-wii span {
  font-family: "Fredoka", "Inter", system-ui, sans-serif;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.pb-case-a .pb-wii {
  background: linear-gradient(180deg, #241b3d 0%, #171226 100%);
  border-bottom: 1px solid #574a8f;
}
.pb-case-a .pb-wii span {
  color: #f0e8ff;
  text-shadow:
    0 1px 0 #c9b3f7,
    0 2px 0 #a68df0,
    0 3px 0 #8665e0,
    0 5px 8px rgba(0, 0, 0, 0.7);
}
.pb-case-b .pb-wii {
  background: linear-gradient(180deg, #1f5b9c 0%, #12325e 100%);
  border-bottom: 1px solid #3f7fc4;
}
.pb-case-b .pb-wii span {
  color: #ffd9a8;
  text-shadow:
    0 1px 0 #ffcf90,
    0 2px 0 #f0a95c,
    0 3px 0 #d98a2b,
    0 5px 8px rgba(0, 0, 0, 0.7);
}
.pb-case .pb-art {
  display: block; width: 100%;
  flex: 1; min-height: 0;
  object-fit: cover;
  position: relative; z-index: 1;
}
/* plastic sheen over the art */
.pb-case .pb-art { box-shadow: inset 0 1px 0 rgba(255,255,255,0.08); }
/* ---- colorway A: black + purple ---- */
.pb-case-a {
  border: 1px solid #4a3670;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55), 0 0 20px rgba(139, 92, 246, 0.28);
}
/* ---- colorway B: orange + blue ---- */
.pb-case-b {
  background: #0d1b2e;
  border: 1px solid #f5a244;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55), 0 0 20px rgba(245, 162, 68, 0.30);
}
/* seal: stamped bottom-left */
.pb-seal,
.game-card .cover.pb-case .pb-seal,
.detail-hero .pb-case .pb-seal {
  position: absolute;
  left: 10px;
  bottom: 10px;
  width: 64px; height: 64px;
  transform: rotate(-10deg);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.55));
  pointer-events: none;
  z-index: 4;
}
/* game cards: the cover anchor becomes the case */
.game-card .cover.pb-case { aspect-ratio: 16/9; }
/* detail hero */
.detail-hero .pb-case { margin-bottom: 8px; }
.detail-hero .pb-case .pb-art { max-height: 340px; flex: none; }
.detail-hero .pb-wii { height: 54px; }
.detail-hero .pb-wii span { font-size: 0.95rem; }
/* mini cases for dashboard + review rows */
.pb-case.pb-mini .pb-wii { display: none; }
.pb-case.pb-mini .pb-seal { width: 38px; height: 38px; left: 5px; bottom: 5px; }
.sub-card .pb-case.pb-mini { width: 100px; flex-shrink: 0; }
.sub-card .pb-case.pb-mini .pb-art { height: 88px; flex: none; }
.review-card .pb-case.pb-mini { width: 192px; flex-shrink: 0; }
.review-card .pb-case.pb-mini .pb-art { height: 180px; flex: none; }
.show-pass {
  display: flex; align-items: center; gap: 8px;
  margin-top: 8px; font-size: 0.85rem; color: var(--ink-dim);
  cursor: pointer; font-weight: normal;
}
.show-pass input { accent-color: var(--purple); width: 16px; height: 16px; cursor: pointer; }
.forgot { margin: 10px 0 0; font-size: 0.85rem; text-align: right; }
.forgot a { color: var(--purple-light); text-decoration: none; }
.forgot a:hover { text-decoration: underline; }
.nav-publish .short { display: none; }
@media (max-width: 860px) {
  .nav-publish .full { display: none; }
  .nav-publish .short { display: inline; }
  .nav-links .btn { white-space: nowrap; padding: 8px 14px; font-size: 0.82rem; }
  .nav-links { gap: 10px; }
}
@media (max-width: 400px) {
  .wordmark { font-size: 1.3rem; }
  .brand img { width: 36px; height: 36px; }
  .brand { gap: 8px; }
}
@media (max-width: 560px) {
  .nav-user { display: none; }
}
