/* BREGOSURVIVAL site theme — retro itch.io-style game page.
   Dark olive green, parchment-gold pixel text, ornate gold frames,
   'Press Start 2P' bitmap font. */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
  --bg: #191d0e;
  --bg2: #12150a;
  --panel: #232912;
  --panel2: #2c3315;
  --panel3: #1d2210;
  --gold: #c9a03c;
  --gold-hi: #ffd95e;
  --gold-dk: #7a6222;
  --text: #e3d491;
  --dim: #a89b62;
  --orange: #ff9822;
  --red: #d4482a;
  --red-hi: #ff6a42;
  --green: #9ac04a;
  --line: #4a481f;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg2);
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(154,192,74,.06), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(0,0,0,.14) 3px 6px);
  color: var(--text);
  font-family: 'Press Start 2P', 'Courier New', monospace;
  font-size: 11px; line-height: 1.9;
  overflow-x: hidden;
}
a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--gold-hi); text-decoration: underline; }
.dim { color: var(--dim); }
.xs { font-size: 8px; }
.center { text-align: center; }

.wrap { max-width: 960px; margin: 0 auto; padding: 18px 12px 40px; }

/* ---- ornate gold frame helper ---- */
.frame {
  border: 3px solid var(--gold);
  outline: 2px solid #000;
  box-shadow:
    0 0 0 5px var(--gold-dk),
    0 0 0 7px #000,
    0 6px 30px rgba(0,0,0,.6),
    inset 0 0 0 2px #000;
  position: relative;
}
.frame::before, .frame::after {
  content: '◆'; position: absolute; top: -14px; color: var(--gold-hi);
  font-size: 12px; text-shadow: 1px 1px 0 #000; z-index: 2;
}
.frame::before { left: 10px; }
.frame::after { right: 10px; }

/* ---- banner ---- */
.banner {
  height: 190px; margin-bottom: 26px; overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 120%, #33411a 0%, #1c2410 55%, #12180a 100%);
  display: flex; align-items: center; justify-content: center;
}
#voxels { position: absolute; inset: 0; width: 100%; height: 100%; }
.banner-inner { position: relative; text-align: center; }
.banner h1 {
  font-size: clamp(22px, 5vw, 40px); letter-spacing: 2px; color: var(--gold-hi);
  text-shadow: 2px 2px 0 #7a3a10, 3px 3px 0 #000;
}
.banner h1 span { color: var(--orange); }
.banner .sub { margin-top: 10px; font-size: 9px; color: var(--dim); letter-spacing: 1px; }

/* ---- page body ---- */
.page { background: var(--panel); border: 2px solid #000; outline: 1px solid var(--line); padding: 18px; }
.caption { font-size: 9px; color: var(--dim); margin-bottom: 12px; }

/* ---- buy/play bar ---- */
.buybar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: var(--panel3); border: 2px solid #000; padding: 10px 12px; margin-bottom: 18px;
}
.buybar-actions { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; }
.buybar-actions .btn { align-self: center; }
.buybar-actions .btn.ghost { padding: 15px 22px; font-size: 11px; }
.btn {
  display: inline-block; padding: 12px 20px; cursor: pointer;
  font-family: inherit; font-size: 11px; letter-spacing: 1px;
  color: #fff; background: linear-gradient(var(--red-hi), var(--red) 55%, #a83318);
  border: 2px solid #000; box-shadow: inset 2px 2px 0 rgba(255,255,255,.25), inset -2px -2px 0 rgba(0,0,0,.4), 0 3px 0 #000;
  text-shadow: 1px 1px 0 rgba(0,0,0,.45); transition: transform .06s, filter .1s;
}
.btn:hover { filter: brightness(1.15); transform: translateY(-1px); text-decoration: none; color: #fff; }
.btn:active { transform: translateY(2px); box-shadow: inset 2px 2px 0 rgba(0,0,0,.4); }
.btn.gold { background: linear-gradient(#ffd95e, var(--gold) 55%, #8a6d24); color: #241a02; text-shadow: 1px 1px 0 rgba(255,255,255,.3); }
.btn.ghost { background: var(--panel2); color: var(--text); }
.btn.btn-off, .btn[aria-disabled="true"] {
  opacity: 0.42; cursor: not-allowed; filter: grayscale(0.45) brightness(0.88);
  pointer-events: none; box-shadow: inset 2px 2px 0 rgba(0,0,0,.25), 0 2px 0 #000;
}
.btn.btn-off:hover, .btn[aria-disabled="true"]:hover { transform: none; filter: grayscale(0.45) brightness(0.88); }
.btn.big { padding: 15px 30px; font-size: 13px; }
.btn.wide { display: block; text-align: center; }
.price { color: var(--gold-hi); }
.price b { font-size: 13px; }

/* ---- columns ---- */
.columns { display: grid; grid-template-columns: 1fr 230px; gap: 18px; }
@media (max-width: 760px) { .columns { grid-template-columns: 1fr; } }

/* ---- main content ---- */
main h2 {
  font-size: 12px; color: var(--gold-hi); letter-spacing: 1px;
  margin: 26px 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--line);
  text-shadow: 1px 1px 0 #000;
}
main h2:first-child { margin-top: 0; }
main p { margin-bottom: 12px; font-size: 10px; color: var(--text); }
main .lead { font-size: 11px; }
main b { color: var(--gold-hi); }

.quote {
  background: var(--panel3); border: 2px solid #000; border-left: 4px solid var(--gold);
  padding: 12px 14px; margin: 14px 0; font-size: 10px; font-style: italic; color: var(--gold-hi);
  line-height: 2;
}

ul.feat { list-style: none; margin-bottom: 14px; }
ul.feat li { font-size: 10px; padding: 4px 0 4px 20px; position: relative; }
ul.feat li::before { content: '◆'; position: absolute; left: 2px; color: var(--orange); font-size: 9px; }
ul.feat b { color: var(--gold-hi); }

/* ---- tables (controls / info) ---- */
table.px { width: 100%; border-collapse: collapse; margin-bottom: 14px; font-size: 9px; }
table.px td { border: 1px solid var(--line); padding: 8px 10px; vertical-align: top; }
table.px td:first-child { color: var(--gold-hi); white-space: nowrap; width: 34%; background: var(--panel3); }
table.px .tag { display: inline-block; background: var(--panel2); border: 1px solid var(--line); padding: 2px 7px; margin: 1px 2px 1px 0; color: var(--orange); }

/* ---- earn steps ---- */
.steps { display: grid; gap: 8px; margin-bottom: 14px; }
.step { background: var(--panel3); border: 2px solid #000; padding: 10px 12px; font-size: 9px; display: flex; gap: 12px; align-items: baseline; }
.step .n { color: #241a02; background: var(--gold); border: 2px solid #000; padding: 2px 7px; flex: none; }
.step b { color: var(--gold-hi); display: block; margin-bottom: 4px; }

/* ---- sidebar ---- */
aside .shot { display: block; width: 100%; margin-bottom: 12px; border: 2px solid #000; outline: 2px solid var(--gold-dk); image-rendering: auto; transition: outline-color .1s, transform .1s; }
aside .shot:hover { outline-color: var(--gold-hi); transform: scale(1.02); }
aside .side-note { font-size: 8px; color: var(--dim); text-align: center; margin-bottom: 16px; }
.side-box { background: var(--panel3); border: 2px solid #000; padding: 12px; margin-bottom: 12px; font-size: 9px; }
.side-box b { color: var(--gold-hi); display: block; margin-bottom: 6px; font-size: 10px; }
.side-box .row { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.side-box .row:last-child { border-bottom: none; }
.side-box .val { color: var(--orange); }

/* ---- download / play section ---- */
.dl { background: var(--panel3); border: 2px solid #000; padding: 14px; margin-top: 8px; }
.dl .row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

footer { margin-top: 22px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 8px; color: var(--dim); }
footer a { color: var(--dim); }

/* ================= play gate ================= */
.gate-body {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px; padding: 5vh 16px; position: relative;
}
.gate-banner { width: min(560px, 94vw); height: 150px; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 120%, #33411a 0%, #1c2410 55%, #12180a 100%); overflow: hidden; }
.gate-banner h1 { position: relative; font-size: clamp(20px, 4.5vw, 32px); color: var(--gold-hi); letter-spacing: 2px;
  text-shadow: 2px 2px 0 #7a3a10, 3px 3px 0 #000; }
.gate-banner h1 span { color: var(--orange); }
.gate-tag { font-size: 9px; color: var(--dim); text-align: center; max-width: 500px; line-height: 2.1; }
.gate-tag b { color: var(--green); }
.gate-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.gate-chip { background: var(--panel3); border: 2px solid #000; outline: 1px solid var(--line); padding: 8px 14px; font-size: 8px; text-align: center; }
.gate-chip b { display: block; font-size: 10px; color: var(--gold-hi); margin-bottom: 3px; }
.gate-card { background: var(--panel); padding: 22px; width: min(460px, 94vw); display: flex; flex-direction: column; gap: 14px; text-align: center; }
.gate-card .head { font-size: 8px; letter-spacing: 1px; color: var(--green); }
.wallet-status { background: var(--bg2); border: 2px solid #000; padding: 12px 10px; font-size: 8px; word-break: break-all; line-height: 1.8; color: var(--dim); }
.wallet-status.ok { border-color: var(--green); color: var(--green); }
.gate-note { color: var(--dim); font-size: 8px; line-height: 1.9; }
.gate-or { color: var(--dim); letter-spacing: 3px; font-size: 9px; }
.gate-back { position: absolute; bottom: 16px; font-size: 8px; color: var(--dim); }

.hold-gate {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8, 10, 5, 0.88); padding: 16px;
}
.hold-gate.hidden { display: none; }
.hold-card {
  background: var(--panel); padding: 22px; width: min(480px, 94vw);
  display: flex; flex-direction: column; gap: 14px; text-align: center;
}
.hold-detail { font-size: 8px; line-height: 2; color: var(--text); }
.hold-detail b { color: var(--gold-hi); }
.hold-stats { margin: 8px 0; padding: 10px; background: var(--panel3); border: 2px solid #000; }
.hold-err { color: var(--red-hi); }
.hold-actions { display: flex; flex-direction: column; gap: 10px; }
.hold-actions .btn { cursor: pointer; border: none; font-family: inherit; text-decoration: none; display: block; }
