:root {
  --ink: #1a0f0a;
  --cream: #fff4e8;
  --blood: #c41e1e;
  --gold: #e8a317;
  --ok: #1f7a4c;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: "DM Sans", sans-serif;
  color: var(--cream);
  background: var(--ink);
  overflow-x: hidden;
  touch-action: manipulation;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(196, 30, 30, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 80%, rgba(232, 163, 23, 0.2), transparent 50%),
    linear-gradient(160deg, #2a1210 0%, #1a0f0a 45%, #0d1814 100%);
}

.stage {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1.25rem, env(safe-area-inset-bottom));
}

.screen {
  display: none;
  width: min(640px, 100%);
  text-align: center;
  animation: rise 0.45s ease both;
}

.screen.active {
  display: block;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.title {
  margin: 0 0 0.5rem;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(2.4rem, 11vw, 4.6rem);
  letter-spacing: 0.04em;
  line-height: 0.95;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}

.title-rage {
  color: #ff4d4d;
  animation: shake 0.5s ease;
}

.title-win {
  color: var(--gold);
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-8px) rotate(-1deg);
  }
  40% {
    transform: translateX(8px) rotate(1deg);
  }
  60% {
    transform: translateX(-6px);
  }
  80% {
    transform: translateX(6px);
  }
}

.subtitle {
  margin: 0 0 1.4rem;
  font-size: clamp(1rem, 4vw, 1.15rem);
  line-height: 1.35;
  opacity: 0.85;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.btn {
  appearance: none;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 1.05rem 1.4rem;
  min-height: 52px;
  width: 100%;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  user-select: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-yes {
  background: var(--ok);
  color: #fff;
  box-shadow: 0 5px 0 #145536;
}

.btn-no,
.btn-exit {
  background: var(--blood);
  color: #fff;
  box-shadow: 0 5px 0 #8a1010;
}

.hint {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  opacity: 0.65;
}

.price-arena {
  position: relative;
  width: 100%;
  height: min(48dvh, 340px);
  margin: 0 auto 1rem;
  border: 2px dashed rgba(255, 244, 232, 0.25);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

.btn-price-run {
  position: absolute;
  left: 50%;
  top: 40%;
  min-width: 118px;
  width: auto;
  padding: 0.85rem 1.1rem;
  background: #5a5a5a;
  color: #fff;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.35);
  z-index: 2;
  transition: left 0.07s linear, top 0.07s linear;
  pointer-events: none;
}

.btn-price-ok {
  display: block;
  width: 100%;
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 5px 0 #9a6b0c;
  font-size: 1.1rem;
}

@media (min-width: 640px) {
  .actions {
    flex-direction: row;
    justify-content: center;
  }

  .actions .btn {
    width: auto;
    min-width: 140px;
  }
}
