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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #0a0a0a;
  color: #fff;
  overflow-x: hidden;
}

.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Cosmic Background */
.cosmic-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
  z-index: -2;
}

.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-image: radial-gradient(
      2px 2px at 20px 30px,
      #eee,
      rgba(0, 0, 0, 0)
    ),
    radial-gradient(2px 2px at 60px 70px, #fff, rgba(0, 0, 0, 0)),
    radial-gradient(1px 1px at 50px 50px, #fff, rgba(0, 0, 0, 0)),
    radial-gradient(1px 1px at 130px 80px, #fff, rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 90px 10px, #fff, rgba(0, 0, 0, 0));
  background-repeat: repeat;
  background-size: 200px 200px;
  animation: twinkle 5s ease-in-out infinite;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Header */
header {
  text-align: center;
  margin-bottom: 3rem;
  z-index: 1;
}

.title {
  font-size: 3.5rem;
  font-weight: 700;
  background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.5rem;
  color: #ccc;
  letter-spacing: 2px;
}

/* Countdown */
.countdown-wrapper {
  text-align: center;
  z-index: 1;
}

.countdown {
  font-size: 10rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.8),
    0 0 40px rgba(255, 215, 0, 0.6), 0 0 60px rgba(255, 215, 0, 0.4);
  margin-bottom: 1rem;
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.countdown-label {
  font-size: 1.5rem;
  letter-spacing: 3px;
  color: #ffd700;
}

/* Shake Animation */
@keyframes shake {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  10% {
    transform: translate(-10px, -10px) rotate(-2deg);
  }
  20% {
    transform: translate(10px, 10px) rotate(2deg);
  }
  30% {
    transform: translate(-10px, 10px) rotate(-2deg);
  }
  40% {
    transform: translate(10px, -10px) rotate(2deg);
  }
  50% {
    transform: translate(-10px, -10px) rotate(-2deg);
  }
  60% {
    transform: translate(10px, 10px) rotate(2deg);
  }
  70% {
    transform: translate(-10px, 10px) rotate(-2deg);
  }
  80% {
    transform: translate(10px, -10px) rotate(2deg);
  }
  90% {
    transform: translate(-10px, -10px) rotate(-2deg);
  }
}

.shake {
  animation: shake 0.5s ease-in-out;
}

/* Glitch Overlay */
.glitch-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 0, 0, 0.1) 0px,
    rgba(0, 255, 0, 0.1) 2px,
    rgba(0, 0, 255, 0.1) 4px
  );
  z-index: 999;
  pointer-events: none;
  animation: glitch 0.3s infinite;
}

@keyframes glitch {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-5px, 5px);
  }
  40% {
    transform: translate(-5px, -5px);
  }
  60% {
    transform: translate(5px, 5px);
  }
  80% {
    transform: translate(5px, -5px);
  }
  100% {
    transform: translate(0);
  }
}

.hidden {
  display: none !important;
}

/* Timekeeper Message */
.timekeeper-message {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 1s ease-in;
}

.start-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.message-box {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 2px solid #ffd700;
  border-radius: 15px;
  padding: 3rem;
  max-width: 600px;
  text-align: center;
  box-shadow: 0 0 50px rgba(255, 215, 0, 0.3);
  animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.message-box h2 {
  font-size: 2rem;
  color: #ffd700;
  margin-bottom: 1.5rem;
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.message-box p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1rem;
  color: #ddd;
}

.message-box strong {
  color: #ffd700;
}

.btn-primary {
  background: linear-gradient(45deg, #ffd700, #ffed4e);
  color: #000;
  border: none;
  padding: 1rem 2.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  border-radius: 50px;
  cursor: pointer;
  margin-top: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

.btn-primary:active {
  transform: scale(0.98);
}

/* Crowd Silhouette */
.crowd-silhouette {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 150px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  z-index: 0;
}

/* Frozen State */
.frozen {
  animation: none !important;
  color: #4dd0e1 !important;
  text-shadow: 0 0 20px rgba(77, 208, 225, 0.8),
    0 0 40px rgba(77, 208, 225, 0.6), 0 0 60px rgba(77, 208, 225, 0.4) !important;
}

/* Responsive */
@media (max-width: 768px) {
  .title {
    font-size: 2.5rem;
  }

  .countdown {
    font-size: 6rem;
  }

  .message-box {
    padding: 2rem;
    margin: 1rem;
  }
}
