@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;700;900&display=swap');

:root {
  --ink: #185b84;
  --muted: #4b88a6;
  --accent: #58c2e8;
  --accent-dark: #2e8fbe;
  --line: rgba(255, 255, 255, .72);
  --glass: rgba(245, 252, 255, .72);
  --glass-strong: rgba(249, 254, 255, .86);
  --shadow: 0 20px 60px rgba(7, 66, 117, .24);
  --font-ui: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --font-display: 'Barlow Condensed', 'Noto Sans SC', sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

html:fullscreen,
html:fullscreen body {
  width: 100%;
  height: 100%;
  background: #9edff2;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--font-ui);
  background: #b7e9f8;
}

button, a { font: inherit; }
button { cursor: pointer; }

.site-shell {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(135deg, #a8e2f5 0%, #c9effa 48%, #effbff 100%);
}

.backdrop,
.backdrop-wash,
.grid-texture {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.backdrop {
  z-index: -3;
  object-fit: cover;
  object-position: center;
  opacity: .9;
  transition: opacity .35s ease, transform 1.2s ease;
}

.backdrop.is-loading { opacity: .16; }
.backdrop.is-fallback { opacity: 0; }

.backdrop-wash {
  z-index: -2;
  background: linear-gradient(180deg, rgba(238, 251, 255, .22), rgba(186, 231, 247, .12) 44%, rgba(58, 145, 192, .24));
}

.grid-texture {
  z-index: -1;
  opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.42) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.42) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.site-shell::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 12% 16%, rgba(255,255,255,.48), transparent 22%), radial-gradient(circle at 84% 78%, rgba(126, 211, 239, .2), transparent 28%);
}

.topbar,
.footer {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: white;
  font-weight: 900;
  font-size: 22px;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 74%, 75% 100%, 0 100%);
  box-shadow: 4px 4px 0 rgba(255,255,255,.75);
}

.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font-size: 15px; letter-spacing: .12em; }
.brand-copy small { color: var(--muted); font: 600 10px/1.2 var(--font-display); letter-spacing: .18em; }

.top-actions { display: flex; gap: 10px; align-items: center; }
.icon-button, .text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid rgba(255,255,255,.82);
  color: var(--ink);
  background: rgba(246, 253, 255, .52);
  box-shadow: 0 8px 24px rgba(15, 76, 101, .08);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.icon-button { width: 40px; padding: 0; font-size: 24px; line-height: 1; }
.text-button { gap: 8px; padding: 0 16px; font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.button-icon { font-size: 19px; line-height: 0; }
.icon-button:hover, .text-button:hover, .icon-button:focus-visible, .text-button:focus-visible { transform: translateY(-2px); background: var(--glass-strong); box-shadow: 0 12px 26px rgba(15, 76, 101, .16); outline: none; }

.main-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  place-items: center;
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
  padding: 34px 0 52px;
}

.countdown-panel {
  width: min(930px, 100%);
  padding: clamp(30px, 5vw, 68px) clamp(20px, 6vw, 78px);
  text-align: center;
  border: 1px solid rgba(255,255,255,.34);
  background: linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(226, 246, 255, .06));
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
  clip-path: polygon(0 24px, 24px 0, calc(100% - 24px) 0, 100% 24px, 100% calc(100% - 24px), calc(100% - 24px) 100%, 24px 100%, 0 calc(100% - 24px));
}

.eyebrow { margin: 0 0 10px; color: var(--accent-dark); font: 600 12px/1 var(--font-display); letter-spacing: .28em; }
h1 { margin: 0; color: #4aa9d2; font-size: clamp(29px, 5vw, 54px); font-weight: 900; letter-spacing: .08em; text-shadow: 0 2px 0 rgba(255,255,255,.72); }
.target-date { margin: 12px 0 34px; color: var(--muted); font-size: 14px; letter-spacing: .14em; }

.countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(6px, 1.4vw, 22px);
}

.time-unit {
  min-width: 0;
  flex: 1 1 0;
}
.time-value {
  display: block;
  color: #39add8;
  font: 700 clamp(50px, 6.4vw, 96px)/.82 var(--font-display);
  letter-spacing: .025em;
  text-shadow: 0 3px 0 rgba(255,255,255,.7), 0 14px 30px rgba(9, 86, 116, .18);
}
.time-label { display: block; margin-top: 14px; color: var(--muted); font-size: 12px; letter-spacing: .22em; }
.time-separator {
  display: grid;
  flex: 0 0 clamp(18px, 3vw, 42px);
  width: clamp(18px, 3vw, 42px);
  height: clamp(41px, 5.25vw, 79px);
  place-items: center;
  padding: 0;
  color: rgba(58, 174, 218, .82);
  font: 500 clamp(40px, 6vw, 84px)/.82 var(--font-display);
}

.total-seconds { margin: 35px 0 0; color: var(--accent-dark); font: 600 13px/1.2 var(--font-display); letter-spacing: .2em; }
.total-seconds span:first-child { font-size: 22px; letter-spacing: .06em; }
.progress-section { width: min(620px, 100%); margin: 28px auto 0; text-align: left; }
.progress-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: 12px; letter-spacing: .1em; }
.progress-heading strong { color: var(--accent-dark); font: 600 17px/1 var(--font-display); letter-spacing: .04em; }
.progress-track { position: relative; height: 9px; overflow: hidden; border: 1px solid rgba(255,255,255,.88); background: rgba(255,255,255,.48); box-shadow: inset 0 1px 3px rgba(30, 115, 151, .12); }
.progress-fill { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #8bdcf4, #38add9); box-shadow: 0 0 12px rgba(63, 183, 222, .48); transition: width .7s ease; }
.progress-dates { display: flex; justify-content: space-between; margin-top: 7px; color: rgba(58, 121, 151, .76); font: 500 10px/1 var(--font-display); letter-spacing: .1em; }
.quote { min-height: 26px; margin: 28px 0 0; color: #225f86; font-size: 14px; letter-spacing: .08em; }

.footer {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: end;
  padding: 18px 24px 20px;
  border: 1px solid rgba(255, 255, 255, .3);
  color: #ffffff;
  background: rgba(225, 247, 255, .1);
  box-shadow: 0 10px 28px rgba(7, 66, 117, .08), inset 0 1px 0 rgba(255, 255, 255, .42);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  clip-path: polygon(0 12px, 12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px));
  font-size: 12px;
}
.footer > * { position: relative; z-index: 1; }
.footer::before {
  content: '';
  position: absolute;
  inset: 1px;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.1), transparent 42%);
}
.footer-links, .filings { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.footer-links a, .filing-link { display: inline-flex; align-items: center; gap: 7px; color: #ffffff; font-weight: 700; text-decoration: none; text-underline-offset: 3px; text-shadow: 0 1px 4px rgba(3, 54, 102, .62); }
.footer-links a:hover, .footer-links a:focus-visible, .filing-link:hover, .filing-link:focus-visible { color: #ffffff; text-decoration: none; }
.rainyun-icon { width: 24px; height: 19px; flex: 0 0 auto; color: #ffffff; filter: drop-shadow(0 1px 2px rgba(3, 54, 102, .35)); }
.footer-label { font-weight: 700; letter-spacing: .12em; }
.filings { display: grid; justify-items: center; gap: 6px; justify-content: center; color: #ffffff; text-shadow: 0 1px 4px rgba(3, 54, 102, .62); }
.copyright { margin: 0; text-align: right; color: #ffffff; text-shadow: 0 1px 4px rgba(3, 54, 102, .62); }

.fullscreen-controls {
  position: fixed;
  z-index: 10;
  top: 22px;
  right: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity .25s ease, transform .25s ease;
}
.fullscreen-controls.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.fullscreen-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.7);
  color: var(--ink);
  background: rgba(240, 252, 255, .78);
  box-shadow: 0 10px 30px rgba(4, 58, 82, .18);
  transition: transform .2s ease, background .2s ease;
}
.fullscreen-control:hover, .fullscreen-control:focus-visible { transform: translateY(-2px); background: var(--glass-strong); outline: none; }
.fullscreen-control span:first-child { font-size: 20px; line-height: .8; }

.image-status { position: fixed; right: 18px; bottom: 18px; z-index: 4; color: rgba(255,255,255,.95); font-size: 12px; opacity: 0; transition: opacity .2s ease; text-shadow: 0 1px 3px rgba(0,0,0,.28); }
.image-status.is-visible { opacity: 1; }

.site-shell.is-fullscreen .topbar,
.site-shell.is-fullscreen .quote,
.site-shell.is-fullscreen .footer,
.site-shell.is-fullscreen .eyebrow,
.site-shell.is-fullscreen .target-date { display: none; }
.site-shell.is-fullscreen .main-content { width: 100%; padding: 0; }
.site-shell.is-fullscreen {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  height: 100dvh;
  min-height: 100dvh;
}
.site-shell.is-fullscreen .backdrop {
  object-fit: cover;
  background: #9edff2;
}
.site-shell.is-fullscreen .countdown-panel { width: auto; padding: 24px; border: 0; background: transparent; box-shadow: none; backdrop-filter: none; clip-path: none; }
.site-shell.is-fullscreen .countdown { gap: clamp(8px, 2.6vw, 34px); }
.site-shell.is-fullscreen .total-seconds { margin-top: 30px; color: rgba(239, 253, 255, .95); text-shadow: 0 2px 10px rgba(0, 42, 63, .55); }
.site-shell.is-fullscreen .progress-section { display: block; margin-top: 28px; }
.site-shell.is-fullscreen .progress-heading { color: rgba(242, 253, 255, .92); text-shadow: 0 2px 8px rgba(0, 42, 63, .48); }
.site-shell.is-fullscreen .progress-heading strong { color: #ffffff; text-shadow: 0 2px 8px rgba(0, 42, 63, .5); }
.site-shell.is-fullscreen .progress-track { border-color: rgba(255,255,255,.82); background: rgba(9, 83, 125, .34); box-shadow: inset 0 1px 3px rgba(0, 42, 63, .25); }
.site-shell.is-fullscreen .progress-fill { background: linear-gradient(90deg, #b7efff, #58c2e8); box-shadow: 0 0 14px rgba(146, 231, 255, .72); }
.site-shell.is-fullscreen .progress-dates { color: rgba(242, 253, 255, .9); text-shadow: 0 2px 8px rgba(0, 42, 63, .48); }
.site-shell.is-fullscreen .time-value { color: #f4fdff; text-shadow: 0 3px 0 rgba(22, 93, 115, .48), 0 12px 30px rgba(0, 36, 58, .48); }
.site-shell.is-fullscreen .time-label, .site-shell.is-fullscreen .time-separator { color: rgba(239, 253, 255, .92); text-shadow: 0 2px 7px rgba(0, 42, 63, .45); }

@media (max-width: 700px) {
  .topbar, .footer, .main-content { width: min(100% - 28px, 1180px); }
  .topbar { padding-top: 18px; }
  .brand-copy small { display: none; }
  .text-button { padding-inline: 12px; }
  .main-content { padding: 24px 0 34px; }
  .countdown-panel { padding-inline: 14px; }
  .target-date { margin-bottom: 28px; font-size: 12px; letter-spacing: .08em; }
  .countdown { gap: 1px; }
  .time-unit { min-width: 0; flex: 1 1 0; }
  .time-value { font-size: clamp(38px, 12vw, 78px); letter-spacing: 0; }
  .time-label { margin-top: 11px; font-size: 10px; letter-spacing: .12em; }
  .time-separator {
    flex-basis: 14px;
    width: 14px;
    height: clamp(30px, 7.2vw, 56px);
    font-size: clamp(28px, 8vw, 50px);
  }
  .progress-section { margin-top: 24px; }
  .footer { grid-template-columns: 1fr; gap: 13px; padding-bottom: 18px; text-align: center; }
  .footer-links, .filings { justify-content: center; }
  .copyright { text-align: center; font-size: 11px; }
  .site-shell.is-fullscreen .countdown-panel { width: 100%; padding-inline: 10px; }
  .site-shell.is-fullscreen .countdown { gap: 1px; }
  .site-shell.is-fullscreen .time-value { font-size: clamp(38px, 12vw, 78px); letter-spacing: 0; }
  .site-shell.is-fullscreen .time-separator { flex-basis: 14px; width: 14px; height: clamp(30px, 7.2vw, 56px); font-size: clamp(28px, 8vw, 50px); }
  .site-shell.is-fullscreen .total-seconds { margin-top: 24px; }
  .site-shell.is-fullscreen .progress-section { margin-top: 22px; }
  .fullscreen-controls { top: 14px; right: 14px; gap: 5px; }
  .fullscreen-control { gap: 5px; padding: 8px 10px; font-size: 11px; }
  .fullscreen-control span:first-child { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
