/* Wanky Brawl - the game's VHS menus: navy tape, VCR OSD letters, amber highlights */
@font-face { font-family: "VCR"; src: url("/fonts/VCR_OSD_Mono.ttf") format("truetype"); font-display: swap; }

:root {
  --navy: #080e46;
  --navy2: #0d1660;
  --blue: #0819b3;
  --amber: #ffd240;
  --white: #f5f5f0;
  --dim: #9ea3b3;
  --red: #ff6633;
  --line: rgba(255, 255, 255, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: #03061f; }
.page {
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 0%, var(--navy2), var(--navy) 60%, #03061f);
  color: var(--white);
  font-family: "VCR", Consolas, "Courier New", monospace;
  font-size: 17px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.45;
}
a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }
b { color: var(--amber); font-weight: normal; }

/* scan lines + a slow roll, like the game's tape */
.scan {
  pointer-events: none; position: fixed; inset: 0; z-index: 50;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0.22) 0 1px, transparent 1px 3px);
}
.scan::after {
  content: ""; position: absolute; left: 0; right: 0; height: 90px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.05), transparent);
  animation: roll 7s linear infinite;
}
@keyframes roll { from { top: -90px; } to { top: 100%; } }

.top { display: flex; justify-content: space-between; align-items: center; padding: 22px 32px; }
.logo { font-size: 40px; color: var(--white); text-shadow: 3px 3px 0 rgba(0,0,0,0.7); }
.logo:hover { text-decoration: none; }
.osd { color: var(--white); font-size: 20px; text-shadow: 2px 2px 0 #000; }
.rec { color: var(--white); margin-right: 14px; animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-t); position: absolute; left: 0; top: 0; opacity: 0.55;
}
.glitch::before { color: #ff1a33; transform: translateX(-2px); animation: jit 3.1s steps(1) infinite; }
.glitch::after { color: #1ae6ff; transform: translateX(2px); animation: jit 2.3s steps(1) infinite reverse; }
@keyframes jit { 0%, 92% { clip-path: inset(0 0 0 0); } 94% { clip-path: inset(40% 0 30% 0); transform: translateX(4px); } 97% { clip-path: inset(10% 0 70% 0); } }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px 40px; display: grid; gap: 20px; }

.card {
  background: rgba(0, 0, 10, 0.5);
  border: 2px solid var(--line);
  box-shadow: 6px 6px 0 rgba(0,0,0,0.45);
  padding: 22px 26px;
}
.card h1 { font-size: 34px; margin: 0 0 12px; text-shadow: 3px 3px 0 #000; }
.card h2 { font-size: 24px; margin: 0 0 12px; color: var(--amber); text-shadow: 2px 2px 0 #000; }
.card p { margin: 10px 0; }
.hidden { display: none !important; }

.btn {
  display: inline-block; cursor: pointer; border: 0;
  font: inherit; letter-spacing: inherit; text-transform: uppercase;
  background: var(--blue); color: var(--white);
  padding: 10px 20px; box-shadow: 4px 4px 0 #000;
}
.btn:hover, .btn:focus { background: var(--amber); color: #000; text-decoration: none; outline: none; }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #000; }
.btn.big { font-size: 24px; padding: 14px 28px; }
.btn.small { font-size: 15px; padding: 8px 14px; }
.btn.ghost { background: transparent; border: 2px solid var(--line); box-shadow: none; }
.btn.ghost:hover { background: var(--amber); }
.btn[disabled] { opacity: 0.4; cursor: default; }
.btn[disabled]:hover { background: var(--blue); color: var(--white); }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
input {
  font: inherit; letter-spacing: inherit; text-transform: uppercase;
  background: #000; color: var(--amber); border: 2px solid var(--line);
  padding: 8px 12px; min-width: 260px; flex: 1;
}
input:focus { outline: none; border-color: var(--amber); }

.amber { color: var(--amber); }
.dim { color: var(--dim); }
.small-t { font-size: 14px; }
.label { display: block; color: var(--dim); font-size: 13px; }
.big-num { font-size: 32px; text-shadow: 2px 2px 0 #000; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 8px 0 6px; }

.list { padding-left: 20px; color: var(--dim); }
.list li { margin: 6px 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.item { border: 2px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 6px; background: rgba(8,14,70,0.6); }
.item .name { color: var(--white); }
.item .kind { color: var(--dim); font-size: 13px; }
.item .desc { color: var(--dim); font-size: 13px; text-transform: none; flex: 1; }
.item .price { color: var(--amber); }
.item.on { border-color: var(--amber); }

.table { width: 100%; border-collapse: collapse; }
.table th { color: var(--dim); font-weight: normal; text-align: left; font-size: 13px; padding: 4px 6px; border-bottom: 2px solid var(--line); }
.table td { padding: 6px; border-bottom: 1px solid var(--line); }
.table .r { text-align: right; }
.table tr.me td { color: var(--amber); }
.plus { color: #7dff7a; }
.minus { color: var(--red); }

.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 60;
  background: #000; border: 2px solid var(--amber); color: var(--amber);
  padding: 12px 22px; box-shadow: 5px 5px 0 rgba(0,0,0,0.6); max-width: 90vw;
}
.toast.bad { border-color: var(--red); color: var(--red); }

.foot { text-align: center; padding: 10px 0 30px; font-size: 14px; }

@media (max-width: 640px) {
  .top { padding: 16px; }
  .logo { font-size: 28px; }
  .osd { font-size: 14px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  input { min-width: 0; }
}
