:root {
  --bg: #100c08;
  --panel: #1d150e;
  --panel2: #251b11;
  --line: #0a0705;
  --gold: #c9a227;
  --gold-hi: #f2d060;
  --txt: #e8dcc0;
  --dim: #9a8a68;
  --red: #c0392b;
  --green: #6f9e4f;
  --px: 'Press Start 2P', monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: Georgia, 'Times New Roman', serif;
  min-height: 100vh;
}

/* --- hero с параллаксом --- */
.hero {
  position: relative;
  height: 300px;
  overflow: hidden;
  border-bottom: 4px solid var(--line);
  outline: 2px solid var(--gold);
  outline-offset: -6px;
}
.hero .layer {
  position: absolute;
  inset: -12px;
  background-size: cover;
  background-position: bottom center;
  image-rendering: pixelated;
}
.hero .shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(16,12,8,.15) 30%, rgba(16,12,8,.88) 100%);
}
.hero h1 {
  position: absolute;
  left: 0; right: 0; bottom: 26px;
  text-align: center;
  font-family: var(--px);
  font-size: 26px;
  color: var(--gold-hi);
  text-shadow: 3px 3px 0 #000, -1px -1px 0 #000;
  margin: 0;
  z-index: 5;
}
.hero .sub {
  position: absolute;
  left: 0; right: 0; bottom: 8px;
  text-align: center;
  color: var(--dim);
  font-size: 13px;
  letter-spacing: 3px;
  z-index: 5;
}
.torch { position: absolute; bottom: 18px; width: 60px; height: 110px; z-index: 4; }
.torch.left { left: 5%; }
.torch.right { right: 5%; }
#embers { position: absolute; inset: 0; z-index: 3; pointer-events: none; }

/* CSS-факел (фолбэк, пока не поднялся Lottie) */
.css-flame { position: absolute; left: 50%; bottom: 34px; width: 26px; height: 52px; transform: translateX(-50%); }
.css-flame i { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
.css-flame i:nth-child(1) { width: 26px; height: 52px; background: #e25822; animation: fl .5s steps(2) infinite; }
.css-flame i:nth-child(2) { width: 16px; height: 34px; background: #f2a007; animation: fl .4s steps(2) infinite reverse; }
.css-flame i:nth-child(3) { width: 8px; height: 18px; background: #ffe08a; animation: fl .33s steps(2) infinite; }
@keyframes fl { 0% { transform: translateX(-60%) scaleY(1); } 100% { transform: translateX(-40%) scaleY(1.12); } }
.stick { position: absolute; left: 50%; bottom: 0; width: 8px; height: 38px; transform: translateX(-50%); background: #5a3a1c; box-shadow: inset -2px 0 0 #3a2410; }

/* --- layout --- */
.wrap { max-width: 860px; margin: 0 auto; padding: 24px 16px 60px; }

.panel {
  background: var(--panel);
  border: 3px solid var(--line);
  outline: 1px solid var(--gold);
  padding: 20px;
  margin: 18px 0;
  box-shadow: 6px 6px 0 #000;
}
.panel h2 {
  font-family: var(--px);
  font-size: 14px;
  color: var(--gold-hi);
  margin: 0 0 14px;
}
.panel h2::before { content: '⚔ '; }

/* --- формы --- */
input {
  display: block;
  width: 100%;
  max-width: 360px;
  padding: 10px 12px;
  margin: 8px 0;
  background: #0e0a06;
  color: var(--txt);
  border: 2px solid var(--gold);
  font-size: 15px;
  font-family: inherit;
}
input:focus { outline: 2px solid var(--gold-hi); }
button, .btn {
  font-family: var(--px);
  font-size: 12px;
  padding: 12px 18px;
  margin: 10px 0;
  background: #6b4d1f;
  color: #ffe9a8;
  border: 3px solid var(--line);
  outline: 1px solid var(--gold);
  cursor: pointer;
  box-shadow: 4px 4px 0 #000;
  text-decoration: none;
  display: inline-block;
}
button:hover, .btn:hover { background: #8a6428; transform: translate(-1px, -1px); box-shadow: 5px 5px 0 #000; }
button:active, .btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #000; }
a { color: var(--gold-hi); }
.ok { color: #9fd67d; }
.err { color: #ff8a7a; }
.dim { color: var(--dim); }
.msg { border: 2px solid var(--gold); padding: 10px 14px; background: #0e0a06; }

/* --- слоты --- */
.slots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 640px) { .slots { grid-template-columns: 1fr; } }
.slot {
  background: var(--panel2);
  border: 3px solid var(--line);
  outline: 1px solid #6b5a33;
  padding: 14px;
  min-height: 150px;
  box-shadow: 4px 4px 0 #000;
}
.slot b { font-family: var(--px); font-size: 11px; color: var(--gold-hi); }
.slot.empty { outline-style: dashed; color: var(--dim); }
.slot.locked { outline-style: dashed; outline-color: #443a28; color: #5f543f; background: #14100b; }
.slot.doom { outline-color: var(--red); }
img.skin { image-rendering: pixelated; width: 128px; background: #0e0a06; border: 2px solid var(--gold); margin: 8px 0; }
.stat { display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px; }
.stat b { color: var(--gold-hi); }

footer { text-align: center; color: var(--dim); font-size: 12px; padding: 20px; letter-spacing: 1px; }
