/* ====== GLOBAL STYLING ====== */
body {
  margin: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  font-family: 'Inter', 'Poppins', sans-serif;
  background: linear-gradient(135deg, #2b1055, #7597de);
  color: white;
}

/* ====== BACKGROUND ANIMATION ====== */
.bg-animation {
  position: absolute;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.07), transparent 70%),
              linear-gradient(135deg, #667eea, #764ba2, #6a11cb);
  filter: blur(80px);
  animation: move-bg 15s infinite alternate ease-in-out;
  z-index: 0;
}

@keyframes move-bg {
  from { transform: translate(-10%, -10%) scale(1.2); }
  to { transform: translate(10%, 10%) scale(1.2); }
}

/* ====== CONTAINERS ====== */
.container {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  backdrop-filter: blur(15px);
  padding: 2.5rem 3.5rem;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  width: 90%;
  max-width: 420px;
  animation: fadeUp 0.8s ease forwards;
  opacity: 0;
  transform: translateY(30px);
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ====== TEXT ====== */
h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: linear-gradient(90deg, #a29bfe, #74b9ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

p {
  font-size: 1.1rem;
  color: #fefefe;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* ====== BUTTON ====== */
button {
  background: linear-gradient(135deg, #6c5ce7, #0984e3);
  color: white;
  border: none;
  padding: 0.9rem 2.5rem;
  border-radius: 50px;
  cursor: pointer;
  font-size: 1rem;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

button:hover {
  transform: scale(1.07);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  background: linear-gradient(135deg, #00cec9, #6c5ce7);
}

/* ====== COUNTDOWN ====== */
#timer-container {
  margin-top: 2rem;
  text-align: center;
}

.hidden {
  display: none;
}

/* Circular countdown */
.circle {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 1rem;
}

.circle svg {
  width: 120px;
  height: 120px;
  transform: rotate(-90deg);
}

.circle circle {
  fill: none;
  stroke: rgba(255,255,255,0.15);
  stroke-width: 8;
}

.circle #progress {
  stroke: #00cec9;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}

#time-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 1.6rem;
  font-weight: 700;
}

#countdown-msg {
  color: #dfe6e9;
  font-size: 1rem;
}

/* ====== ERROR PAGE ====== */
#error-container {
  opacity: 0;
  animation: fadeIn 1.2s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

#error-container h1 {
  font-size: 1.8rem;
  color: #ff7675;
  text-shadow: 0 0 8px rgba(255, 118, 117, 0.6);
}

#error-container p {
  color: #ffeaa7;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}
