/* ============================================
   ORBIT GAME — Mobile-first 9:16 Responsive
   ============================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --volt: #CCFF00;
  --volt-glow: #E8FF4D;
  --purple: #7B2FFF;
  --cyan: #00F0FF;
  --dark: #0a0a1a;
  --dark-glass: rgba(10, 10, 30, 0.75);
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.7);
  --danger: #FF3355;
  --gold: #FFD700;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --design-w: 1080px;
  --design-h: 1920px;
  --scale: 1;
  --speaker-top: clamp(68px, 6.8vh, 64px);
  --upscale: 1;
}

/* Scale up only on mobile screens larger than 375×667 — base design unchanged */
@media (max-width: 600px) {
  :root {
    /* Average of width + height ratio: 1 at 375×667, scales more on taller/larger phones */
    --upscale: max(1, calc((100vw / 375px + 100dvh / 667px) / 2));
  }

  #screen-intro .intro-content {
    transform: scale(var(--upscale));
    transform-origin: top center;
  }

  .global-logo {
    transform: scale(var(--upscale));
    transform-origin: top left;
  }

  .close-btn {
    transform: scale(var(--upscale));
    transform-origin: top right;
  }

  .global-btn:active {
    transform: scale(calc(var(--upscale) * 0.92));
  }

  .global-btn.music-btn:active {
    transform: scale(0.92);
  }
}

/* Larger phones (e.g. 412×915) — keep speaker slightly smaller than upscaled UI */
@media (max-width: 600px) and (min-width: 400px) and (min-height: 800px) {
  .music-btn {
    transform: scale(0.9);
    transform-origin: top left;
  }

  .global-btn.music-btn:active {
    transform: scale(calc(0.9 * 0.92));
  }
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  background: var(--dark);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

/* ---- App Container ---- */
.app {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Background Video ---- */
.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(10, 10, 30, 0.55) 0%,
      rgba(10, 10, 30, 0.35) 40%,
      rgba(10, 10, 30, 0.65) 100%);
  z-index: 1;
  pointer-events: none;
}

/* ---- Screens ---- */
.screen {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: none;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.screen.active {
  display: flex;
}

.screen-content {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 600px;
  padding: 120px 32px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin: auto;
}

/* ---- Global UI ---- */
.global-logo {
  position: absolute;
  top: clamp(16px, 2.4vh, 22px);
  left: clamp(14px, 3.7vw, 22px);
  height: clamp(28px, 6vh, 34px);
  width: auto;
  z-index: 100;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.global-btn {
  position: absolute;
  z-index: 100;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.15s, opacity 0.15s;
}

.global-btn:active {
  transform: scale(0.92);
}

.close-btn {
  top: clamp(6px, 1.2vh, 10px);
  right: clamp(1px, .1vw, 1px);
  width: clamp(26px, 4vh, 32px);
  height: clamp(26px, 4vh, 32px);
}

.close-icon {
  width: clamp(8px, 1.3vh, 12px);
  height: clamp(8px, 1.3vh, 12px);
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.music-btn {
  top: var(--speaker-top);
  left: clamp(0px, 0vw, 0px);
  width: clamp(24px, 3.6vh, 32px);
  height: clamp(24px, 3.6vh, 32px);
  border-radius: 0px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.music-btn .music-icon {
  width: clamp(14px, 2vh, 16px);
  height: clamp(12px, 2vh, 16px);
  object-fit: contain;
  display: block;
}

.music-btn.muted .music-icon {
  opacity: 0.35;
}

.music-btn.muted::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 4px;
  right: 4px;
  height: 2px;
  background: var(--danger);
  transform: rotate(-45deg);
}

.hidden {
  display: none !important;
}

/* ---- Typography ---- */
.heading-xl {
  font-size: clamp(28px, 7vw, 42px);
  font-weight: 800;
  text-align: center;
  line-height: 1.15;
  text-shadow: 0 2px 20px rgba(123, 47, 255, 0.5);
  letter-spacing: -0.5px;
}

.subheading {
  font-size: clamp(15px, 4vw, 18px);
  color: var(--text-muted);
  text-align: center;
  line-height: 1.4;
}

.disclaimer {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

/* ---- Intro Screen ---- */
#screen-intro {
  overflow: hidden;
  height: 100%;
  max-height: 100dvh;
  justify-content: stretch;
}

.intro-content {
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
  margin: 0 auto;
  padding:
    var(--speaker-top) clamp(14px, 4vw, 20px) clamp(6px, 1vh, 12px);
  max-width: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
}

.intro-hero {
  flex: 0 0 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}

.intro-title {
  width: auto;
  height: clamp(130px, 13vh, 110px);
  max-width: min(90vw, 300px);
  object-fit: contain;
  flex-shrink: 1;
}

.intro-subheading {
  font-size: clamp(11px, 2vh, 14px);
  color: var(--text);
  text-align: center;
  line-height: 1.2;
  flex-shrink: 0;
}

.intro-subheading strong {
  color: var(--volt);
  font-weight: 700;
}

.intro-prizes {
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.intro-prizes img {
  margin-top: clamp(10px, 1.5vh, 10px);
  height: clamp(200px, 20vh, 240px);
  width: auto;
  max-width: min(92vw, 320px);
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(204, 255, 0, 0.12));
}

.intro-bottom {
  width: 80%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.lead-form-card {
  width: 100%;
  padding: 20px 25px;
  border-radius: clamp(14px, 2vh, 18px);
  position: relative;
  overflow: hidden;
}

.lead-form-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: url('assets/images/form_border.png') no-repeat center / 100% 100%;
  pointer-events: none;
}

.lead-form-card>* {
  position: relative;
  z-index: 1;
}

.lead-form-heading {
  font-size: clamp(8px, 1.7vh, 13px);
  color: var(--volt);
  text-align: center;
  margin-bottom: clamp(6px, 1vh, 9px);
  line-height: 1.25;
}

.intro-disclaimer {
  font-size: clamp(8px, 1.4vh, 10px);
  color: rgba(255, 255, 255, 0.55);
  margin-top: 15px;
  line-height: 1.2;
}

#screen-intro .lead-form {
  gap: clamp(5px, 0.9vh, 8px);
}

#screen-intro .form-group {
  gap: 0;
}

#screen-intro .input-field {
  height: clamp(22px, 2.8vh, 40px);
  gap: clamp(8px, 1.5vw, 10px);
  padding: 0 clamp(10px, 2.5vw, 14px);
  border-radius: clamp(8px, 1.2vh, 10px);
}

#screen-intro .input-icon {
  left: clamp(10px, 2.5vw, 14px);
  width: clamp(10px, 1.6vh, 12px);
  height: clamp(16px, 2.6vh, 20px);
}

#screen-intro .lead-form input {
  font-size: clamp(12px, 1.9vh, 14px);
}

#screen-intro .error-msg {
  min-height: 0;
  height: 0;
  overflow: hidden;
  font-size: clamp(9px, 1.4vh, 11px);
  padding: 0;
}

#screen-intro .error-msg:not(:empty) {
  height: auto;
  margin-top: 2px;
  padding-left: 4px;
}

#screen-intro .btn-submit {
  margin-top: 12px;
  align-self: center;
  width: 60%;
  max-width: none;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.2;
  border-radius: 6px;
  letter-spacing: 0;
}

/* ---- Instructions Screen ---- */
#screen-instructions {
  overflow: hidden;
  height: 100%;
  max-height: 100dvh;
  justify-content: stretch;
}

.instructions-content {
  width: 100%;
  max-width: 420px;
  height: 100%;
  max-height: 100dvh;
  margin: 0 auto;
  padding:
    calc(var(--speaker-top) + clamp(8px, 1.5vh, 14px)) clamp(16px, 4.5vw, 24px) clamp(16px, 2.5vh, 28px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 1.8vh, 16px);
  box-sizing: border-box;
  overflow: hidden;
}

.instructions-level {
  width: min(52vw, 280px);
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.instructions-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  line-height: 1.1;
  flex-shrink: 0;
  font-weight: 400;
}

.instructions-heading-line {
  font-size: clamp(26px, 5.2vw, 30px);
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.2px;
}

.instructions-heading-accent {
  font-size: clamp(46px, 13vw, 58px);
  font-weight: 400;
  color: var(--volt);
  letter-spacing: -0.5px;
  text-shadow: 0 0 24px rgba(204, 255, 0, 0.35);
}

.instruction-cards {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: clamp(9px, 1.6vh, 12px);
  flex: .5 .5 auto;
  min-height: 0;
  justify-content: center;
}

.instruction-card {
  position: relative;
  width: 100%;
  aspect-ratio: 882 / 168;
  display: grid;
  grid-template-columns: minmax(62px, 21%) 1fr;
  align-items: center;
  column-gap: clamp(8px, 2vw, 12px);
  padding: 0 clamp(16px, 4vw, 20px) 0 clamp(12px, 3vw, 16px);
  background: url('assets/images/large_frame.png') no-repeat center / 100% 300%;
  flex-shrink: 0;
  box-sizing: border-box;
}

.instruction-card--top {
  background-position: center 0%;
}

.instruction-card--mid {
  background-position: center 50%;
}

.instruction-card--bot {
  background-position: center 100%;
}

.instruction-card-aside {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding-left: clamp(2px, 0.6vw, 4px);
}

.instruction-card-icon {
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.instruction-card-icon--direction {
  width: clamp(32px, 8vw, 42px);
  height: clamp(32px, 8vw, 42px);
}

.instruction-card-icon--stopwatch {
  width: clamp(44px, 11.5vw, 54px);
  height: clamp(44px, 11.5vw, 54px);
}

.instruction-card-icon--target {
  width: clamp(48px, 12.5vw, 58px);
  height: clamp(48px, 12.5vw, 58px);
}

.instruction-card-text {
  min-width: 0;
  margin: 0;
  /* padding-right: clamp(2px, 0.5vw, 6px); */
  font-size: clamp(12px, 3.1vw, 14px);
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.instruction-card-text--single {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.22em;
  white-space: nowrap;
  font-size: clamp(12px, 2.65vw, 12.5px);
}

.instruction-inline-icon {
  display: inline-block;
  object-fit: contain;
  vertical-align: middle;
}

.instruction-inline-shooter {
  width: clamp(18px, 4.8vw, 24px);
  height: clamp(18px, 4.8vw, 24px);
  margin: 0;
  flex-shrink: 0;
  vertical-align: middle;
}

.instruction-timer-pill-icon {
  width: clamp(20px, 5vw, 26px);
  height: clamp(20px, 5vw, 26px);
  flex-shrink: 0;
  object-fit: contain;
}

.instruction-inline-pointer {
  width: clamp(20px, 5.2vw, 26px);
  height: clamp(20px, 5.2vw, 26px);
  margin: 0;
  flex-shrink: 0;
  vertical-align: middle;
}

.instruction-highlight {
  color: var(--volt);
  font-weight: 700;
}

.instruction-timer-pill {
  display: inline-flex;
  align-items: center;
  gap: clamp(3px, 0.7vw, 5px);
  background: #fff;
  color: #000;
  border-radius: 999px;
  padding: clamp(4px, 0.7vh, 6px) clamp(10px, 2.5vw, 14px) clamp(4px, 0.7vh, 6px) clamp(7px, 1.8vw, 10px);
  font-weight: 700;
  font-size: clamp(11px, 2.8vw, 13px);
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
  margin: 0 clamp(4px, 0.9vw, 6px);
}

.instruction-timer-pill img {
  width: clamp(20px, 5vw, 26px);
  height: clamp(20px, 5vw, 26px);
  object-fit: contain;
  flex-shrink: 0;
}

.btn-begin {
  width: 44%;
  max-width: 280px;
  flex-shrink: 0;
  margin-top: -10px;
  padding: clamp(11px, 2vh, 15px) clamp(20px, 5vw, 34px);
  border: none;
  border-radius: 999px;
  background: var(--volt);
  color: #000;
  font-family: var(--font);
  font-size: clamp(14px, 3.6vw, 18px);
  font-weight: 300;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 2px 3px 0 rgba(255, 255, 255, 0.92);
  transition: transform 0.15s, box-shadow 0.15s;
  margin-top: 8px;
}

.btn-begin:active {
  transform: scale(0.97) translate(1px, 1px);
  box-shadow: 2px 2px 0 rgba(255, 255, 255, 0.85);
}

@media (max-width: 600px) {
  #screen-instructions .instructions-content {
    transform: scale(var(--upscale));
    transform-origin: top center;
  }

  .btn-begin:active {
    transform: scale(calc(var(--upscale) * 0.97)) translate(1px, 1px);
  }
}

/* ---- Level 1 Win / Failed Screens (Screen 4) ---- */
#screen-level1win,
#screen-level1failed {
  overflow: hidden;
  height: 100%;
  max-height: 100dvh;
  justify-content: stretch;
}

.level1win-content {
  width: 100%;
  max-width: 420px;
  height: 100%;
  max-height: 100dvh;
  margin: 0 auto;
  padding:
    calc(var(--speaker-top) + clamp(10px, 2.2vh, 20px)) clamp(12px, 3.2vw, 20px) clamp(16px, 3.8vh, 36px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.level1win-badge {
  width: clamp(200px, 20vh, 240px);
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: clamp(6px, 1.2vh, 12px);
}

.level1win-heading {
  width: min(92vw, 700px);
  max-height: 28vh;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: clamp(20px, 2.4vh, 22px);
}

.level1win-score-wrap {
  position: relative;
  width: min(94vw, 440px);
  height: 30vh;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.level1win-score-bg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.level1win-score-overlay {
  position: absolute;
  top: 46%;
  left: 57%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(4px, 0.8vh, 8px);
  pointer-events: none;
}

.level1win-score-label {
  font-size: clamp(12px, 3vw, 15px);
  font-weight: 500;
  color: var(--cyan);
  letter-spacing: 0.02em;
  margin-right: 40px;
  margin-top: 7px;
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.35);
}

.level1win-score-value {
  font-size: clamp(92px, 25vh, 108px);
  font-weight: 800;
  font-style: italic;
  color: var(--volt);
  line-height: 0.92;
  letter-spacing: -0.04em;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.85),
    0 0 24px rgba(204, 255, 0, 0.35);
}

.level1win-play {
  width: 46.1%;
  max-width: 268px;
  flex-shrink: 0;
  margin-top: clamp(18px, 3.5vh, 32px);
  margin-bottom: clamp(12px, 2.5vh, 24px);
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  padding: clamp(11px, 2vh, 15px) clamp(20px, 5vw, 34px);
}

@media (max-width: 600px) {
  .level1win-play:active {
    transform: scale(0.97) translate(1px, 1px);
  }
}

@media (min-width: 690px) and (max-height: 700px) {
  .level1win-content {
    padding-bottom: clamp(10px, 2vh, 20px);
  }

  .level1win-badge {
    width: min(48vw, 390px);
    margin-top: clamp(2px, 0.6vh, 6px);
  }

  .level1win-heading {
    width: min(92vw, 520px);
    max-height: 32vh;
    margin-top: clamp(10px, 1.2vh, 12px);
  }

  .level1win-score-wrap {
    width: min(90vw, 380px);
    height: 30vh;
    margin-top: clamp(6px, 1.2vh, 12px);
  }

  .level1win-score-overlay {
    top: 26%;
    left: 50%;
  }

  .level1win-score-value {
    margin-top: 10px;
    font-size: clamp(100px, 11.5vh, 68px);
  }

  .level1win-play {
    margin-top: clamp(12px, 2.5vh, 22px);
    margin-bottom: clamp(8px, 1.8vh, 16px);
  }
}

/* Level 1 Failed screen layout tweaks */
#screen-level1failed .level1win-badge {
  width: clamp(250px, 24vh, 280px);
  margin-top: clamp(18px, 3.5vh, 32px);
}

#screen-level1failed .level1win-heading {
  margin-top: clamp(55px, 4.5vh, 44px);
}

#screen-level1failed .level1win-score-wrap {
  margin-top: clamp(24px, 5vh, 48px);
}

#screen-level1failed .level1win-play {
  margin-top: auto;
  margin-bottom: clamp(20px, 4vh, 40px);
}

@media (min-width: 690px) and (max-height: 700px) {
  #screen-level1failed .level1win-badge {
    width: min(52vw, 430px);
    margin-top: clamp(12px, 2vh, 20px);
  }

  #screen-level1failed .level1win-heading {
    margin-top: clamp(18px, 2.5vh, 28px);
  }

  #screen-level1failed .level1win-score-wrap {
    margin-top: clamp(18px, 3.5vh, 32px);
  }

  #screen-level1failed .level1win-play {
    margin-top: auto;
    margin-bottom: clamp(16px, 3vh, 28px);
  }
}

/* ---- Form ---- */
.lead-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.input-field {
  display: flex;
  margin-top: clamp(12px, 0.7vh, 8px);
  align-items: center;
  gap: 12px;
  cursor: text;
  position: relative;
  overflow: visible;
  border: 0;
  background: transparent;
  transition: box-shadow 0.2s;
}

.input-field::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: url('assets/images/input_border.png') no-repeat center / 100% 100%;
  pointer-events: none;
}

.input-field>* {
  position: relative;
  z-index: 1;
}

.input-field:focus-within {
  box-shadow: 0 0 12px rgba(204, 255, 0, 0.15);
}

.input-field.error {
  box-shadow: 0 0 12px rgba(255, 77, 77, 0.35);
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex-shrink: 0;
  z-index: 2;
}

.lead-form input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  text-align: center;
  outline: none;
}

.lead-form input::placeholder {
  color: #ffffff;
  text-align: center;
  opacity: 1;
  font-size: clamp(10px, 1.2vh, 12px);
}

.lead-form input::-webkit-input-placeholder {
  color: #ffffff;
  text-align: center;
}

.lead-form input::-moz-placeholder {
  color: #ffffff;
  text-align: center;
  opacity: 1;
}

.lead-form input:-ms-input-placeholder {
  color: #ffffff;
  text-align: center;
}

.error-msg {
  font-size: 12px;
  color: var(--danger);
  min-height: 16px;
  padding-left: 4px;
}

.btn-submit {
  margin-top: 4px;
  align-self: center;
  width: 60%;
  max-width: none;
  padding: 6px 10px;
  background: var(--volt);
  color: #000;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: 0;
  box-shadow: none;
}

.btn-submit:active {
  background: var(--volt-glow);
}

.btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

#screen-intro #error-form {
  text-align: center;
  width: 100%;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 40px;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: transform 0.15s;
  width: 100%;
  max-width: 320px;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple), #9B5FFF);
  color: var(--text);
  box-shadow: 0 4px 24px rgba(123, 47, 255, 0.4);
}

.btn-glow {
  animation: btnPulse 2s ease-in-out infinite;
}

@keyframes btnPulse {

  0%,
  100% {
    box-shadow: 0 4px 24px rgba(123, 47, 255, 0.4);
  }

  50% {
    box-shadow: 0 4px 40px rgba(123, 47, 255, 0.7), 0 0 60px rgba(0, 240, 255, 0.2);
  }
}

/* ---- Popups ---- */
.popup-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 40px;
  background: rgba(0, 0, 0, 0.45);
}

.popup-card {
  background: var(--dark-glass);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 32px 28px;
  width: 100%;
  max-width: 420px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  opacity: 0;
  transform: scale(0.85);
}

.level-badge {
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  padding: 6px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
}

.popup-title {
  font-size: clamp(20px, 5vw, 26px);
  font-weight: 800;
  text-align: center;
  line-height: 1.2;
}

.popup-sub {
  font-size: 15px;
  color: var(--text-muted);
  text-align: center;
}

.instruction-list {
  list-style: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.instruction-list li {
  font-size: 14px;
  color: var(--text-muted);
  padding-left: 20px;
  position: relative;
  line-height: 1.4;
}

.instruction-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--cyan);
}

.instruction-list strong {
  color: var(--volt);
}

.win-title {
  color: var(--volt);
  text-shadow: 0 0 30px rgba(204, 255, 0, 0.4);
}

/* ---- Score Display ---- */
.score-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 32px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  width: 100%;
}

.score-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.score-value {
  font-size: 36px;
  font-weight: 800;
  color: var(--volt);
  text-shadow: 0 0 20px rgba(204, 255, 0, 0.3);
}

/* ---- Game Screen ---- */
.game-screen {
  justify-content: flex-start;
  overflow: hidden;
  touch-action: none;
}

/* ---- Level 1 & 2 Playing Screen HUD ---- */
#screen-level1 .game-hud,
#screen-level2 .game-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 15;
  pointer-events: none;
}

#screen-level1 .game-hud-top,
#screen-level2 .game-hud-top {
  width: 100%;
  height: auto;
  display: block;
}

#screen-level1 .game-hud-panel,
#screen-level2 .game-hud-panel {
  position: absolute;
  top: clamp(0px, 0vh, 0px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(4px, 0.7vh, 7px);
  width: clamp(60px, 15vw, 90px);
}

#screen-level1 .game-hud-timer,
#screen-level2 .game-hud-timer {
  position: relative;
  width: clamp(48px, 12vw, 60px);
  height: clamp(48px, 12vw, 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#screen-level1 .game-timer-img,
#screen-level2 .game-timer-img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  display: block;
}

#screen-level1 .game-timer-value,
#screen-level2 .game-timer-value {
  position: absolute;
  top: 57%;
  left: 50%;
  transform: translate(-50%, -42%);
  font-size: clamp(14px, 4.2vw, 18px);
  font-weight: 800;
  color: var(--volt);
  line-height: 1;
  letter-spacing: -0.02em;
  min-width: 1.5em;
  text-align: center;
}

#screen-level1 .game-timer-value::before,
#screen-level2 .game-timer-value::before {
  content: '';
  position: absolute;
  width: 1.1em;
  height: 1.1em;
  left: 50%;
  top: 60%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: -1;
}

#screen-level1 .game-hud-divider,
#screen-level2 .game-hud-divider {
  width: 70%;
  height: 1px;
  background: rgba(255, 255, 255, 0.55);
  flex-shrink: 0;
}

#screen-level1 .game-hud-score,
#screen-level2 .game-hud-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 1vw, 6px);
  flex-shrink: 0;
}

#screen-level1 .game-score-icon,
#screen-level2 .game-score-icon {
  width: clamp(21px, 4.6vw, 26px);
  height: clamp(21px, 4.6vw, 26px);
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.6));
}

#screen-level1 .game-score-text,
#screen-level2 .game-score-text {
  font-size: clamp(15px, 3.6vw, 19px);
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 0.02em;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.35);
}

#screen-level1 .game-progress-wrap,
#screen-level2 .game-progress-wrap {
  position: absolute;
  bottom: clamp(18px, 3.5vh, 28px);
  left: clamp(16px, 4vw, 24px);
  right: clamp(16px, 4vw, 24px);
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.2vh, 10px);
  pointer-events: none;
}

#screen-level1 .game-progress-header,
#screen-level2 .game-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#screen-level1 .game-progress-label,
#screen-level2 .game-progress-label {
  font-size: clamp(13px, 3.2vw, 16px);
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.01em;
}

#screen-level1 .game-progress-header .progress-label,
#screen-level2 .game-progress-header .progress-label {
  position: static;
  display: block;
  font-size: clamp(13px, 3.2vw, 16px);
  font-weight: 700;
  color: var(--volt);
  text-shadow: 0 0 10px rgba(204, 255, 0, 0.35);
  mix-blend-mode: normal;
}

#screen-level1 .game-progress-bar,
#screen-level2 .game-progress-bar {
  position: relative;
  height: clamp(5px, 1vh, 7px);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 2px;
  overflow: hidden;
}

#screen-level1 .game-progress-bar .progress-fill,
#screen-level2 .game-progress-bar .progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #99CC00, var(--volt));
  border-radius: 2px;
  box-shadow: none;
  animation: none;
  transition: width 0.1s linear;
}

@media (max-width: 600px) {

  #screen-level1 .game-hud-panel,
  #screen-level2 .game-hud-panel {
    transform: translateX(-50%) scale(var(--upscale));
    transform-origin: top center;
  }
}

.game-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  touch-action: none;
}

.hud {
  position: absolute;
  top: 80px;
  left: 0;
  right: 0;
  z-index: 15;
  display: flex;
  justify-content: space-between;
  padding: 0 24px;
  pointer-events: none;
}

.hud-timer,
.hud-score {
  background: var(--dark-glass);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px 16px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 72px;
}

.hud-label {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1.5px;
}

.hud-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--cyan);
}

/* ---- Progress Bar ---- */
.progress-bar-wrap {
  position: absolute;
  bottom: 32px;
  left: 24px;
  right: 24px;
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.progress-title {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
}

.progress-bar {
  position: relative;
  height: 28px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(204, 255, 0, 0.2);
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #99CC00, var(--volt), var(--volt-glow));
  border-radius: 14px;
  box-shadow: 0 0 20px rgba(204, 255, 0, 0.5), 0 0 40px rgba(204, 255, 0, 0.2);
  transition: width 0.1s linear;
  animation: progressGlow 1.5s ease-in-out infinite;
}

@keyframes progressGlow {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(204, 255, 0, 0.5);
  }

  50% {
    box-shadow: 0 0 30px rgba(204, 255, 0, 0.8), 0 0 60px rgba(204, 255, 0, 0.3);
  }
}

.progress-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
  mix-blend-mode: difference;
  text-shadow: none;
}

/* ---- Confetti ---- */
.confetti-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 25;
  pointer-events: none;
}

/* ---- Victory (Screen 7) ---- */
#screen-victory {
  overflow: hidden;
  height: 100%;
  max-height: 100dvh;
  justify-content: stretch;
}

.victory-content {
  width: 100%;
  max-width: 420px;
  height: 100%;
  max-height: 100dvh;
  margin: 0 auto;
  padding:
    calc(var(--speaker-top) + clamp(2px, 0.6vh, 8px)) clamp(14px, 4vw, 22px) clamp(10px, 1.8vh, 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(2px, 0.6vh, 8px);
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
  z-index: 5;
}

.victory-hero {
  width: min(72vw, 300px);
  height: auto;
  object-fit: contain;
  flex-shrink: 1;
  min-height: 0;
  max-height: clamp(120px, 22vh, 200px);
}

.victory-tagline-wrap {
  position: relative;
  margin-top: 3%;
  margin-bottom: 3%;
  width: 100%;
  max-width: 380px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(36px, 6vh, 52px);
  margin: clamp(-4px, -0.5vh, 0) 0;
}

.victory-tagline-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.victory-tagline {
  position: relative;
  z-index: 1;
  width: 88%;
  margin: 0;
  padding: clamp(6px, 1vh, 10px) 0;
  text-align: center;
  font-size: clamp(9px, 2.4vw, 12px);
  font-weight: 500;
  line-height: 1.35;
  color: var(--text);
}

.victory-tagline-accent {
  color: var(--volt);
}

.victory-leaderboard-title {
  flex-shrink: 0;
  font-size: clamp(14px, 3.4vw, 17px);
  font-weight: 300;
  text-align: center;
  color: var(--text);
  letter-spacing: 0.02em;
  margin: clamp(0px, 0.2vh, 4px) 0 0;
}

.victory-leaderboard-wrap {
  position: relative;
  width: min(92%, 360px);
  margin: 3% auto 0;
  min-height: 0;
}

.victory-leaderboard-bg {
  width: 100%;
  height: auto;
  max-height: clamp(200px, 34vh, 300px);
  display: block;
}

.victory-leaderboard-rows {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.victory-lb-row {
  position: absolute;
  left: 6%;
  right: 6.5%;
  height: 10.5%;
  display: grid;
  grid-template-columns: 27.6% 46.5% 25.9%;
  align-items: center;
  justify-items: stretch;
  min-height: 0;
  overflow: hidden;
  line-height: 1;
  font-size: clamp(8px, 2.2vw, 11px);
  font-weight: 700;
  font-style: italic;
  color: var(--text);
  letter-spacing: 0.01em;
}

.victory-lb-row:nth-child(1) {
  top: 15%;
}

.victory-lb-row:nth-child(2) {
  top: 27%;
}

.victory-lb-row:nth-child(3) {
  top: 40%;
}

.victory-lb-row:nth-child(4) {
  top: 52%;
}

.victory-lb-row:nth-child(5) {
  top: 64%;
}

.victory-lb-row:nth-child(6) {
  top: 79%;
}

.victory-lb-row .lb-rank,
.victory-lb-row .lb-name,
.victory-lb-row .lb-score {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 0;
  height: 100%;
  padding: 0 5%;
  box-sizing: border-box;
}

.victory-lb-row .lb-rank {
  padding-left: 8%;
  padding-right: 2%;
}

.victory-lb-row .lb-score {
  padding-left: 2%;
  padding-right: 8%;
}

.victory-lb-row .lb-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 3%;
}

.victory-lb-row.player-row {
  color: var(--volt);
}

.victory-lb-row.player-row .lb-rank {
  font-size: clamp(9px, 2.35vw, 12px);
}

.victory-lb-row.empty-row {
  opacity: 0.25;
}

.victory-disclaimer {
  flex-shrink: 0;
  font-size: clamp(8px, 2.1vw, 10px);
  color: var(--text-muted);
  text-align: center;
  margin-top: 4%;
}

.victory-play-again {
  width: 48%;
  max-width: 280px;
  flex-shrink: 0;
  margin-top: clamp(25px, 0.5vh, 6px);
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  padding: clamp(10px, 1.8vh, 14px) clamp(20px, 5vw, 34px);
}

@media (max-height: 700px) {
  .victory-hero {
    max-height: clamp(100px, 18vh, 160px);
  }

  .victory-leaderboard-wrap {
    width: min(94%, 320px);
  }

  .victory-leaderboard-bg {
    max-height: clamp(160px, 30vh, 240px);
  }

  .victory-lb-row {
    font-size: clamp(7px, 2vw, 10px);
  }

  .victory-lb-row.player-row .lb-rank {
    font-size: clamp(8px, 2.15vw, 11px);
  }

  .victory-content {
    gap: clamp(1px, 0.3vh, 4px);
  }
}

/* ---- Level 2 intro overlay hidden state ---- */
#screen-level2 #l2-intro-overlay {
  align-items: flex-start;
  justify-content: center;
  padding: calc(var(--speaker-top) + clamp(4px, 0.8vh, 10px)) clamp(16px, 4.5vw, 24px) clamp(18px, 3vh, 28px);
  background: transparent;
}

#l2-intro-overlay.hidden {
  display: none;
}

#l2-intro-popup.l2-intro-content {
  width: 100%;
  max-width: 420px;
  height: 100%;
  max-height: calc(100dvh - var(--speaker-top));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1.3vh, 14px);
  opacity: 0;
  transform: scale(0.85);
}

.l2-level {
  width: min(52vw, 300px);
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: 20px;
}

.l2-heading {
  width: min(62vw, 520px);
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.l2-instruction-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(5px, 0.85vh, 9px);
  flex: 1 1 auto;
  min-height: 0;
}

.l2-instruction-card {
  width: min(88%, 368px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(14px, 3.6vw, 18px);
  background-repeat: no-repeat;
  background-position: center;
  box-sizing: border-box;
}

.l2-instruction-card--large {
  aspect-ratio: 882 / 168;
  background-image: url('assets/images/large_frame.png');
  background-size: 100% 300%;
}

.l2-instruction-card--large-top {
  background-position: center 0%;
  word-spacing: 20px;
  letter-spacing: 2px;
}

.l2-instruction-card--large-top .l2-instruction-text {
  column-gap: 0.24em;
  row-gap: 0.24em;
  line-height: 1.28;
}

.l2-instruction-card--large-mid {
  background-position: center 50%;
  word-spacing: 20px;
  letter-spacing: 2px;
}

.l2-instruction-card--large-bot {
  background-position: center 100%;
  word-spacing: 10px;
}

.l2-instruction-card--small {
  width: 78%;
  aspect-ratio: 832 / 167;
  background-image: url('assets/images/frame_small.png');
  background-size: 100% 200%;
}

.l2-instruction-card--small-top {
  background-position: center 0%;
  overflow: hidden;
}

.l2-instruction-card--small-top .l2-instruction-text {
  max-width: 90%;
  padding: clamp(3px, 0.6vh, 6px) 0;
  column-gap: 0.24em;
  row-gap: 0.24em;
  line-height: 1.28;
}

.l2-instruction-card--small-top .l2-inline-icon--bonus {
  height: clamp(24px, 6vw, 32px);
}

.l2-instruction-card--small-bot {
  background-position: center 100%;
}

.l2-instruction-text {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  column-gap: 0.24em;
  row-gap: 0.16em;
  text-align: center;
  color: #fff;
  font-size: clamp(13px, 3.6vw, 17px);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.015em;
}

.l2-instruction-text--wrap {
  max-width: 98%;
}

.l2-inline-icon {
  display: inline-block;
  object-fit: contain;
  flex-shrink: 0;
  vertical-align: middle;
}

.l2-inline-icon--ship {
  width: clamp(20px, 5.6vw, 28px);
  height: clamp(20px, 5.6vw, 28px);
  margin-right: 8px;
  margin-left: 10px;
}

.l2-inline-icon--ufo,
.l2-inline-icon--pointer {
  width: clamp(26px, 6.6vw, 34px);
  height: clamp(26px, 6.6vw, 34px);
  margin-right: 8px;
  margin-left: 8px;
}

.l2-inline-icon--bonus {
  height: clamp(42px, 10.5vw, 52px);
  width: auto;
  aspect-ratio: 397 / 1035;
  margin-right: 9px;
  margin-left: 10px;
}

.l2-inline-icon--obstacle {
  width: clamp(38px, 12vw, 70px);
  height: auto;
  aspect-ratio: 884 / 616;
  margin-left: clamp(2px, 0.6vw, 6px);
}

.l2-inline-icon--scrapper {
  height: clamp(16px, 4.2vw, 22px);
  width: auto;
  max-width: min(130px, 40vw);
  object-fit: contain;
  flex-shrink: 1;
  min-width: 0;
  margin: 0 0.12em;
}

.l2-timer-pill {
  margin: 0 clamp(2px, 0.6vw, 4px);
  padding: clamp(3px, 0.5vh, 5px) clamp(7px, 1.8vw, 10px) clamp(3px, 0.5vh, 5px) clamp(5px, 1.4vw, 8px);
  font-size: clamp(9px, 2.2vw, 11px);
}

.l2-timer-pill .instruction-timer-pill-icon,
.l2-timer-pill img {
  width: clamp(15px, 3.8vw, 20px);
  height: clamp(15px, 3.8vw, 20px);
}

.l2-btn-begin {
  width: min(44vw, 260px);
  margin-top: clamp(2px, 0.6vh, 8px);
  font-weight: 700;
  letter-spacing: 0.02em;
}

#l2-game-hud.hidden,
#l2-progress-wrap.hidden,
#canvas-l2.hidden-canvas {
  visibility: hidden;
  pointer-events: none;
}

/* ---- Responsive ---- */
@media (min-width: 600px) {
  .screen-content {
    max-width: 480px;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  .screen-content {
    padding-top: 80px;
    gap: 12px;
  }

  .intro-content {
    padding-top: clamp(44px, 10vh, 52px);
    gap: 0;
  }

  .instructions-content {
    padding-top: clamp(44px, 10vh, 52px);
    gap: 8px;
  }

  .instructions-level {
    width: min(50vw, 220px);
  }

  .instruction-cards {
    gap: 6px;
  }

  .instruction-card {
    aspect-ratio: 882 / 168;
    grid-template-columns: minmax(48px, 18%) 1fr;
    padding: 0 12px 0 10px;
  }

  .instruction-card-icon--direction,
  .instruction-card-icon--stopwatch {
    width: 36px;
    height: 36px;
  }

  .instruction-card-icon--target {
    width: 40px;
    height: 40px;
  }

  .instruction-card-text {
    font-size: 11px;
  }

  .intro-title {
    height: clamp(48px, 22vh, 72px);
  }

  .intro-prizes img {
    height: clamp(56px, 26vh, 90px);
  }

  #screen-intro .input-field {
    height: clamp(28px, 6vh, 34px);
  }

  .heading-xl {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .btn-glow,
  .progress-fill {
    animation: none;
  }
}

/* ============================================
   DESKTOP / LARGE-SCREEN GATE
   ============================================ */
.desktop-gate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  padding: 24px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(123, 47, 255, 0.35) 0%, transparent 55%),
    radial-gradient(120% 90% at 50% 100%, rgba(0, 240, 255, 0.22) 0%, transparent 55%),
    #05050f;
  color: var(--text);
  text-align: center;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
}

.desktop-gate-card {
  max-width: 480px;
  width: 100%;
  padding: 48px 40px;
  border-radius: 28px;
  background: rgba(10, 10, 30, 0.6);
  border: 1px solid rgba(204, 255, 0, 0.25);
  box-shadow: 0 0 60px rgba(123, 47, 255, 0.35), inset 0 0 40px rgba(0, 240, 255, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.desktop-gate-logo {
  height: 44px;
  width: auto;
  margin-bottom: 4px;
}

.desktop-gate-phone {
  position: relative;
  width: 74px;
  height: 132px;
  border-radius: 16px;
  border: 3px solid var(--volt);
  background: linear-gradient(160deg, rgba(204, 255, 0, 0.12), rgba(0, 240, 255, 0.08));
  box-shadow: 0 0 24px rgba(204, 255, 0, 0.4);
  animation: gate-phone-float 2.6s ease-in-out infinite;
}

.desktop-gate-phone-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 5px;
  border-radius: 4px;
  background: var(--volt);
  opacity: 0.7;
}

@keyframes gate-phone-float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-8px) rotate(4deg); }
}

.desktop-gate-title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--volt);
  letter-spacing: 0.5px;
}

.desktop-gate-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 340px;
}

.desktop-gate-qr-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.desktop-gate-qr-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: gate-dot-pulse 1.4s ease-in-out infinite;
}

@keyframes gate-dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Show the gate on non-touch / large screens (desktops, laptops, wide tablets) */
@media (min-width: 768px) and (pointer: fine) {
  .desktop-gate {
    display: flex;
  }

  .app {
    display: none;
  }
}

@media (min-width: 1024px) {
  .desktop-gate {
    display: flex;
  }

  .app {
    display: none;
  }
}