:root {
  --font-sans: "Segoe UI", system-ui, -apple-system, sans-serif;
  --color-bg-peak: #4a0000;
  --color-bg-off: #001a3a;
  --color-text: #fff;
  --color-outline: #fff;
  --glow-sm: 0 1px 4px #00000080;
  --glow-md: 0 1px 6px #0009;
}

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

html, body {
  width: 100%;
  height: 100%;
  font-family: var(--font-sans);
  overflow: hidden;
}

body {
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  display: flex;
  position: relative;
}

#gradient-canvas {
  z-index: 0;
  width: 100%;
  height: 100%;
  position: fixed;
  inset: 0;
}

.content {
  z-index: 1;
  text-align: center;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  display: flex;
  position: relative;
}

.text-outline {
  color: var(--color-text);
  text-shadow: var(--ts-outline), var(--ts-glow, none);
  -webkit-text-stroke: var(--stroke-w, 0) var(--color-outline);
  paint-order: stroke fill;
}

.status-label {
  letter-spacing: .25em;
  text-transform: uppercase;
  opacity: .85;
  font-size: clamp(.9rem, 2.5vw, 1.25rem);
  font-weight: 700;
}

.main-heading {
  letter-spacing: -.02em;
  color: #ffffffe6;
  text-shadow: var(--glow-md);
  font-size: clamp(4rem, 16vw, 12rem);
  font-weight: 900;
  line-height: 1;
}

.subtitle {
  letter-spacing: .05em;
  color: #ffffffe6;
  text-shadow: var(--glow-md);
  font-size: clamp(1.5rem, 5vw, 3.5rem);
  font-weight: 800;
}

.peak-schedule {
  color: #ffffffa6;
  letter-spacing: .08em;
  text-shadow: var(--glow-sm);
  margin-bottom: .25rem;
  font-size: clamp(.8rem, 1.6vw, 1rem);
  font-weight: 500;
}

.peak-schedule.local {
  color: #ffffff80;
  margin-bottom: .125rem;
  font-size: clamp(.7rem, 1.4vw, .9rem);
}

.countdown {
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  margin-top: .5rem;
  display: flex;
}

.countdown-label {
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .75;
  color: #ffffffd9;
  text-shadow: var(--glow-sm);
  font-size: clamp(.85rem, 2vw, 1.15rem);
  font-weight: 600;
}

.countdown-time {
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
  color: #fffffff2;
  text-shadow: var(--glow-md);
  font-size: clamp(1.8rem, 6vw, 4.5rem);
  font-weight: 900;
}

.toggle-info {
  color: #fffc;
  cursor: pointer;
  width: 2.5rem;
  height: 2.5rem;
  text-shadow: var(--glow-sm);
  box-shadow: var(--glow-sm);
  background: #ffffff14;
  border: 1.5px solid #ffffff59;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  margin-top: 1rem;
  font-size: 1.2rem;
  line-height: 1;
  transition: background .25s, border-color .25s, transform .2s;
  display: flex;
}

.toggle-info:hover {
  background: #ffffff2e;
  border-color: #fff9;
  transform: scale(1.05);
}

.toggle-info:active {
  transform: scale(.95);
}

.time-info {
  opacity: 1;
  flex-direction: column;
  align-items: center;
  max-height: 200px;
  transition: opacity .3s, max-height .3s;
  display: flex;
  overflow: hidden;
}

.time-info.hidden {
  opacity: 0;
  pointer-events: none;
  max-height: 0;
}

.clock {
  color: #ffffffe6;
  letter-spacing: .1em;
  text-shadow: var(--glow-md);
  margin-top: 1.5rem;
  font-size: clamp(.85rem, 2vw, 1.1rem);
  font-weight: 600;
}

.clock.local {
  color: #ffffffb3;
  margin-top: .25rem;
  font-size: clamp(.75rem, 1.8vw, .95rem);
  font-weight: 500;
}

.tz-note {
  color: #ffffffb3;
  letter-spacing: .05em;
  text-shadow: var(--glow-sm);
  cursor: pointer;
  user-select: none;
  border-bottom: 1px dashed #fff3;
  margin-bottom: .25rem;
  padding-bottom: .15rem;
  font-size: clamp(.75rem, 1.5vw, .95rem);
  transition: color .2s, border-color .2s;
}

.tz-note:hover {
  color: #fffffff2;
  border-color: #ffffff80;
}

.tz-note:after {
  content: " ▾";
  opacity: .6;
  font-size: .75em;
}

.tz-backdrop {
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  background: #00000073;
  justify-content: center;
  align-items: center;
  transition: opacity .2s, visibility .2s;
  display: flex;
  position: fixed;
  inset: 0;
}

.tz-backdrop.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.tz-popover {
  -webkit-backdrop-filter: blur(20px);
  background: #0a0a22f5;
  border: 1px solid #ffffff1f;
  border-radius: 16px;
  flex-direction: column;
  width: min(360px, 92vw);
  max-height: min(480px, 80vh);
  transition: transform .2s;
  display: flex;
  position: relative;
  overflow: hidden;
  transform: scale(1);
  box-shadow: 0 16px 48px #0000008c, inset 0 0 0 1px #ffffff0d;
}

.tz-backdrop.hidden .tz-popover {
  transform: scale(.95);
}

.tz-search {
  color: #ffffffe6;
  width: 100%;
  font-family: var(--font-sans);
  background: #ffffff0f;
  border: none;
  border-bottom: 1px solid #ffffff1a;
  outline: none;
  flex-shrink: 0;
  padding: .7rem 1rem;
  font-size: .9rem;
}

.tz-search::placeholder {
  color: #ffffff59;
}

.tz-search:focus {
  background: #ffffff1a;
}

.tz-list {
  overscroll-behavior: contain;
  flex: 1;
  padding: .4rem 0;
  overflow-y: auto;
}

.tz-list::-webkit-scrollbar {
  width: 6px;
}

.tz-list::-webkit-scrollbar-thumb {
  background: #ffffff26;
  border-radius: 3px;
}

.tz-option {
  color: #ffffffbf;
  width: 100%;
  font-family: var(--font-sans);
  cursor: pointer;
  text-align: left;
  background: 0 0;
  border: none;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1rem;
  font-size: .85rem;
  transition: background .15s;
  display: flex;
}

.tz-option:hover {
  background: #ffffff14;
}

.tz-option:focus-visible {
  background: #ffffff1a;
  outline: none;
}

.tz-offset {
  color: #fff6;
  letter-spacing: .04em;
  white-space: nowrap;
  margin-left: auto;
  margin-right: .35rem;
  font-size: .75rem;
  font-weight: 600;
}

.tz-check {
  color: #ffffff4d;
  opacity: 0;
  font-size: .8rem;
  transition: opacity .15s;
}

.tz-selected .tz-check {
  opacity: 1;
  color: #ffffffb3;
}

.tz-option:focus-visible {
  box-shadow: inset 0 0 0 1px #fff3;
}

@keyframes pulse-scale {
  0%, to { transform: scale(1); }
  50% { transform: scale(1.04); }
}
