:root {
  --board-red: #7f1614;
  --board-gold: #bba77a;
  --board-green: #25362d;
  --board-green-dark: #121915;
  --cream: #e8dcc3;
  --ink: #18120e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--cream);
  background:
    radial-gradient(circle at top, rgba(203, 171, 103, 0.12), transparent 24%),
    linear-gradient(180deg, #321010 0 42px, #19211a 42px 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.arcade-shell {
  padding: 22px;
}

.arcade-back {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 2px solid rgba(255, 243, 214, 0.35);
  border-radius: 999px;
  background: rgba(21, 24, 20, 0.7);
  font-weight: 800;
}

.flash-frame {
  max-width: 1180px;
  margin: 18px auto 0;
  padding: 14px;
  border-radius: 28px;
  background: linear-gradient(180deg, #8f8164, #43392d);
  box-shadow: var(--shadow);
}

.frame-top,
.frame-bottom {
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #a59570, #403527);
}

.arcade-board {
  margin: 12px 0;
  padding: 28px;
  border-radius: 26px;
  border: 6px solid rgba(17, 23, 18, 0.92);
  background:
    radial-gradient(circle at top center, rgba(215, 190, 132, 0.08), transparent 30%),
    linear-gradient(180deg, #19211a, #2a3127);
}

.board-kicker,
.board-footer,
.board-subtitle,
.status-title,
.stat-box span,
.floor-label,
.sky-banner {
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

h1 {
  margin: 0;
  text-align: center;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(3rem, 9vw, 5.2rem);
  letter-spacing: 0.06em;
  color: var(--board-gold);
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.32);
}

.board-kicker {
  margin: 0 0 8px;
  text-align: center;
  color: #ebd7a0;
  font-size: 0.8rem;
  font-weight: 800;
}

.board-subtitle {
  max-width: 760px;
  margin: 10px auto 0;
  text-align: center;
  color: rgba(232, 220, 195, 0.78);
  font-size: 0.74rem;
  line-height: 1.8;
}

.arcade-stage {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 22px;
  margin-top: 26px;
}

.game-world {
  position: relative;
  min-height: 640px;
  border: 5px solid rgba(0, 0, 0, 0.35);
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at top center, rgba(255, 255, 255, 0.1), transparent 24%),
    linear-gradient(180deg, #39424e 0 16%, #616770 16% 28%, #4f463b 28% 100%);
}

.crowd-strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 92px;
  background:
    radial-gradient(circle at 8% 18%, #523122 0 18px, transparent 19px),
    radial-gradient(circle at 18% 20%, #352018 0 16px, transparent 17px),
    radial-gradient(circle at 30% 18%, #5d3a29 0 18px, transparent 19px),
    radial-gradient(circle at 42% 18%, #2a1b15 0 16px, transparent 17px),
    radial-gradient(circle at 54% 20%, #6a4732 0 18px, transparent 19px),
    radial-gradient(circle at 66% 18%, #3b251c 0 16px, transparent 17px),
    radial-gradient(circle at 78% 20%, #7c5337 0 18px, transparent 19px),
    radial-gradient(circle at 90% 18%, #2a1712 0 17px, transparent 18px),
    linear-gradient(180deg, transparent 0 24px, #30251d 24px 100%);
  opacity: 0.7;
}

.sky-banner {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(35, 20, 19, 0.82);
  color: #d9c9a4;
  font-size: 0.72rem;
  font-weight: 800;
  z-index: 3;
}

.lane {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 33.333%;
  border-left: 2px dashed rgba(228, 217, 188, 0.08);
}

.lane-1 { left: 0; }
.lane-2 { left: 33.333%; }
.lane-3 { left: 66.666%; }

.fall-zone {
  position: absolute;
  inset: 0;
}

.effect-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
}

.death-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(10, 4, 4, 0.18), rgba(8, 2, 2, 0.82));
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
  z-index: 8;
}

.death-overlay.visible {
  opacity: 1;
}

.death-overlay strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.2rem, 9vw, 6.8rem);
  letter-spacing: 0.08em;
  color: #8f1c18;
  text-shadow: 0 0 14px rgba(143, 28, 24, 0.36), 0 0 42px rgba(0, 0, 0, 0.8);
}

.runner {
  position: absolute;
  bottom: 58px;
  width: 148px;
  height: 178px;
  margin-left: -74px;
  transition: left 140ms ease;
  z-index: 4;
}

.runner.celebrate {
  animation: runner-bounce 240ms ease;
}

.runner.damage {
  animation: runner-shake 320ms ease;
}

.runner.lane-1 { left: 16.666%; }
.runner.lane-2 { left: 50%; }
.runner.lane-3 { left: 83.333%; }

.runner-helmet,
.runner-face,
.runner-torso,
.runner-belly,
.runner-arm,
.runner-leg,
.runner-plate {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.runner-helmet {
  top: 0;
  width: 88px;
  height: 62px;
  border-radius: 46px 46px 34px 34px;
  background: linear-gradient(180deg, #9a978f, #5a5751);
  border: 3px solid rgba(31, 28, 25, 0.75);
  box-shadow:
    inset 0 8px 0 rgba(255, 255, 255, 0.15),
    inset 0 -10px 0 rgba(36, 32, 28, 0.45);
}

.runner-helmet::before,
.runner-helmet::after {
  content: "";
  position: absolute;
  top: 10px;
  width: 18px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(182, 178, 171, 0.9), rgba(74, 70, 65, 0.95));
}

.runner-helmet::before {
  left: 14px;
}

.runner-helmet::after {
  right: 14px;
}

.runner-face {
  top: 18px;
  width: 36px;
  height: 22px;
  border-radius: 12px;
  background: #171311;
  box-shadow:
    inset 0 0 0 2px rgba(112, 107, 98, 0.28),
    0 0 10px rgba(0, 0, 0, 0.25);
}

.runner-face::before,
.runner-face::after {
  content: "";
  position: absolute;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #cf4d37;
  box-shadow: 0 0 6px rgba(207, 77, 55, 0.65);
}

.runner-face::before {
  left: 8px;
}

.runner-face::after {
  right: 8px;
}

.runner-torso {
  top: 48px;
  width: 94px;
  height: 62px;
  border-radius: 28px 28px 20px 20px;
  background: linear-gradient(180deg, #9f9b93, #5f5b54);
  border: 3px solid rgba(33, 29, 26, 0.72);
  box-shadow:
    inset 0 8px 0 rgba(255, 255, 255, 0.12),
    inset 0 -8px 0 rgba(39, 35, 31, 0.38);
}

.runner-belly {
  top: 86px;
  width: 116px;
  height: 62px;
  border-radius: 999px;
  background: linear-gradient(180deg, #aca79c, #666157);
  border: 3px solid rgba(33, 29, 26, 0.72);
  box-shadow:
    inset 0 10px 0 rgba(255, 255, 255, 0.1),
    inset 0 -10px 0 rgba(43, 39, 34, 0.34);
}

.runner-belly::before,
.runner-belly::after {
  content: "";
  position: absolute;
  top: 9px;
  width: 16px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(188, 183, 175, 0.9), rgba(83, 79, 72, 0.95));
}

.runner-belly::before {
  left: 18px;
}

.runner-belly::after {
  right: 18px;
}

.runner-arm {
  top: 72px;
  width: 28px;
  height: 74px;
  border-radius: 16px;
  background: linear-gradient(180deg, #97938b, #5a564f);
  border: 3px solid rgba(33, 29, 26, 0.72);
}

.runner-arm.left {
  left: 24px;
  transform: rotate(16deg);
}

.runner-arm.right {
  left: auto;
  right: 24px;
  transform: rotate(-16deg);
}

.runner-leg {
  top: 132px;
  width: 30px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(180deg, #8b867d, #514d47);
  border: 3px solid rgba(33, 29, 26, 0.72);
}

.runner-leg.left {
  left: 44px;
}

.runner-leg.right {
  left: auto;
  right: 44px;
}

.runner-plate {
  top: 116px;
  width: 118px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #c9ba97, #8f8063);
  box-shadow: 0 0 0 5px rgba(84, 54, 16, 0.18);
}

.runner-plate::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 30px;
  height: 20px;
  transform: translateX(-50%);
  border-radius: 16px;
  background: #9f8c46;
}

.floor-label {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  color: rgba(224, 212, 185, 0.72);
  font-size: 0.68rem;
  font-weight: 800;
}

.falling-item {
  position: absolute;
  top: -70px;
  width: 86px;
  min-height: 52px;
  margin-left: -43px;
  padding: 10px 10px 8px;
  border-radius: 16px;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.25;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.falling-item.good {
  background: linear-gradient(180deg, #ded2b6, #ab9360);
  color: #24170d;
}

.falling-item.bad {
  background: linear-gradient(180deg, #6f5a5b, #431f21);
  color: #efe3d8;
}

.falling-item.good::before,
.falling-item.bad::before {
  display: block;
  margin-bottom: 6px;
  font-size: 1.2rem;
}

.falling-item.good.food-sarmale::before { content: "✦"; }
.falling-item.good.food-covrig::before { content: "◌"; }
.falling-item.good.food-mici::before { content: "☄"; }
.falling-item.good.food-papanasi::before { content: "☼"; }
.falling-item.good.food-ecler::before { content: "✧"; }
.falling-item.good.food-gogosi::before { content: "◈"; }
.falling-item.good.food-zacusca::before { content: "⬢"; }
.falling-item.bad.hazard-porumbel::before { content: "☠"; }
.falling-item.bad.hazard-farfurie::before { content: "✕"; }
.falling-item.bad.hazard-suc::before { content: "🜄"; }
.falling-item.bad.hazard-crypto::before { content: "₿"; }
.falling-item.bad.hazard-unchi::before { content: "⚰"; }
.falling-item.bad.hazard-salata::before { content: "☣"; }

.hit-pop {
  animation: popout 220ms ease forwards;
}

@keyframes popout {
  to {
    transform: scale(1.18);
    opacity: 0;
  }
}

@keyframes runner-bounce {
  0% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

@keyframes runner-shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  50% { transform: translateX(8px); }
  75% { transform: translateX(-6px); }
  100% { transform: translateX(0); }
}

.comic-burst {
  position: absolute;
  padding: 10px 14px;
  border-radius: 999px;
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  animation: burst-fly 620ms ease forwards;
}

.comic-burst.good {
  background: rgba(202, 190, 160, 0.96);
  color: #33261b;
}

.comic-burst.bad {
  background: rgba(101, 42, 39, 0.96);
  color: #f1dbd2;
}

@keyframes burst-fly {
  0% {
    transform: translate(-50%, 0) scale(0.7);
    opacity: 0;
  }
  18% {
    transform: translate(-50%, -8px) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -64px) scale(1.08);
    opacity: 0;
  }
}

.mobile-controls {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.control-button {
  flex: 1;
  min-height: 50px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, #bdb19c, #6d624d);
  color: #1c1712;
  font: inherit;
  font-weight: 800;
}

.stats-row,
.loot-grid,
.control-row {
  display: grid;
  gap: 14px;
}

.stats-row,
.loot-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.control-row {
  grid-template-columns: 1.1fr 0.9fr;
}

.stat-box,
.mission-box,
.status-box,
.loot-card {
  padding: 18px;
  border: 3px solid rgba(231, 215, 159, 0.18);
  border-radius: 20px;
  background: rgba(14, 16, 14, 0.52);
}

.stat-box span {
  display: block;
  margin-bottom: 8px;
  color: #d8c382;
  font-size: 0.74rem;
  font-weight: 800;
}

.stat-box strong {
  font-family: "Bebas Neue", sans-serif;
  font-size: 2.2rem;
  color: #fff2cf;
}

.stage-controls {
  display: grid;
  gap: 16px;
}

.status-title {
  margin: 0 0 10px;
  color: #d7c07c;
  font-size: 0.72rem;
  font-weight: 800;
}

.mission-box h2 {
  margin: 0 0 10px;
  font-family: "Bebas Neue", sans-serif;
  font-size: 2rem;
  color: #f6e8ba;
}

.mission-box p,
.status-box p:last-child,
.loot-card span {
  margin: 0;
  line-height: 1.8;
}

.loot-card strong {
  display: block;
  margin-bottom: 8px;
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.8rem;
}

.loot-card.good {
  background: rgba(20, 56, 30, 0.46);
}

.loot-card.bad {
  background: rgba(72, 19, 16, 0.52);
}

.arcade-confirm,
.arcade-reset {
  min-height: 54px;
  border: 0;
  border-radius: 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.arcade-confirm {
  background: linear-gradient(180deg, #847760, #50483a);
  color: #f2ead6;
  box-shadow: inset 0 -4px 0 rgba(62, 8, 8, 0.28);
}

.arcade-reset {
  background: rgba(246, 239, 214, 0.08);
  color: var(--cream);
  border: 2px solid rgba(231, 215, 159, 0.25);
}

.board-footer {
  margin: 18px 0 0;
  text-align: center;
  color: rgba(221, 208, 181, 0.76);
  font-size: 0.76rem;
  font-weight: 700;
}

@media (max-width: 900px) {
  .arcade-stage,
  .stats-row,
  .loot-grid,
  .control-row {
    grid-template-columns: 1fr;
  }

  .arcade-board {
    padding: 20px;
  }

  .game-world {
    min-height: 540px;
  }

  .runner {
    transform: scale(0.9);
    transform-origin: center bottom;
  }
}
