/* Roar — dark violet-ink, one signature: the holographic foil gradient,
   reserved for the wordmark and hit cards. Everything else stays quiet. */

:root {
  --ink: #14121f;          /* page background — deep violet-ink, night-stream */
  --surface: #1e1b2e;      /* cards, panels */
  --surface-2: #262239;    /* hover, inputs */
  --line: #322d4a;         /* borders */
  --text: #eae8f2;
  --muted: #9b96b4;
  --accent: #ffd166;       /* warm gold, small highlights only */
  --holo: linear-gradient(100deg, #58e6ff 0%, #b78cff 30%, #ff8bd2 60%, #ffd97a 100%);
  --radius: 12px;          /* rounded like a sleeved card */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: "Archivo", system-ui, sans-serif;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: min(960px, 100% - 2.5rem);
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

a { color: var(--text); }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid #b78cff; outline-offset: 2px; }

h1, h2 {
  font-family: "Unbounded", "Archivo", sans-serif;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 1rem; }

.section-label {
  font-family: "Archivo", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 2.5rem 0 1rem;
}

/* ---- header / footer ---- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-family: "Unbounded", sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  background: var(--holo);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: holo-drift 9s ease-in-out infinite alternate;
}

@keyframes holo-drift {
  from { background-position: 0% 50%; }
  to   { background-position: 100% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .wordmark, .card-hit::before { animation: none !important; }
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-size: 0.95rem;
}
.site-header nav a { text-decoration: none; color: var(--muted); }
.site-header nav a:hover { color: var(--text); }
.nav-cta {
  color: var(--ink) !important;
  background: var(--accent);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-weight: 700;
}
.admin-link { color: var(--accent) !important; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer p { margin: 0.2rem 0; }

.fineprint { color: var(--muted); font-size: 0.85rem; }
.optional { color: var(--muted); font-weight: 400; }
.empty { color: var(--muted); }

/* ---- hero ---- */

.hero { padding: 3rem 0 1rem; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin: 0; }
.holo-text {
  background: var(--holo);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.05rem;
}

/* ---- pack grid ---- */

.pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.pack-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.pack-card:hover { transform: translateY(-3px); border-color: #4a4370; }
.pack-card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }

.pack-art-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  background: var(--surface-2);
  color: var(--line);
  font-family: "Unbounded", sans-serif;
  font-size: 3rem;
  font-weight: 900;
}
.pack-art-placeholder.large { border-radius: var(--radius); }

.pack-card-body { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.8rem 0.9rem 1rem; }
.pack-game {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.pack-name { font-weight: 700; }
.pack-meta { display: flex; justify-content: space-between; align-items: baseline; margin-top: 0.3rem; }
.pack-price { font-weight: 700; color: var(--accent); }
.pack-stock { font-size: 0.8rem; color: var(--muted); }
.sold-out { color: #ff8b8b; font-weight: 700; }

/* ---- product page ---- */

.product-page {
  display: grid;
  grid-template-columns: minmax(200px, 320px) 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 640px) { .product-page { grid-template-columns: 1fr; } }
.product-art img { width: 100%; border-radius: var(--radius); }
.product-price { font-size: 1.6rem; font-weight: 700; color: var(--accent); margin: 1rem 0; }

/* ---- buttons & forms ---- */

.button-primary {
  display: inline-block;
  background: var(--accent);
  color: var(--ink);
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.6rem;
  font-family: "Archivo", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button-primary:hover { filter: brightness(1.08); color: var(--ink); }

.inline-form { display: inline; }
.link-button {
  background: none;
  border: none;
  padding: 0;
  color: var(--muted);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}
.link-button:hover { color: var(--text); }

form label { display: block; margin: 0 0 0.9rem; font-weight: 500; font-size: 0.95rem; }
input[type="text"], input[type="email"], input[type="password"],
input[type="url"], input[type="number"], textarea, select {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.55rem 0.7rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
}
input:focus, textarea:focus, select:focus { border-color: #b78cff; outline: none; }

.auth-card {
  max-width: 26rem;
  margin: 2rem auto 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
}
.auth-card h1 { font-size: 1.5rem; }
.auth-card .button-primary { width: 100%; margin-top: 0.5rem; }
.auth-alt { margin-top: 1.2rem; font-size: 0.9rem; color: var(--muted); }

.flash {
  border-radius: 8px;
  padding: 0.7rem 1rem;
  margin: 0 0 1.2rem;
  font-size: 0.95rem;
}
.flash-error { background: #3a1e2a; border: 1px solid #6e2b40; color: #ffb3c0; }
.flash-info { background: #1e2f3a; border: 1px solid #2b556e; color: #b3dcff; }

/* ---- rips ---- */

.rip-list { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.rip-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  text-decoration: none;
}
.rip-row:hover { border-color: #4a4370; }
.rip-row-main { display: flex; flex-direction: column; gap: 0.1rem; }
.rip-title { font-weight: 700; }
.rip-row-meta { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }

.status {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
}
.status-queued { background: var(--surface-2); color: var(--muted); }
.status-ripped { background: #3a331e; color: #f0dd9a; }
.status-submitted { background: #2b3a1e; color: #c4f09a; }
.status-finalized { background: var(--surface-2); color: var(--text); }

.rip-header { display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem; margin-bottom: 1.5rem; }
.rip-header h1 { margin: 0; }
.rip-note { color: var(--muted); max-width: 34rem; }

.rip-video video { width: 100%; border-radius: var(--radius); background: #000; }

/* ---- cards in a rip ---- */

.card-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.card-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}
.card-main { display: flex; flex-direction: column; gap: 0.1rem; flex: 1; min-width: 0; }
.card-name { font-weight: 700; }
.card-detail { font-size: 0.82rem; color: var(--muted); }
.card-value { font-weight: 700; white-space: nowrap; }
.card-choice { display: flex; gap: 0.4rem; flex-shrink: 0; }

/* The signature, spent here: hits wear the foil. */
.card-hit { border: 1px solid transparent; }
.card-hit::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  padding: 1px;
  background: var(--holo);
  background-size: 300% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: holo-drift 7s ease-in-out infinite alternate;
  pointer-events: none;
}

.hit-badge {
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  background: var(--holo);
  color: var(--ink);
}

.card-thumb {
  width: 42px;
  border-radius: 4px;
  flex-shrink: 0;
}

.foil-chip {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  vertical-align: middle;
}

.chip {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.chip:hover { color: var(--text); border-color: #4a4370; }
.chip-active { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.chip-locked { cursor: default; text-transform: capitalize; }

.finalize { margin-top: 2rem; }

/* ---- account ---- */

.balance { font-size: 1.1rem; }
.balance-amount { font-family: "Unbounded", sans-serif; font-weight: 700; color: var(--accent); }
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.ledger-delta { font-weight: 700; }

/* ---- admin section ---- */

.admin-nav {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.8rem;
}
.admin-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
}
.admin-nav a:hover { color: var(--text); }
.admin-nav a.active { background: var(--surface-2); color: var(--text); }

.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.page-head h1 { margin: 0; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  text-decoration: none;
}
a.stat:hover { border-color: #4a4370; }
.stat-value { font-family: "Unbounded", sans-serif; font-weight: 700; font-size: 1.5rem; }
.stat-label { font-size: 0.82rem; color: var(--muted); }
.stat-warn .stat-value { color: #ff8b8b; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.2rem;
  font-size: 0.95rem;
}
.admin-table th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid var(--line);
}
.admin-table td { padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--line); }
.admin-table code { color: var(--muted); }
.row-inactive td { color: var(--muted); }
.cell-warn { color: #ff8b8b; font-weight: 700; }

/* ---- admin ---- */

.admin-panel {
  margin-top: 3rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.admin-panel button {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.admin-panel button:hover { border-color: #4a4370; }
.card-entry { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.card-entry input[type="text"] { width: auto; flex: 1 1 8rem; margin-top: 0; }
.card-entry .checkbox { display: flex; align-items: center; gap: 0.35rem; margin: 0; white-space: nowrap; }

/* ---- staff card search ---- */

.card-search { margin-bottom: 1.5rem; }
.search-results {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  max-height: 24rem;
  overflow-y: auto;
  background: var(--surface);
}
.search-results li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid var(--line);
}
.search-results li:last-child { border-bottom: none; }
.search-results img { width: 36px; border-radius: 3px; flex-shrink: 0; }
.search-main { display: flex; flex-direction: column; gap: 0.05rem; flex: 1; min-width: 0; }
.search-name { font-weight: 700; font-size: 0.95rem; }
.search-actions { display: flex; gap: 0.4rem; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.search-empty { color: var(--muted); font-size: 0.9rem; }

.admin-card-list { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.admin-card-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.manual-entry { margin: 0 0 1.5rem; }
.manual-entry summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; margin-bottom: 0.7rem; }
.chip-danger:hover { border-color: #6e2b40; color: #ffb3c0; }

.video-form { display: flex; gap: 0.5rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 1.5rem; }
.video-form label { flex: 1 1 16rem; margin: 0; }
.submit-form { margin-bottom: 0.3rem; }
