:root{
  --bg-green: #00ff5a;
  --bg-red:   #ff2a2a;
  --win-gray: #cfcfcf;
  --mono: ui-monospace, "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

*{ box-sizing: border-box; }

html, body{
  height: 100%;
  margin: 0;
  font-family: var(--mono);
}

body{
  background: var(--bg-green);
  transition: background 250ms linear;
  overflow: hidden;
}

.stage{
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
}

.window{
  width: min(1200px, 96vw);
  height: min(680px, 90vh);
  background: var(--win-gray);
  border: 3px solid #9a9a9a;
  box-shadow:
    0 0 0 3px #efefef inset,
    0 0 0 6px #7a7a7a inset,
    10px 12px 0 rgba(0,0,0,.18);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.titlebar{
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  background: linear-gradient(90deg, #1f3a93, #6b7bd6);
  color: #fff;
  border-bottom: 2px solid rgba(0,0,0,.25);
}

.title{
  font-weight: 700;
  letter-spacing: .6px;
  font-size: 16px;
}

.win-controls{
  display: flex;
  gap: 8px;
}

.btnwin{
  width: 28px;
  height: 22px;
  display: grid;
  place-items: center;
  background: #dcdcdc;
  color: #111;
  border: 2px solid #f3f3f3;
  box-shadow: 0 0 0 2px #8c8c8c inset;
  font-weight: 800;
  line-height: 1;
}

.content{
  position: relative;
  height: calc(100% - 44px);
  padding: 26px 28px 22px;
}

.top-row{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.headline{
  margin: 0;
  font-size: clamp(28px, 3.2vw, 52px);
  font-weight: 500;
  color: #000;
}

.center-area{
  height: calc(100% - 70px);
  display: grid;
  grid-template-rows: 1fr auto auto;
  align-items: center;
  justify-items: center;
  position: relative;
}

.big-words{
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.word{
  position: absolute;
  font-size: clamp(22px, 2.4vw, 44px);
  letter-spacing: 1px;
  color: #000;
  opacity: .9;
}
.w1{ top: 18%; left: 18%; }
.w2{ top: 58%; left: 63%; transform: translateX(-50%); }
.w3{ top: 68%; left: 64%; transform: translateX(-50%); }

.timer-wrap{
  display: grid;
  justify-items: center;
  gap: 8px;
}

.timer-label{
  font-size: 14px;
  letter-spacing: 2px;
  opacity: .85;
  color: #000;
}

.timer{
  font-size: clamp(74px, 8vw, 140px);
  font-weight: 900;
  color: #d00000;
  background: #000;
  padding: 10px 18px;
  border-radius: 6px;
  border: 3px solid #333;
  box-shadow: 0 0 0 3px #111 inset;
  letter-spacing: 4px;
}

.sale{
  position: absolute;
  right: 20px;
  bottom: 70px;
  font-size: clamp(58px, 7vw, 135px);
  color: #000;
  opacity: .92;
}

.buttons{
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: center;
  justify-items: center;
  margin-top: 18px;
  padding: 0 40px;
  min-height: 90px;
}

.btn{
  width: min(420px, 42vw);
  height: 70px;
  font-family: var(--mono);
  font-size: 28px;
  border-radius: 14px;
  cursor: pointer;
  user-select: none;
  position: relative;
}

.accept{
  background: #18c45a;
  border: 4px solid #0e9f45;
  color: #041b0c;
  text-transform: uppercase;
  box-shadow:
    0 0 18px rgba(24,196,90,.65),
    0 6px 0 rgba(0,0,0,.18);
}

.accept:hover{
  box-shadow:
    0 0 26px rgba(24,196,90,.95),
    0 6px 0 rgba(0,0,0,.18);
}

.leave{
  background: transparent;
  border: 4px solid #d10000;
  color: #111;
  text-transform: uppercase;
  box-shadow: 0 6px 0 rgba(0,0,0,.14);
  position: absolute;
  right: 40px;
  top: 0;
}

.fineprint{
  width: 100%;
  margin: 14px 0 0;
  font-size: 14px;
  opacity: .85;
  text-align: center;
}

/* Overlay */
.overlay{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms ease;
}

.overlay.show{
  opacity: 1;
}

.gotyou{
  z-index: 5;
  font-size: clamp(24px, 2.6vw, 42px);
  background: #000;
  color: #fff;
  padding: 12px 16px;
  border: 3px solid #fff;
  border-radius: 6px;
  box-shadow: 10px 12px 0 rgba(0,0,0,.25);
}

.coin-layer{
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 4;
}

.coin{
  position: absolute;
  top: -40px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff6b8 0%, #ffd24a 28%, #ffb300 60%, #c98900 100%);
  border: 2px solid rgba(0,0,0,.35);
  box-shadow: 0 6px 0 rgba(0,0,0,.12);
  animation: fall linear forwards;
}

@keyframes fall{
  to{
    transform: translateY(900px) rotate(540deg);
    opacity: 0.95;
  }
}

body.panic .timer{
  color: #ff3b3b;
  box-shadow: 0 0 0 3px #111 inset, 0 0 22px rgba(255,0,0,.45);
}

@keyframes tremble {
  0%   { transform: translate(0, 0); }
  10%  { transform: translate(-1px, 1px); }
  20%  { transform: translate(-2px, -1px); }
  30%  { transform: translate(2px, 1px); }
  40%  { transform: translate(1px, -2px); }
  50%  { transform: translate(-1px, 2px); }
  60%  { transform: translate(-2px, 1px); }
  70%  { transform: translate(2px, -1px); }
  80%  { transform: translate(1px, 2px); }
  90%  { transform: translate(-1px, -2px); }
  100% { transform: translate(0, 0); }
}

.window.tremble{
  animation: tremble 0.12s infinite;
  transform-origin: center;
}
