:root {
  color-scheme: dark;
  --bg: #07090d;
  --panel: #0d1118;
  --panel2: #111722;
  --text: #f4f7fb;
  --muted: #8d98aa;
  --line: #202a39;
  --good: #77f2ad;
  --warn: #ffd36a;
  --bad: #ff7474;
  --accent: #9db7ff;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 50% -20%, rgba(68, 93, 153, .18), transparent 38rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

button, input { font: inherit; }
button { cursor: pointer; }
.shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}
.topbar { display:flex; align-items:center; justify-content:space-between; padding:22px 2px 12px; }
.brand { font-size:.78rem; letter-spacing:.22em; font-weight:800; color:#cbd5e5; }
.status { display:flex; align-items:center; gap:8px; font-size:.78rem; color:var(--muted); text-transform:uppercase; letter-spacing:.09em; }
.dot { width:9px; height:9px; border-radius:50%; background:var(--warn); box-shadow:0 0 16px currentColor; }
.status-online .dot { background:var(--good); }
.status-offline .dot { background:var(--bad); }

.splash {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  opacity: 1;
  visibility: visible;
  transition: opacity 1.45s ease, visibility 1.45s ease;
}
.splash:not(.is-visible),
.splash.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.splash-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 20%, rgba(190, 32, 36, 0.22), transparent 32rem),
    radial-gradient(circle at 50% 80%, rgba(50, 70, 120, 0.22), transparent 34rem),
    rgba(5, 7, 12, 0.94);
  backdrop-filter: blur(8px);
}
.splash-flicker-frame {
  --jitter-x: 0px;
  --jitter-y: 0px;
  --jitter-r: 0deg;
  position: relative;
  width: min(72vw, 420px);
  aspect-ratio: 2 / 3;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 30px 120px rgba(0,0,0,.55);
  transform: translate(var(--jitter-x), var(--jitter-y)) rotate(var(--jitter-r));
  transition: transform 120ms steps(2, end);
}
.splash-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 260ms ease;
  filter: saturate(1.04) contrast(1.08) brightness(.96);
}
.splash-img.is-on { opacity: 1; }
.splash-flash {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
}
.splash-flash.is-on { opacity: .92; }
.splash-scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.08) 0,
    rgba(255,255,255,0.08) 1px,
    rgba(0,0,0,0.00) 2px,
    rgba(0,0,0,0.00) 4px
  );
  mix-blend-mode: soft-light;
  opacity: .26;
}
.clock-touch-hotspot {
  position: absolute;
  left: 38%;
  top: 63%;
  width: 24%;
  height: 19%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 208, 122, .14), rgba(255, 208, 122, .04) 48%, rgba(255,255,255,0) 72%);
  border: 1px dashed rgba(255, 228, 178, .22);
  box-shadow: 0 0 30px rgba(255, 208, 122, .18);
  color: transparent;
  z-index: 3;
  opacity: .22;
  transition: opacity .2s ease, transform .2s ease;
}
.clock-touch-hotspot:hover,
.clock-touch-hotspot:focus-visible {
  opacity: .4;
  transform: scale(1.05);
  outline: none;
}
.splash-copy {
  position: absolute;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  width: min(92vw, 700px);
  text-align: center;
  padding: 22px 18px 0;
}
.splash-kicker {
  font-size: .76rem;
  letter-spacing: .28em;
  color: #a6b3c7;
  margin-bottom: 10px;
}
.splash-copy h1 {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 3.8rem);
  letter-spacing: -.03em;
}
.splash-copy p {
  max-width: 680px;
  margin: 10px auto 0;
  color: #c7d0de;
  line-height: 1.5;
}
.splash-toast {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  padding: 10px 16px;
  min-height: 44px;
  border-radius: 999px;
  background: rgba(12, 15, 21, .72);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 10px 30px rgba(0,0,0,.24);
  color: #fff3d4;
  font-weight: 700;
  letter-spacing: .02em;
  opacity: .88;
  transform: translateY(0) scale(1);
  transition: opacity .25s ease, transform .25s ease;
}
.splash-toast.is-visible {
  opacity: 1;
  transform: translateY(-1px) scale(1.015);
}
.splash-note {
  margin-top: 10px;
  color: #92a0b6;
  font-size: .88rem;
}

.clock-backdrop {
  --pan-x: 0px;
  --pan-y: 0px;
  --zoom: 1.06;
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 2.2s ease;
}
.clock-backdrop.is-visible { opacity: 1; }
.clock-backdrop img {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  object-fit: cover;
  object-position: center;
  transform: translate(var(--pan-x), var(--pan-y)) scale(var(--zoom));
  filter: brightness(.52) saturate(.95) contrast(1.03);
}
.clock-backdrop-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 44%, rgba(89, 145, 255, .18), transparent 26rem),
    radial-gradient(circle at 50% 80%, rgba(12, 15, 21, .2), transparent 30rem);
}
.clock-backdrop-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(6, 7, 12, .88), rgba(6, 7, 12, .30) 28%, rgba(6, 7, 12, .46) 72%, rgba(6, 7, 12, .90)),
    radial-gradient(circle at center, transparent 20%, rgba(5,7,12,.35) 78%, rgba(5,7,12,.85) 100%);
}

.clock-wrap {
  flex:1;
  min-height:44dvh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:32px 0;
  text-align:center;
  position: relative;
  z-index: 1;
}
.clock {
  font-variant-numeric: tabular-nums lining-nums;
  font-weight:780;
  line-height:.9;
  letter-spacing:-.065em;
  white-space:nowrap;
  font-size:clamp(4.2rem, 16vw, 13.5rem);
  text-shadow:
    0 0 22px rgba(0,0,0,.36),
    0 0 50px rgba(190,210,255,.08),
    0 0 90px rgba(64, 115, 255, .10);
}
.ms { display:inline-block; margin-left:.05em; font-size:.31em; letter-spacing:-.035em; color:#c7d4ea; vertical-align:baseline; min-width:2.9em; text-align:left; }
.date { margin-top:26px; color:#d2d9e8; font-size:clamp(.86rem,2vw,1.05rem); letter-spacing:.06em; text-transform:uppercase; text-shadow: 0 2px 18px rgba(0,0,0,.45); }

.meta-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:14px; position: relative; z-index: 1; }
.metric { background:linear-gradient(180deg,rgba(17,23,34,.90),rgba(13,17,24,.78)); border:1px solid rgba(58,73,98,.65); border-radius:16px; padding:14px 16px; backdrop-filter: blur(10px); }
.metric span { display:block; color:var(--muted); font-size:.66rem; letter-spacing:.14em; margin-bottom:5px; }
.metric strong { font-size:1rem; font-variant-numeric:tabular-nums; }

.share-card { display:grid; grid-template-columns:auto 1fr; gap:22px; align-items:center; padding:18px; border:1px solid rgba(53,67,91,.72); background:rgba(13,17,24,.62); border-radius:20px; backdrop-filter:blur(16px); position: relative; z-index: 1; }
.qr-box { width:170px; height:170px; background:#fff; padding:10px; border-radius:14px; display:grid; place-items:center; overflow:hidden; }
.qr-box img, .qr-box canvas { width:150px !important; height:150px !important; image-rendering:pixelated; }
.share-copy h1 { margin:0 0 6px; font-size:1.18rem; }
.share-copy p { margin:0 0 14px; max-width:760px; color:var(--muted); line-height:1.48; }
.url-row { display:grid; grid-template-columns:1fr auto; gap:8px; }
input { min-width:0; color:#dce6f7; background:#080b10; border:1px solid var(--line); border-radius:12px; padding:11px 12px; outline:none; }
button { border:1px solid #33425a; background:#dfe8f7; color:#0a0d12; font-weight:800; border-radius:12px; padding:10px 16px; }
button.secondary { background:#111722; color:#dce6f7; border-color:#2b374a; }
.buttons { display:flex; gap:8px; margin-top:9px; }
footer { display:flex; justify-content:space-between; gap:16px; color:#8c98aa; font-size:.72rem; padding:14px 2px 22px; position: relative; z-index: 1; }

body.fullscreen .topbar,
body.fullscreen .meta-grid,
body.fullscreen .share-card,
body.fullscreen footer { display:none; }
body.fullscreen .shell { width:100%; }
body.fullscreen .clock-wrap { min-height:100dvh; padding:0 12px; }
body.fullscreen .clock { font-size:min(18vw, 15rem); }
body.fullscreen .clock-backdrop { position: fixed; }

@media (max-width: 720px) {
  .shell { width:min(100% - 18px, 1180px); }
  .topbar { padding-top:16px; }
  .splash-copy { bottom: 18px; }
  .splash-flicker-frame { width: min(84vw, 380px); }
  .clock-touch-hotspot { left: 35%; top: 61%; width: 29%; height: 20%; }
  .clock-wrap { min-height:48dvh; padding:20px 0; }
  .clock { font-size:clamp(3.55rem, 18vw, 7.2rem); letter-spacing:-.07em; }
  .ms { display:block; margin:.25em auto 0; width:auto; text-align:center; font-size:.25em; letter-spacing:.05em; }
  .meta-grid { grid-template-columns:repeat(2,1fr); }
  .share-card { grid-template-columns:1fr; justify-items:center; text-align:center; }
  .share-copy { width:100%; }
  .url-row { grid-template-columns:1fr; }
  .buttons { justify-content:center; }
  footer { flex-direction:column; text-align:center; }
}
