@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Share+Tech+Mono&display=swap');

:root {
  --void: #00000f;
  --deep: #020212;
  --nebula-blue: #0d1b4b;
  --core: #00d4ff;
  --core-glow: rgba(0,212,255,0.3);
  --gold: #ffd700;
  --gold-dim: rgba(255,215,0,0.15);
  --star: rgba(255,255,255,0.85);
  --ring: rgba(0,212,255,0.12);
  --ring-bright: rgba(0,212,255,0.35);
  --text-main: #e8f4ff;
  --text-dim: rgba(180,210,240,0.55);
}

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

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--void);
  font-family: 'Share Tech Mono', monospace;
  color: var(--text-main);
}

/* ─── Starfield canvas ─── */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ─── Scene ─── */
.scene {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 20px;
  padding: 30px 20px;
}

/* ─── Orbit rings ─── */
.orbit-ring {
  position: fixed;
  border-radius: 50%;
  border: 1px solid var(--ring);
  pointer-events: none;
  animation: rotate linear infinite;
}
.orbit-ring::after {
  content: '';
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--core);
  box-shadow: 0 0 12px var(--core), 0 0 24px var(--core-glow);
  top: -4px; left: 50%;
  transform: translateX(-50%);
}
.ring-1 { width: 500px; height: 500px; top: 50%; left: 50%; translate: -50% -50%; animation-duration: 18s; border-color: var(--ring-bright); }
.ring-2 { width: 700px; height: 700px; top: 50%; left: 50%; translate: -50% -50%; animation-duration: 30s; animation-direction: reverse; }
.ring-3 { width: 900px; height: 900px; top: 50%; left: 50%; translate: -50% -50%; animation-duration: 50s; }

@keyframes rotate {
  from { transform: translateX(-50%) translateY(-50%) rotate(0deg); }
  to   { transform: translateX(-50%) translateY(-50%) rotate(360deg); }
}

/* ─── Header ─── */
.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.label {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(11px, 2vw, 14px);
  font-weight: 700;
  letter-spacing: 0.5em;
  color: var(--core);
  text-shadow: 0 0 20px var(--core-glow);
}
.subtitle {
  font-size: clamp(9px, 1.5vw, 11px);
  letter-spacing: 0.25em;
  color: var(--text-dim);
}

/* ─── Clock canvas wrap ─── */
.clock-wrap {
  position: relative;
  width: clamp(220px, 40vw, 320px);
  height: clamp(220px, 40vw, 320px);
  display: flex;
  align-items: center;
  justify-content: center;
}
#clockCanvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
}

/* ─── Center core ─── */
.center-core {
  position: relative;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  pointer-events: none;
}
.core-pulse {
  position: absolute;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--core-glow) 0%, transparent 70%);
  animation: pulse 2s ease-in-out infinite;
}
.core-inner {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--core);
  box-shadow: 0 0 10px var(--core), 0 0 30px var(--core-glow), 0 0 60px var(--core-glow);
  animation: pulse 2s ease-in-out infinite alternate;
}
@keyframes pulse {
  0%   { transform: scale(1);   opacity: 1; }
  50%  { transform: scale(1.3); opacity: 0.7; }
  100% { transform: scale(1);   opacity: 1; }
}

/* ─── Digital display ─── */
.digital-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.time-block {
  display: flex;
  align-items: center;
  gap: 4px;
}
.digit {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(28px, 7vw, 52px);
  font-weight: 900;
  color: var(--text-main);
  text-shadow:
    0 0 20px var(--core-glow),
    0 0 40px rgba(0,212,255,0.15);
  min-width: 2ch;
  text-align: center;
  transition: color 0.1s;
}
.colon {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(24px, 6vw, 44px);
  font-weight: 900;
  color: var(--core);
  animation: blink 1s step-end infinite;
  text-shadow: 0 0 15px var(--core-glow);
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.15; }
}
.date-line {
  font-size: clamp(10px, 1.8vw, 12px);
  letter-spacing: 0.3em;
  color: var(--text-dim);
}

/* ─── Stats bar ─── */
.stats {
  display: flex;
  gap: clamp(20px, 5vw, 50px);
  border-top: 1px solid var(--ring-bright);
  padding-top: 16px;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.stat-val {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(13px, 2.5vw, 18px);
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 15px rgba(255,215,0,0.4);
}
.stat-lbl {
  font-size: clamp(7px, 1.2vw, 9px);
  letter-spacing: 0.3em;
  color: var(--text-dim);
}
