:root {
  --red: #dc143c;
  --white: #ffffff;
  --blue: #0033a0;
}

body {
  margin: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(45deg, var(--blue), var(--red));
  font-family: "Orbitron", monospace;
  overflow: hidden;
  position: relative;
}

.clock-container {
  text-align: center;
  position: relative;
  z-index: 2;
}

.clock-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.02em;
  font-size: clamp(2.5rem, 12vw, 12rem);
  font-weight: 900;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
  flex-wrap: nowrap;
  max-width: 90vw;
}

.time-segment {
  padding: 0.05em 0.2em;
  border-radius: 0.15em;
  min-width: 2ch;
  text-align: center;
  flex-shrink: 0;
}

.hours {
  background: var(--red);
  color: var(--white);
}
.seconds {
  background: var(--white);
  color: var(--blue);
}
.minutes {
  background: var(--blue);
  color: var(--white);
  cursor: help;
}

.colon {
  color: var(--white);
  font-size: 0.6em;
  animation: blink 2s infinite;
  flex-shrink: 0;
  min-width: 0.5ch;
}

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

.ampm-display {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.8rem, 2vw, 1.2rem);
  margin-top: 0.5rem;
  font-family: "Orbitron", monospace;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  text-align: center;
}

.timezone-display {
  color: rgba(255, 255, 255, 0.7);
  font-size: clamp(0.6rem, 1.5vw, 0.9rem);
  margin-top: 0.3rem;
  font-family: sans-serif;
  font-weight: 400;
  text-align: center;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

/* Stars background */
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(2px 2px at 20px 30px, #eee, transparent),
    radial-gradient(2px 2px at 40px 70px, #fff, transparent),
    radial-gradient(1px 1px at 90px 40px, #fff, transparent),
    radial-gradient(1px 1px at 130px 80px, #eee, transparent);
  background-repeat: repeat;
  background-size: 200px 100px;
  animation: stars 20s linear infinite;
  z-index: 1;
}

@keyframes stars {
  from {
    transform: translateY(0px);
  }
  to {
    transform: translateY(-100px);
  }
}

/* Responsive */
@media (max-width: 480px) {
  .hint {
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  .clock-display {
    font-size: clamp(2rem, 10vw, 10rem);
  }
}
