:root {
  --bg: #05060a;
  --cyan: #00f5ff;
  --magenta: #ff2bd6;
  --mint: #3dffb0;
  --ink: #e8fbff;
}

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

html,
body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  position: fixed;
  inset: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  touch-action: none;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 42%, #0b1220 0%, #05060a 62%, #030308 100%);
}

#c {
  display: block;
  width: 100%;
  height: 100%;
  height: 100dvh;
  touch-action: none;
}

#hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 20px 0;
  pointer-events: none;
  text-align: center;
  z-index: 2;
}

#brand {
  font-size: 13px;
  letter-spacing: 0.55em;
  font-weight: 700;
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(0, 245, 255, 0.55);
  opacity: 0.9;
}

#time {
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  color: #f4feff;
  text-shadow:
    0 0 18px rgba(0, 245, 255, 0.45),
    0 0 40px rgba(255, 43, 214, 0.18);
}

#hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  pointer-events: none;
  z-index: 2;
  font-size: 12px;
  letter-spacing: 0.28em;
  font-weight: 600;
  color: rgba(232, 251, 255, 0.55);
  text-shadow: 0 0 10px rgba(61, 255, 176, 0.25);
}

#overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 6, 10, 0.42);
  backdrop-filter: blur(2px);
}

#overlay[hidden] {
  display: none;
}

.overlay-card {
  text-align: center;
  pointer-events: none;
}

#otro {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--magenta);
  text-shadow:
    0 0 18px rgba(255, 43, 214, 0.7),
    0 0 48px rgba(255, 43, 214, 0.35);
  animation: otro-pulse 0.9s ease-in-out infinite;
}

#final-time {
  margin-top: 10px;
  font-variant-numeric: tabular-nums;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--mint);
  text-shadow: 0 0 16px rgba(61, 255, 176, 0.5);
}

@keyframes otro-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.82; }
}
