:root {
  --bg-deep: #050810;
  --bg-mid: #080d1a;
  --blue-glow: #3a8fff;
  --blue-core: #60b4ff;
  --red-glow: #ff3a3a;
  --red-core: #ff6060;
  --silver-light: #d0ddf0;
  --silver-mid: #8899bb;
  --silver-dark: #3a4560;
  --text-primary: #e8f0ff;
  --text-muted: #6a7a9a;
  --clock-face: #0a0f1e;
  --clock-rim-1: #1a2340;
  --clock-rim-2: #0f1628;
  --hand-color: #c8d8f0;
  --second-color: #ff3030;
  --center-dot: #9ab0d0;
  --tick-major: #c0d0e8;
  --tick-minor: #3a4a6a;
  --number-color: #d8e8ff;
}

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

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--bg-deep);
  font-family: "Rajdhani", sans-serif;
  overflow: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(
      ellipse 80% 50% at 20% 60%,
      rgba(58, 143, 255, 0.08) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 60% 40% at 80% 40%,
      rgba(255, 58, 58, 0.06) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse 100% 80% at 50% 50%,
      rgba(8, 13, 26, 1) 30%,
      var(--bg-deep) 100%
    );
  pointer-events: none;
  z-index: 0;
}

.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  animation: twinkle var(--dur, 3s) ease-in-out infinite var(--delay, 0s);
}
@keyframes twinkle {
  0%,
  100% {
    opacity: var(--min-op, 0.1);
    transform: scale(1);
  }
  50% {
    opacity: var(--max-op, 0.7);
    transform: scale(1.3);
  }
}

.nebula {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(60px);
  animation: nebulaDrift 12s ease-in-out infinite alternate;
}

.nebula-blue {
  width: 400px;
  height: 200px;
  background: radial-gradient(
    ellipse,
    rgba(58, 143, 255, 0.12) 0%,
    transparent 70%
  );
  top: 10%;
  left: -5%;
}

.nebula-red {
  width: 350px;
  height: 180px;
  background: radial-gradient(
    ellipse,
    rgba(255, 58, 58, 0.1) 0%,
    transparent 70%
  );
  bottom: 15%;
  right: -5%;
  animation-delay: -6s;
}

@keyframes nebulaDrift {
  from {
    transform: translateX(0) translateY(0);
  }
  to {
    transform: translateX(40px) translateY(20px);
  }
}

/* ─── LAYOUT ─────────────────────────────────────────────── */
.wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  perspective: 1000px;
  perspective-origin: 50% 50%;
}

/* ─── HEADER ─────────────────────────────────────────────── */
.clock-title {
  text-align: center;
}
.clock-title h1 {
  font-family: "Orbitron", monospace;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.12em;
  text-shadow: 0 0 30px rgba(96, 180, 255, 0.4);
}
.clock-title p {
  font-size: clamp(0.75rem, 2vw, 0.9rem);
  color: var(--text-muted);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ─── CLOCK OUTER CONTAINER ──────────────────────────────── */
.clock-scene {
  position: relative;
  width: clamp(280px, 44vw, 480px);
  height: clamp(280px, 44vw, 480px);
  will-change: transform;
}

/* Outer ambient glow rings */
.glow-ring {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  pointer-events: none;
}
.glow-ring-blue {
  background: conic-gradient(
    from 200deg,
    transparent 0deg,
    rgba(58, 143, 255, 0.35) 80deg,
    rgba(96, 180, 255, 0.5) 120deg,
    rgba(58, 143, 255, 0.25) 160deg,
    transparent 220deg
  );
  filter: blur(18px);
  animation: orbitGlow 8s linear infinite;
}
.glow-ring-red {
  background: conic-gradient(
    from 20deg,
    transparent 0deg,
    rgba(255, 58, 58, 0.3) 80deg,
    rgba(255, 96, 96, 0.45) 120deg,
    rgba(255, 58, 58, 0.2) 160deg,
    transparent 220deg
  );
  filter: blur(18px);
  animation: orbitGlow 8s linear infinite;
  animation-delay: -4s;
}
@keyframes orbitGlow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Rim shadow/reflection */
.clock-rim {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 135deg,
    #1e2e50 0deg,
    #4a6090 40deg,
    #8aaadd 80deg,
    #c0d4f0 100deg,
    #8aaadd 120deg,
    #4a6090 160deg,
    #1e2e50 200deg,
    #0a1020 260deg,
    #1e2e50 360deg
  );
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.04),
    0 20px 60px rgba(0, 0, 0, 0.9),
    inset 0 0 80px rgba(0, 0, 0, 0.6);
}

/* Inner bezel */
.clock-bezel {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: conic-gradient(
    from 135deg,
    #0d1628 0deg,
    #1a2840 60deg,
    #0d1628 120deg,
    #1a2840 180deg,
    #0d1628 240deg,
    #1a2840 300deg,
    #0d1628 360deg
  );
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
}

/* Clock face */
.clock-face {
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background:  radial-gradient(
    circle at 38% 35%,
    #0f1830 0%,
    #080d1a 45%,
    #040810 100%
  );
  box-shadow:
    inset 0 0 40px rgba(0, 0, 0, 0.9),
    inset 0 0 80px rgba(0, 0, 0, 0.6),
    inset 2px 2px 10px rgba(255, 255, 255, 0.03);
}
/* ─── SVG CLOCK CANVAS ───────────────────────────────────── */
.clock-svg {
  position: absolute;
  inset: 16px;
  width: calc(100% - 32px);
  height: calc(100% - 32px);
}

/* ─── HANDS ──────────────────────────────────────────────── */
.hand {
  transform-origin: 50% 100%;
  transition: transform 0.05s cubic-bezier(0.4, 2.08, 0.55, 0.44);
}
.hand-hour {
  filter: drop-shadow(0 0 6px rgba(192, 216, 240, 0.7));
}
.hand-minute {
  filter: drop-shadow(0 0 5px rgba(192, 216, 240, 0.6));
}
.hand-second {
  filter: drop-shadow(0 0 8px rgba(255, 48, 48, 0.9));
}
/* ─── CENTER DOT ─────────────────────────────────────────── */
.center-cap {
  filter: drop-shadow(0 0 8px rgba(150, 180, 220, 0.8));
}

/* ─── DIGITAL DISPLAY ────────────────────────────────────── */
.digital-bar {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(8, 13, 26, 0.75);
  border: 1px solid rgba(58, 143, 255, 0.18);
  border-radius: 50px;
  padding: 14px 32px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 40px rgba(58, 143, 255, 0.06);
}

.dig-item{
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 24px;
}

.dig-item:not(:last-child){
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.dig-label{
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.15rem;
    text-transform: uppercase;
    font-weight: 500;
}
.dig-value{
    font-family: 'Orbitron', monospace;
    font-size: clamp(0.75rem, 2vw, 0.95rem);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.05rem;
}
#dig-time{color: #e0f0ff; text-shadow: 0 0 12px rgba(96, 180, 255, 0.5);}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 520px) {
  .digital-bar { flex-direction: column; border-radius: 20px; gap: 6px; padding: 16px 24px; }
  .dig-item { border-right: none !important; border-bottom: 1px solid rgba(255,255,255,0.06); width: 100%; justify-content: space-between; padding: 8px 0; }
  .dig-item:last-child { border-bottom: none; }
}

/* ─── BRAND TAG ──────────────────────────────────────────── */
    .brand-tag {
      position: fixed;
      bottom: 18px;
      right: 24px;
      font-size: 0.68rem;
      color: var(--text-muted);
      letter-spacing: 0.2em;
      text-transform: uppercase;
      z-index: 10;
      opacity: 0.5;
      text-decoration: none;
    }
    .brand-tag span { color: var(--blue-glow); }

/* ─── REDUCED MOTION ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .star,
  .nebula,
  .glow-ring-blue,
  .glow-ring-red {
    animation: none;
  }
  .hand {
    transition: none;
  }
}