:root {
  /* = 3 × measured alert.m4a duration (3.468s); update if asset changes */
  --trigger-duration: 10.404s;
}

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

html, body {
  width: 100%;
  height: 100%;
}

body {
  background: #0a0a18;
  color: white;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
               Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  overflow: hidden;
}

.hidden {
  display: none;
}

.start-prompt {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 8vw;
  font-weight: 700;
  text-align: center;
  animation: prompt-pulse 1.6s ease-in-out infinite;
}

@keyframes prompt-pulse {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 1; }
}

.countdown {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 30vw;
  font-weight: 900;
  line-height: 1;
}

.character {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity var(--trigger-duration) ease-out,
              transform var(--trigger-duration) ease-out;
}

.character.fade-in {
  opacity: 1;
  transform: scale(1);
}

.character.fade-out {
  opacity: 0;
  transition: opacity 1s ease-in;
}

.activity {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.trigger-active {
  animation: trigger-bg var(--trigger-duration) ease-out forwards;
}

@keyframes trigger-bg {
  0%   { background-color: #0a0a18; }
  50%  { background-color: #1a1a40; }
  100% { background-color: #0a0a18; }
}
