:root {
  --bg-color: #0f172a;
  --card-bg: rgba(30, 41, 59, 0.7);
  --card-border: rgba(255, 255, 255, 0.1);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-color: #ef4444;
  --accent-glow: rgba(239, 68, 68, 0.2);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at 50% -20%, #1e1b4b, var(--bg-color) 70%);
  overflow: hidden;
}

/* Background animated elements */
.ambient-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  animation: pulse 8s ease-in-out infinite alternate;
}

@keyframes pulse {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  100% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

main {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 600px;
}

.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 3rem;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: floatUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(30px);
}

@keyframes floatUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.time-container {
  font-size: 1.5rem;
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 2rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

#theTime {
  display: inline-block;
  font-weight: 500;
  color: var(--text-main);
  background: linear-gradient(to right, #f8fafc, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
  min-width: 170px; /* Prevent jitter on second ticks */
  white-space: nowrap;
}

.main-question {
  font-size: 2.75rem;
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 2.5rem;
  color: var(--text-main);
}

.main-question em {
  font-style: italic;
  color: #c7d2fe;
}

.main-question strong {
  color: var(--accent-color);
  position: relative;
  display: inline-block;
}

.main-question strong::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--accent-color);
  border-radius: 2px;
  box-shadow: 0 2px 10px var(--accent-glow);
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.4s ease-out;
}

.glass-card:hover .main-question strong::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.footer-credits {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  border-top: 1px solid var(--card-border);
  padding-top: 1.5rem;
}

.footer-credits a {
  color: #818cf8;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
}

.footer-credits a:hover {
  color: #c7d2fe;
}

/* Responsiveness */
@media (max-width: 600px) {
  .glass-card { padding: 2rem 1.5rem; }
  .main-question { font-size: 2rem; }
  .time-container { font-size: 1.25rem; }
}
