:root {
  --ink: #f5f2ea;
  --muted: #8f96a6;
  --subtle: #5d6472;
  --bg: #06080d;
  --panel: rgba(14, 18, 27, .72);
  --panel-solid: #10141d;
  --line: rgba(255, 255, 255, .095);
  --lime: #d7ff52;
  --lime-soft: rgba(215, 255, 82, .14);
  --violet: #9b87ff;
  --orange: #ff7144;
  --cyan: #57d6df;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }
::selection { color: #080a0e; background: var(--lime); }

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% -20%, rgba(117, 95, 255, .16), transparent 39%),
    linear-gradient(#070910, #06080d 60%);
}
#starfield { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .65; }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .12; }
.orb-one { width: 420px; height: 420px; background: #b4ff51; top: 16%; left: -240px; }
.orb-two { width: 520px; height: 520px; background: #7764ff; top: 46%; right: -310px; }
.grid-floor {
  position: absolute;
  width: 150vw;
  height: 70vh;
  left: -25vw;
  bottom: -47vh;
  opacity: .05;
  transform: perspective(450px) rotateX(58deg);
  background-image:
    linear-gradient(rgba(255,255,255,.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.4) 1px, transparent 1px);
  background-size: 70px 70px;
}

.shell { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.topbar {
  width: min(1240px, calc(100% - 48px));
  height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  font: 700 15px/1 "Manrope", sans-serif;
  letter-spacing: .16em;
  text-decoration: none;
}
.brand-mark { position: relative; width: 27px; height: 27px; display: inline-grid; place-items: center; }
.brand-mark::before, .brand-mark::after, .brand-mark i, .brand-mark b {
  content: "";
  position: absolute;
  border-radius: 50%;
}
.brand-mark::before { inset: 0; border: 1.5px solid var(--lime); border-left-color: transparent; transform: rotate(-28deg); }
.brand-mark::after { inset: 6px; border: 1px solid rgba(215,255,82,.42); border-right-color: transparent; }
.brand-mark i { width: 5px; height: 5px; background: var(--lime); box-shadow: 0 0 12px var(--lime); right: 0; top: 5px; }
.brand-mark b { width: 3px; height: 3px; background: var(--ink); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.sync-pill, .language-picker {
  min-height: 35px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: #aeb4bf;
  background: rgba(255,255,255,.035);
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 10px;
  letter-spacing: .08em;
}
.sync-dot { width: 6px; height: 6px; border-radius: 50%; background: #e0a843; box-shadow: 0 0 9px #e0a843; }
.sync-pill.synced .sync-dot { background: var(--lime); box-shadow: 0 0 9px var(--lime); }
.sync-value { color: var(--lime); }
.language-picker select {
  color: var(--ink);
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 10px;
  font-weight: 600;
}
.language-picker option { color: #10131a; }

.hero {
  min-height: calc(100svh - 92px);
  padding: 32px 0 40px;
  display: flex;
  align-items: center;
  text-align: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #aaaeb8;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .27em;
}
.eyebrow span:first-child { width: 18px; height: 1px; background: var(--lime); box-shadow: 0 0 8px var(--lime); }
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin: 25px auto 26px;
  font: 500 clamp(54px, 8.5vw, 108px)/.94 "Manrope", sans-serif;
  letter-spacing: -.072em;
}
h1 em { color: var(--lime); font-style: normal; text-shadow: 0 0 48px rgba(215,255,82,.15); }
.hero-copy {
  max-width: 620px;
  margin: 0 auto 56px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}
.glass-panel {
  background: linear-gradient(145deg, rgba(20, 25, 35, .82), rgba(10, 13, 20, .72));
  border: 1px solid var(--line);
  box-shadow: 0 28px 90px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.025);
  backdrop-filter: blur(18px);
}
.hero-instrument {
  width: 100%;
  min-height: clamp(520px, calc(100svh - 164px), 740px);
  margin-inline: auto;
  display: flex;
  overflow: hidden;
  border-radius: 28px;
}
.now-panel {
  position: relative;
  width: 100%;
  min-height: 520px;
  min-width: 0;
  margin: 0;
  padding: 64px 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.now-panel::before {
  content: "";
  position: absolute;
  left: 15%;
  right: 15%;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--lime), transparent);
  box-shadow: 0 0 22px rgba(215,255,82,.5);
}
.now-meta, .countdown-head, .progress-label, .progress-foot, .metric-top, .climate-scale {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.now-meta { text-align: left; }
.kicker {
  display: block;
  color: #8d94a0;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .16em;
}
.now-meta strong { display: block; margin-top: 5px; color: #c8cbd2; font-size: 11px; font-weight: 500; }
.live-tag { display: flex; align-items: center; gap: 7px; color: var(--lime); font-size: 9px; letter-spacing: .13em; }
.live-tag i { width: 5px; height: 5px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 9px var(--lime); animation: live 1.5s ease-in-out infinite; }
@keyframes live { 50% { opacity: .35; transform: scale(.78); } }
.now-time {
  margin: 48px 0 20px;
  font: 500 clamp(108px, 12vw, 176px)/.9 "Space Grotesk", sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.072em;
  white-space: nowrap;
}
.now-time span { color: var(--lime); font-size: .38em; letter-spacing: -.025em; }
.now-date { color: #c5c8d0; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
.utc-line {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  margin-top: 27px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.06);
  color: #737a88;
  font: 10px/1 "Manrope", sans-serif;
  letter-spacing: .09em;
  font-variant-numeric: tabular-nums;
}
.utc-line strong { color: #aeb4bf; font-weight: 500; }
.separator { opacity: .45; }

.countdown-section, .life-section { padding: 74px 0 10px; }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  margin-bottom: 38px;
}
.section-heading > div { display: flex; align-items: baseline; gap: 17px; }
.section-index { color: var(--lime); font: 500 9px/1 "Manrope", sans-serif; letter-spacing: .1em; }
h2 {
  margin-bottom: 0;
  font: 500 clamp(28px, 4vw, 43px)/1 "Manrope", sans-serif;
  letter-spacing: -.045em;
}
.section-heading p { margin-bottom: 2px; color: var(--muted); font-size: 12px; }

.horizon-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.horizon-tab {
  position: relative;
  min-height: 86px;
  padding: 15px 20px;
  text-align: left;
  color: #7f8693;
  background: rgba(255,255,255,.025);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color .25s, background .25s, transform .25s;
}
.horizon-tab:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.18); }
.horizon-tab span { position: absolute; right: 14px; top: 13px; color: #4e5460; font-size: 8px; }
.horizon-tab strong { display: block; color: inherit; font: 500 24px/1 "Manrope", sans-serif; letter-spacing: -.03em; }
.horizon-tab small { display: block; margin-top: 9px; font-size: 8px; letter-spacing: .12em; }
.horizon-tab.active { color: var(--ink); background: rgba(215,255,82,.075); border-color: rgba(215,255,82,.5); box-shadow: inset 0 0 22px rgba(215,255,82,.035); }
.horizon-tab.active strong { color: var(--lime); }
.horizon-tab.active::after { content: ""; position: absolute; left: 15%; right: 15%; bottom: -1px; height: 1px; background: var(--lime); box-shadow: 0 0 10px var(--lime); }

.countdown-card { padding: 30px 32px 28px; border-radius: var(--radius); }
.countdown-head h3 { margin: 7px 0 0; font: 500 17px/1 "Manrope", sans-serif; letter-spacing: .055em; }
.share-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  color: #a3a9b5;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 8px;
  letter-spacing: .12em;
  transition: color .2s, border-color .2s;
}
.share-button:hover { color: var(--lime); border-color: rgba(215,255,82,.4); }
.share-button span:first-child { font-size: 15px; line-height: 0; }
.unit-selector {
  display: flex;
  gap: 6px;
  margin-top: 28px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.unit-selector::-webkit-scrollbar { display: none; }
.unit-button {
  flex: 0 0 auto;
  padding: 8px 11px;
  color: #69717d;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 7px;
  font-size: 7px;
  font-weight: 600;
  letter-spacing: .11em;
  transition: color .2s, border-color .2s, background .2s;
}
.unit-button:hover { color: #bbc0c8; border-color: rgba(255,255,255,.16); }
.unit-button.active {
  color: #0a0d10;
  background: var(--lime);
  border-color: var(--lime);
}
.countdown-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(4, 1fr);
  gap: 1px;
  margin: 37px 0 35px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.countdown-grid.hidden { display: none; }
.single-countdown {
  min-height: 160px;
  margin: 20px 0 35px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(215,255,82,.035);
  border: 1px solid rgba(215,255,82,.12);
  border-radius: 12px;
}
.single-countdown.active { display: flex; }
.single-countdown strong {
  max-width: 100%;
  color: var(--lime);
  font: 500 clamp(32px, 6.4vw, 68px)/1 "Manrope", sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.055em;
  white-space: nowrap;
}
.single-countdown span {
  margin-top: 14px;
  color: #6e7682;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .17em;
}
.count-unit { min-width: 0; padding: 27px 10px 23px; text-align: center; background: rgba(7,10,15,.88); }
.count-unit.featured { background: rgba(215,255,82,.055); }
.count-unit strong { display: block; color: #e5e7e9; font: 500 clamp(24px, 4vw, 42px)/1 "Manrope", sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.045em; }
.count-unit.featured strong { color: var(--lime); }
.count-unit span { display: block; margin-top: 11px; color: #636a77; font-size: 8px; font-weight: 600; letter-spacing: .15em; }
.progress-label { margin-bottom: 10px; color: #8d94a0; font-size: 9px; letter-spacing: .1em; }
.progress-label strong { color: var(--lime); font-weight: 500; font-variant-numeric: tabular-nums; }
.progress-track { height: 4px; overflow: hidden; background: rgba(255,255,255,.07); border-radius: 10px; }
.progress-fill { width: 0; height: 100%; background: linear-gradient(90deg, #c6fa3c, #f0ff8a); box-shadow: 0 0 12px rgba(215,255,82,.45); transition: width .6s ease; }
.progress-foot { margin-top: 10px; color: #555c69; font-size: 7px; letter-spacing: .11em; }

.life-lab { display: grid; grid-template-columns: .85fr 1.35fr; min-height: 390px; border-radius: var(--radius); overflow: hidden; }
.life-form { padding: 40px; border-right: 1px solid var(--line); }
.date-input-wrap { position: relative; display: block; margin-top: 12px; }
.date-input-wrap input {
  width: 100%;
  height: 51px;
  padding: 0 45px 0 15px;
  color: var(--ink);
  color-scheme: dark;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 8px;
  outline: 0;
}
.date-input-wrap input:focus { border-color: rgba(215,255,82,.55); box-shadow: 0 0 0 3px rgba(215,255,82,.06); }
.date-input-wrap span { position: absolute; right: 16px; top: 15px; color: var(--lime); pointer-events: none; }
.life-options { display: grid; grid-template-columns: 1.35fr .8fr; gap: 8px; margin-top: 20px; }
.life-options label { display: block; }
.life-options label > span { display: block; margin-bottom: 7px; color: #707784; font-size: 8px; letter-spacing: .13em; }
.life-options select, .life-options input {
  width: 100%;
  height: 43px;
  padding: 0 11px;
  color: #c6cad1;
  color-scheme: dark;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  outline: 0;
  font-size: 11px;
}
.life-options input { color-scheme: dark; }
.primary-button {
  width: 100%;
  height: 48px;
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #080b0e;
  background: var(--lime);
  border: 0;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  box-shadow: 0 8px 30px rgba(215,255,82,.1);
  transition: transform .2s, box-shadow .2s;
}
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 10px 35px rgba(215,255,82,.2); }
.privacy-note { display: flex; gap: 7px; margin: 14px 0 0; color: #565e69; font-size: 8px; line-height: 1.4; }
.life-result { min-width: 0; padding: 35px; display: flex; align-items: center; justify-content: center; }
.life-result.empty { flex-direction: column; color: #606875; font-size: 10px; letter-spacing: .06em; }
.empty-orbit { position: relative; width: 128px; height: 128px; margin-bottom: 26px; display: grid; place-items: center; }
.empty-orbit::before, .empty-orbit::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.07); border-radius: 50%; }
.empty-orbit::before { inset: 0; }
.empty-orbit::after { inset: 22px; border-style: dashed; }
.empty-orbit i { position: absolute; inset: 12px 37px; border: 1px solid rgba(215,255,82,.28); border-radius: 50%; transform: rotate(48deg); }
.empty-orbit b { position: absolute; width: 4px; height: 4px; top: 16px; right: 35px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 9px var(--lime); }
.empty-orbit span { color: var(--lime); font-size: 18px; text-shadow: 0 0 20px rgba(215,255,82,.6); }
.result-content { width: 100%; }
.result-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 28px; }
.result-head h3 { margin: 6px 0 0; font: 500 27px/1.1 "Manrope", sans-serif; letter-spacing: -.04em; }
.life-live { margin-top: 9px; color: var(--lime); font: 500 16px/1 "Manrope", sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.result-head strong { color: var(--lime); font: 500 29px/1 "Manrope", sans-serif; }
.result-head strong small { display: block; margin-top: 4px; color: #666e7a; font-size: 7px; text-align: right; letter-spacing: .1em; }
.age-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.age-grid div { padding: 15px; background: rgba(255,255,255,.027); border: 1px solid rgba(255,255,255,.065); border-radius: 9px; }
.age-grid strong { display: block; font: 500 20px/1 "Manrope", sans-serif; font-variant-numeric: tabular-nums; }
.age-grid span { display: block; margin-top: 8px; color: #666d79; font-size: 7px; letter-spacing: .11em; }
.life-progress { margin-top: 24px; }
.life-progress .progress-track { height: 5px; }
.life-progress-copy { margin-top: 8px; display: flex; justify-content: space-between; color: #656d79; font-size: 8px; }
.life-disclaimer { margin: 20px 0 0; color: #565e6b; font-size: 8px; line-height: 1.5; }

.world-clocks { padding: 110px 0 120px; }
.section-heading.compact { margin-bottom: 30px; }
.clocks-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.clocks-grid article { padding: 24px 22px; border-right: 1px solid var(--line); }
.clocks-grid article:last-child { border-right: 0; }
.clocks-grid span { display: block; color: #646b77; font-size: 8px; letter-spacing: .14em; }
.clocks-grid strong { display: block; margin-top: 9px; font: 500 24px/1 "Manrope", sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.clocks-grid small { display: block; margin-top: 9px; color: #6b7280; font-size: 8px; }

.footer {
  min-height: 150px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  border-top: 1px solid var(--line);
  color: #555c68;
  font-size: 9px;
}
.footer p { margin: 0; }
.footer > p:nth-child(2) { text-align: center; }
.footer > p:last-child { text-align: right; }
.footer a { text-decoration: none; }
.footer > p a:hover { color: var(--lime); }
.footer-brand { color: #8b919c; font-size: 11px; }
.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 30px;
  padding: 11px 16px;
  color: #0a0c10;
  background: var(--lime);
  border-radius: 7px;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
  font-size: 10px;
  font-weight: 600;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 850px) {
  .shell { width: min(100% - 36px, 720px); }
  .topbar { width: calc(100% - 36px); }
  .hero { padding-top: 24px; }
  .hero-instrument { min-height: clamp(500px, calc(100svh - 148px), 680px); }
  .now-panel { min-height: 500px; padding-inline: 40px; }
  .life-lab { grid-template-columns: 1fr; }
  .life-form { border-right: 0; border-bottom: 1px solid var(--line); }
  .life-result { min-height: 360px; }
  .clocks-grid { grid-template-columns: repeat(2, 1fr); }
  .clocks-grid article:nth-child(2) { border-right: 0; }
  .clocks-grid article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 28px, 1120px); }
  .topbar { width: calc(100% - 28px); height: 75px; }
  .hero { min-height: calc(100svh - 75px); padding: 18px 0 28px; }
  h1 { font-size: clamp(50px, 16vw, 74px); }
  .hero-copy { font-size: 14px; }
  .hero-instrument { min-height: max(440px, calc(100svh - 121px)); }
  .hero-instrument { border-radius: 16px; }
  .now-panel { min-height: 440px; padding: 36px 18px; }
  .now-time { margin: 38px 0 16px; font-size: clamp(48px, 15.2vw, 68px); }
  .now-date { font-size: 10px; }
  .countdown-section, .life-section { padding-top: 56px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 13px; }
  .section-heading p { line-height: 1.5; }
  .horizon-tabs { gap: 6px; }
  .horizon-tab { min-height: 68px; padding: 10px; }
  .horizon-tab strong { font-size: 20px; }
  .horizon-tab small { font-size: 6px; }
  .countdown-card { padding: 20px 12px 21px; border-radius: 14px; }
  .countdown-grid { grid-template-columns: 1.4fr repeat(2, 1fr); margin-top: 28px; }
  .count-unit:nth-child(4), .count-unit:nth-child(5) { grid-column: span 1; }
  .count-unit:nth-child(4) { grid-column: 1 / 2; }
  .count-unit:nth-child(5) { grid-column: 2 / 4; }
  .count-unit strong { font-size: 27px; }
  .share-button span:last-child { display: none; }
  .life-lab { border-radius: 14px; }
  .life-form, .life-result { padding: 25px 17px; }
  .life-options { grid-template-columns: 1fr; gap: 14px; }
  .result-head { flex-direction: column; gap: 18px; }
  .result-head strong small { text-align: left; }
  .life-progress-copy { flex-direction: column; gap: 6px; }
  .age-grid { grid-template-columns: repeat(2, 1fr); }
  .clocks-grid { grid-template-columns: 1fr 1fr; }
  .clocks-grid article { padding: 20px 14px; }
  .clocks-grid strong { font-size: 19px; }
  .footer { padding: 35px 0; grid-template-columns: 1fr; gap: 25px; text-align: center; }
  .footer > p:nth-child(2), .footer > p:last-child { text-align: center; }
  .footer-brand { justify-self: center; }
}

@media (max-width: 390px) {
  .brand { font-size: 13px; }
  .now-time { font-size: clamp(44px, 15.2vw, 62px); }
  .utc-line { gap: 6px; font-size: 8px; }
  .horizon-tab span, .horizon-tab small { display: none; }
  .horizon-tab { min-height: 54px; }
  .countdown-head h3 { font-size: 15px; }
  .unit-button { min-height: 38px; }
  .count-unit strong { font-size: 23px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  #starfield { display: none; }
}
