@font-face {
  font-family: "Segment7";
  src: url("../assets/fonts/G7_Segment_7a.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "InstrumentSans";
  src: url("../assets/fonts/InstrumentSans-Variable.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "InstrumentSansCondensed";
  src: url("../assets/fonts/InstrumentSans_Condensed-SemiBold-BF645daa1014d39.ttf")
    format("truetype");
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

.viewport {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.app {
  position: relative;
  width: 1080px;
  height: 1920px;
  flex-shrink: 0;
  transform-origin: center center;
  overflow: hidden;
  background: #000;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
}

.screen.active {
  display: block;
}

.bg,
.popup-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.img-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: block;
  position: absolute;
  z-index: 5;
  touch-action: manipulation;
}

.img-btn:disabled {
  pointer-events: none;
  cursor: default;
}

.img-btn img {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ===== START SCREEN ===== */
.btn-start {
  left: 119px;
  top: 1580px;
  width: 842px;
  height: 253px;
  z-index: 6;
}

/* ===== GAME SCREEN ===== */
.watch-timer {
  position: absolute;
  left: 50%;
  top: 927px;
  transform: translate(-50%, -50%);
  width: 380px;
  text-align: center;
  font-family: "Segment7", monospace;
  font-size: 118px;
  line-height: 1;
  color: #1a2454;
  letter-spacing: 0.02em;
  z-index: 4;
  pointer-events: none;
}

.btn-tap {
  left: 392px;
  top: 1040px;
  width: 295px;
  height: 298px;
  z-index: 6;
}

.btn-tap[hidden] {
  display: none;
}

.stopped-result {
  position: absolute;
  left: 580px;
  top: 1688px;
  width: 420px;
  text-align: center;
  z-index: 4;
  pointer-events: none;
}

.stopped-result[hidden] {
  display: none;
}

.stopped-label {
  position: absolute;
  left: 580px;
  top: 1634px;
  width: 420px;
  padding-left: 5px;
  text-align: center;
  font-family: "InstrumentSansCondensed", sans-serif;
  font-size: 43px;
  font-weight: 600;
  line-height: 1;
  color: #ffffff;
  letter-spacing: 0.08em;
}

.stopped-time {
  padding-left: 5px;
  font-family: "InstrumentSansCondensed", sans-serif;
  font-weight: 600;
  font-size: 54px;
  line-height: 1;
  color: #fbc11f;
}

.popup-layer {
  position: absolute;
  inset: 0;
  z-index: 20;
}

.popup-layer.hidden {
  display: none;
}

.btn-close {
  left: 876px;
  top: 393px;
  width: 125px;
  height: 125px;
  z-index: 25;
}

.game-ui.is-locked .btn-tap {
  pointer-events: none;
}

/* ===== SCORE SCREEN ===== */
.score-timer {
  top: 927px;
  color: #1a2454;
}

.score-label-wrap {
  position: absolute;
  left: 120px;
  top: 1280px;
  width: 840px;
  height: 227px;
  z-index: 5;
}

.score-label-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.score-message {
  position: absolute;
  top: 46px;
  left: 0;
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 48px;
  text-align: center;
  font-family: "InstrumentSans", sans-serif;
  font-weight: 700;
  font-size: 42px;
  line-height: 1.15;
  color: #ffffff;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  pointer-events: none;
}

.score-final-time {
  position: absolute;
  left: 50%;
  top: 128px;
  transform: translateX(-50%);
  width: 420px;
  text-align: center;
  font-family: "InstrumentSansCondensed", sans-serif;
  font-weight: 600;
  font-size: 58px;
  line-height: 1;
  color: #fbc11f;
  z-index: 5;
  pointer-events: none;
}

.score-gift {
  position: absolute;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%);
  width: 293px;
  height: auto;
  z-index: 5;
  pointer-events: none;
}

/* ===== FINAL SCREEN ===== */
.btn-home {
  left: 308px;
  top: 1580px;
  width: 463px;
  height: 168px;
  z-index: 6;
}

/* ===== INPUT LOCK (5s after stop) ===== */
.input-lock {
  position: absolute;
  inset: 0;
  z-index: 100;
  background: transparent;
}

.input-lock[hidden] {
  display: none;
}
