@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400&family=Italiana&family=Manrope:wght@400;500&display=swap');

:root {
  color-scheme: dark;
  font-family: "Manrope", sans-serif;
  background: #11100e;
  color: #f1eee7;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  min-height: 100svh;
  margin: 0;
  display: grid;
  place-items: center;
  overflow-x: hidden;
  background: #08060d;
  isolation: isolate;
}

#arcade-road {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(6, 5, 10, .62), transparent 25%, transparent 75%, rgba(6, 5, 10, .62)),
    linear-gradient(180deg, rgba(5, 4, 9, .08), rgba(5, 4, 9, .2) 43%, rgba(5, 4, 9, .5));
}

.horizon-ships {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.horizon-ship {
  position: absolute;
  display: block;
  height: auto;
  filter: drop-shadow(0 0 7px rgba(68, 220, 255, .42));
  will-change: transform;
}

.ship-monalisa {
  top: calc(43vh - clamp(69px, 8.1vw, 119px));
  left: 0;
  width: clamp(110px, 13vw, 190px);
  animation: ship-left-to-right 52s linear -8s infinite;
}

.ship-colorful {
  top: calc(43vh - clamp(52px, 6.3vw, 91px));
  right: 0;
  width: clamp(100px, 11vw, 165px);
  animation: ship-right-to-left 44s linear -19s infinite;
}

@keyframes ship-left-to-right {
  from { transform: translateX(-220px); }
  to { transform: translateX(calc(100vw + 220px)); }
}

@keyframes ship-right-to-left {
  from { transform: translateX(220px); }
  to { transform: translateX(calc(-100vw - 220px)); }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.countdown {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 48px));
  padding: 8vh 0 10vh;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .7);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 38px;
  color: #a79f91;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.eyebrow span { width: 28px; height: 1px; background: #9f7142; }

h1 {
  margin: 0 0 70px;
  font-family: "Italiana", Georgia, serif;
  font-size: clamp(58px, 8.3vw, 124px);
  font-weight: 400;
  line-height: .82;
  letter-spacing: -.035em;
}

h1 em { color: #aa7d50; font-weight: 400; }

.timer {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) auto repeat(3, minmax(0, 1fr) auto);
  align-items: start;
  padding: 34px 0 31px;
  border-top: 1px solid rgba(241, 238, 231, .24);
  border-bottom: 1px solid rgba(241, 238, 231, .24);
  background: linear-gradient(90deg, rgba(10, 8, 15, .4), rgba(10, 8, 15, .16));
  backdrop-filter: blur(2px);
}

.time-block strong, .separator {
  font-family: "DM Mono", monospace;
  font-size: clamp(36px, 5.7vw, 77px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -.06em;
  font-variant-numeric: tabular-nums;
}

.time-block span {
  display: block;
  margin-top: 15px;
  color: #777166;
  font-size: 10px;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.separator { color: #4f4940; padding: 0 .34em; }

.date-line {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 25px;
  color: #aaa296;
  font-size: 11px;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.date-line .line { flex: 1; height: 1px; background: #25231f; }
.finished { margin: 48px 0 0; color: #aa7d50; font-family: "Italiana", serif; font-size: 42px; }

footer {
  position: fixed;
  z-index: 2;
  right: 24px;
  bottom: 24px;
  color: #555149;
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.game-hud {
  position: fixed;
  z-index: 3;
  left: 24px;
  bottom: 22px;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  pointer-events: none;
  text-shadow: 0 2px 12px #08060d;
}

.game-score span,
.game-hud p {
  color: #777166;
  font-size: 8px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.game-score span { display: block; margin-bottom: 4px; }
.game-score strong {
  color: #f1eee7;
  font-family: "DM Mono", monospace;
  font-size: 20px;
  font-weight: 300;
  letter-spacing: .05em;
}
.game-hud p { margin: 0 0 3px; }
.game-hud kbd {
  color: #aaa296;
  font: inherit;
  border: 1px solid rgba(170, 162, 150, .35);
  border-radius: 2px;
  padding: 2px 4px;
}
.game-hud.is-crashed p { color: #ff6b9f; }

.touch-controls {
  position: fixed;
  z-index: 5;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: none;
  justify-content: space-between;
  pointer-events: none;
}

.touch-controls button {
  width: 58px;
  height: 58px;
  padding: 0;
  border: 1px solid rgba(52, 231, 255, .45);
  border-radius: 50%;
  color: #f1eee7;
  background: rgba(8, 6, 13, .56);
  box-shadow: inset 0 0 16px rgba(52, 231, 255, .08);
  font: 300 25px/1 "DM Mono", monospace;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: auto;
}
.touch-controls button:active,
.touch-controls button.is-pressed { background: rgba(52, 231, 255, .2); }

@media (max-width: 620px) {
  .countdown { width: min(100% - 30px, 500px); padding: 55px 0; }
  h1 { margin-bottom: 52px; line-height: .9; }
  .timer { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; padding: 28px 0; }
  .separator { display: none; }
  .time-block strong { font-size: clamp(29px, 10vw, 52px); }
  .time-block span { font-size: 8px; letter-spacing: .08em; }
  .date-line { align-items: flex-start; font-size: 9px; gap: 10px; }
  footer { display: none; }
  .game-hud { left: 16px; bottom: 86px; }
  .game-hud p { display: none; }
  .game-hud.is-crashed p { display: block; max-width: 190px; line-height: 1.5; }
  .touch-controls { display: flex; }
}

@media (hover: none) and (pointer: coarse) {
  .touch-controls { display: flex; }
  .game-hud { bottom: 86px; }
}

@media (prefers-reduced-motion: no-preference) {
  .countdown { animation: arrive .9s cubic-bezier(.22,.8,.3,1) both; }
  @keyframes arrive { from { opacity: 0; transform: translateY(14px); } }
}

@media (prefers-reduced-motion: reduce) {
  .horizon-ship { animation-play-state: paused; }
}
