html,
body {
  height: 100%;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: white;
  background-color: #111;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.scroll-container {
  height: 100vh;
  overflow-y: auto;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

.snap-section {
  height: 100vh;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  overflow: hidden;
}

#clock-view {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* background will be set by JS */
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transition: background-image 800ms ease-in-out;
}

.overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.48));
  pointer-events: none;
}

.container {
  position: relative;
  z-index: 2;
  width: min(92vw, 1100px);
  padding: 40px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  /* backdrop-filter: blur(6px) saturate(1.05); */
}

.time {
  font-size: clamp(48px, 12vw, 140px);
  font-weight: 600;
  letter-spacing: -1px;
  line-height: 0.95;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
  margin: 0;
}

.mantra {
  font-size: clamp(14px, 2.6vw, 20px);
  opacity: 0.98;
  margin: 0;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
}

.quote {
  margin: 0;
  font-size: clamp(12px, 2vw, 16px);
  opacity: 0.95;
  font-style: italic;
  color: rgba(255, 255, 255, 0.92);
  max-width: 70ch;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
}

.attribution {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  opacity: 0.9;
}

/* Clock styles */
.time-container {
  position: relative;
  width: clamp(120px, 30vw, 300px);
  height: clamp(120px, 30vw, 300px);
}

.digital-time {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}

.analog-time {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.time-container.analog .digital-time {
  opacity: 0;
  pointer-events: none;
}

.time-container.analog .analog-time {
  opacity: 1;
  pointer-events: auto;
}

.clock-face {
  width: 100%;
  height: 100%;
  border: 3px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
}

.clock-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  transform: translate(-50%, -50%);
  z-index: 10;
}

.clock-hand {
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform-origin: bottom;
  background: white;
  border-radius: 4px;
}

.hours-hand {
  width: 4px;
  height: 25%;
  transform: translateX(-50%);
}

.minutes-hand {
  width: 3px;
  height: 35%;
  transform: translateX(-50%);
}

.seconds-hand {
  width: 2px;
  height: 40%;
  background: rgba(255, 255, 255, 0.9);
  transform: translateX(-50%);
}

/* small corner controls (edit text) */
.controls {
  display: flex;
  /*display: none; */
  /* hide by default, enable for testing */
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  gap: 8px;
}

.btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  backdrop-filter: blur(4px);
}

/* responsive spacing */
@media (max-height: 520px) {
  .container {
    padding: 18px;
    gap: 8px;
  }
  .time {
    font-size: clamp(36px, 10vw, 84px);
  }
}
