/* ============================================================
   time.chinesedream.online — style.css
   ============================================================ */
:root {
  --bg: #05080d;
  --bg-2: #080d14;
  --panel: rgba(255, 255, 255, 0.035);
  --line: rgba(120, 200, 230, 0.14);
  --line-soft: rgba(255, 255, 255, 0.07);
  --text: #e8f1f5;
  --dim: rgba(232, 241, 245, 0.55);
  --cyan: #4fd1c5;
  --cyan-2: #7ff0e2;
  --amber: #ffb454;
  --red: #ff4d64;
  --mono: "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--cyan-2); }

h1, h2, h3 { margin: 0 0 .6em; line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: .02em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; color: var(--dim); }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: rgba(232, 241, 245, 0.35); }
.small { font-size: .84rem; }

/* ---------- 背景 ---------- */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(79, 209, 197, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 209, 197, 0.055) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
}
.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}
.glow--a { width: 620px; height: 620px; background: rgba(79, 209, 197, 0.16); top: -220px; right: -160px; }
.glow--b { width: 520px; height: 520px; background: rgba(255, 180, 84, 0.10); bottom: -220px; left: -180px; }

main, .top, .foot { position: relative; z-index: 2; }

/* ---------- 顶栏 ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  width: min(100% - 3rem, var(--max));
  margin: 0 auto;
  padding: 1.5rem 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--text);
  font-family: var(--mono);
  letter-spacing: .28em;
  font-size: .95rem;
}
.brand small {
  display: block;
  font-family: var(--sans);
  font-size: .6rem;
  letter-spacing: .18em;
  color: var(--dim);
  margin-top: 2px;
  letter-spacing: .06em;
}
.brand__dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(79, 209, 197, .14), 0 0 18px var(--cyan);
  animation: blink 2.4s ease-in-out infinite;
}
.top__nav { display: flex; align-items: center; gap: 1.3rem; }
.top__nav a { font-size: .84rem; color: var(--dim); }
.top__nav a:hover { color: var(--cyan-2); }
.top__back {
  padding: .45rem .9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

/* ---------- 英雄 ---------- */
.hero {
  width: min(100% - 3rem, var(--max));
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) 0 2rem;
  text-align: center;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .35rem .9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(79, 209, 197, .06);
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .22em;
  color: var(--cyan);
}
.pill i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}
.hero h1 { margin: 1.1rem 0 .6rem; }
.hero h1 span {
  background: linear-gradient(100deg, var(--cyan), #b5f5ec 40%, var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__desc { max-width: 60ch; margin: 0 auto 2.4rem; }
.hero__desc b { color: var(--amber); }

.big-clock {
  position: relative;
  padding: clamp(1.6rem, 4vw, 2.8rem) 1rem;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    radial-gradient(700px 240px at 50% 0%, rgba(79, 209, 197, .10), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .01));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 40px 90px -60px rgba(79, 209, 197, .8);
  overflow: hidden;
}
.big-clock::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(79, 209, 197, .05) 50%, transparent);
  animation: scan 6s linear infinite;
  pointer-events: none;
}
.big-clock__time {
  font-family: var(--mono);
  font-size: clamp(2.6rem, 10vw, 6.4rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: .02em;
  color: #f2fbff;
  text-shadow: 0 0 40px rgba(79, 209, 197, .55);
  font-variant-numeric: tabular-nums;
}
.big-clock__time .ms {
  font-size: .42em;
  color: var(--cyan);
  letter-spacing: 0;
}
.big-clock__date {
  margin-top: .9rem;
  font-size: clamp(.85rem, 1.6vw, 1rem);
  letter-spacing: .16em;
  color: var(--dim);
}
.big-clock__label {
  margin-top: .5rem;
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .3em;
  color: rgba(79, 209, 197, .7);
}

.clock-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .8rem;
  margin-top: 1rem;
}
.clock-card {
  padding: 1rem .8rem;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: var(--panel);
  text-align: left;
}
.clock-card__label { font-size: .72rem; letter-spacing: .1em; color: var(--dim); }
.clock-card__time {
  font-family: var(--mono);
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: var(--text);
  margin: .25rem 0 .1rem;
  font-variant-numeric: tabular-nums;
}
.clock-card__zone { font-family: var(--mono); font-size: .62rem; color: rgba(79, 209, 197, .65); }

/* ---------- 校准 ---------- */
.calib {
  margin-top: 1.2rem;
  padding: 1.3rem 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--line-soft);
  background: var(--panel);
  text-align: left;
}
.calib__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.calib__label { font-size: .76rem; letter-spacing: .14em; color: var(--dim); display: block; }
.calib__value {
  font-family: var(--mono);
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  color: var(--cyan-2);
  margin-top: .2rem;
}
.calib__value.is-bad { color: var(--red); }
.calib__value.is-good { color: var(--cyan-2); }
.calib__bar {
  height: 4px;
  margin-top: 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  overflow: hidden;
}
.calib__bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
  transition: width .5s ease;
}
.calib__note { font-size: .76rem; margin: .8rem 0 0; color: rgba(232, 241, 245, .38); }

.btn {
  padding: .6rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(79, 209, 197, .08);
  color: var(--cyan-2);
  font-family: inherit;
  font-size: .82rem;
  letter-spacing: .08em;
  cursor: pointer;
  transition: background .3s, border-color .3s, transform .3s;
}
.btn:hover { background: rgba(79, 209, 197, .16); border-color: var(--cyan); transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: wait; }

/* ---------- 区块 ---------- */
.section {
  width: min(100% - 3rem, var(--max));
  margin: 0 auto;
  padding: clamp(3.4rem, 8vw, 6rem) 0;
}
.sec-head { max-width: 70ch; margin-bottom: 2.2rem; }
.kicker {
  display: inline-block;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .3em;
  color: var(--cyan);
  margin-bottom: .8rem;
}
.sec-head h2 span { color: var(--cyan); }
.sec-head p { margin-bottom: 0; }

/* ---------- 状态格 ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .9rem;
}
.stat {
  padding: 1.15rem 1.25rem;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: var(--panel);
}
.stat__label { display: block; font-size: .7rem; letter-spacing: .14em; color: var(--dim); margin-bottom: .35rem; }
.stat__value { font-size: .95rem; color: var(--text); word-break: break-all; }

/* ---------- 表格 ---------- */
.table-wrap {
  margin-top: 1.4rem;
  border-radius: 16px;
  border: 1px solid var(--line-soft);
  background: var(--panel);
  overflow: hidden;
}
.table-title {
  padding: .9rem 1.2rem;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .24em;
  color: var(--cyan);
  border-bottom: 1px solid var(--line-soft);
}
.tbl { width: 100%; border-collapse: collapse; font-size: .84rem; }
.tbl th, .tbl td { padding: .62rem 1.1rem; text-align: left; border-bottom: 1px solid var(--line-soft); }
.tbl th {
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .16em;
  color: var(--dim);
  font-weight: 500;
  text-transform: uppercase;
}
.tbl td { font-family: var(--mono); font-size: .8rem; color: rgba(232, 241, 245, .78); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl--mini th { width: 32%; }

/* ---------- Tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.tab {
  padding: .55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: transparent;
  color: var(--dim);
  font-family: inherit;
  font-size: .82rem;
  cursor: pointer;
  transition: all .3s;
}
.tab:hover { color: var(--text); border-color: var(--line); }
.tab.is-active {
  color: #04120f;
  background: linear-gradient(100deg, var(--cyan), #9cf3e7);
  border-color: transparent;
  font-weight: 600;
}
.code-panel { display: none; }
.code-panel.is-active { display: block; animation: fade .4s ease; }
.steps { margin: 0 0 1rem; padding-left: 1.3rem; color: var(--dim); font-size: .9rem; }
.steps li { margin-bottom: .35rem; }
pre {
  margin: 0 0 1rem;
  padding: 1.2rem 1.3rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .45);
  overflow-x: auto;
}
pre code {
  font-family: var(--mono);
  font-size: .82rem;
  color: #b7f5ec;
  line-height: 1.8;
}
code {
  font-family: var(--mono);
  font-size: .85em;
  padding: .1em .35em;
  border-radius: 5px;
  background: rgba(79, 209, 197, .10);
  color: var(--cyan-2);
}
pre code { background: none; padding: 0; }
.tip { font-size: .82rem; color: rgba(232, 241, 245, .45); }

.note {
  margin-top: 1.6rem;
  padding: 1.2rem 1.4rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 180, 84, .25);
  background: rgba(255, 180, 84, .06);
  font-size: .88rem;
  color: rgba(255, 224, 186, .85);
}
.note b { color: var(--amber); }

/* ---------- 说明 ---------- */
.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.6rem, 4vw, 3.4rem);
}
.prose h3 { color: var(--text); margin-top: 1.4rem; }
.prose h3:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2rem; color: var(--dim); font-size: .92rem; }
.prose li { margin-bottom: .45rem; }
.prose .tbl { border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; }

/* ---------- 页脚 ---------- */
.foot {
  border-top: 1px solid var(--line-soft);
  padding: 1.8rem 0 2.4rem;
  margin-top: 2rem;
}
.foot__inner {
  width: min(100% - 3rem, var(--max));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: .8rem 1.6rem;
  justify-content: space-between;
  font-size: .76rem;
  color: rgba(232, 241, 245, .38);
}

/* ---------- 动画 ---------- */
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes scan { 0% { transform: translateY(-100%); } 100% { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 940px) {
  .clock-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols { grid-template-columns: 1fr; }
  .top__nav a:not(.top__back) { display: none; }
}
@media (max-width: 560px) {
  .clock-row { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .big-clock__time { font-size: clamp(2.4rem, 15vw, 3.4rem); }
}
