/* ============ EZ4TIME · 深色科技风 ============ */
:root {
  --bg: #05070f;
  --bg-soft: #0a0e1c;
  --text: #e6edf7;
  --text-dim: #8b96ad;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --violet: #8b5cf6;
  --line: rgba(120, 150, 200, 0.14);
  --card: rgba(16, 22, 40, 0.55);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ---------- 背景层 ---------- */
#bg {
  position: fixed;
  inset: 0;
  z-index: -2;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% 35%, transparent 40%, rgba(3, 5, 12, 0.85) 100%),
    linear-gradient(rgba(120, 160, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 160, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
}

/* ---------- 导航 ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.2rem, 4vw, 3rem);
  background: linear-gradient(rgba(5, 7, 15, 0.85), transparent);
}

.logo {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  color: var(--text);
  text-decoration: none;
}

.logo em {
  font-style: normal;
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(34, 211, 238, 0.8);
}

/* ---------- 首屏 ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5.5rem 1.2rem 3rem;
  position: relative;
}

.greeting {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  color: var(--cyan);
  opacity: 0.85;
  margin-bottom: 1.2rem;
  animation: fadeDown 0.9s ease both;
}

/* 时钟舞台 */
.clock-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.2rem 1rem;
  animation: fadeUp 1s 0.15s ease both;
}

.glow {
  position: absolute;
  width: min(70vw, 620px);
  height: min(70vw, 620px);
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(59, 130, 246, 0.16) 0%,
    rgba(139, 92, 246, 0.07) 45%,
    transparent 70%);
  animation: breathe 6s ease-in-out infinite;
  pointer-events: none;
}

.orbit {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.orbit-a {
  width: min(78vw, 560px);
  height: min(78vw, 560px);
  border: 1px dashed rgba(34, 211, 238, 0.25);
  animation: spin 40s linear infinite;
}

.orbit-a::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px 3px rgba(34, 211, 238, 0.7);
}

.orbit-b {
  width: min(92vw, 680px);
  height: min(92vw, 680px);
  border: 1px solid rgba(139, 92, 246, 0.12);
  border-top-color: rgba(139, 92, 246, 0.45);
  animation: spin 70s linear infinite reverse;
}

.clock {
  font-family: Consolas, "SF Mono", "Courier New", monospace;
  font-size: clamp(3.2rem, 13vw, 8.5rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.1;
  background: linear-gradient(120deg, #7dd3fc 0%, #22d3ee 35%, #818cf8 75%, #c084fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(56, 130, 246, 0.35));
  font-variant-numeric: tabular-nums;
}

.clock .ms {
  font-size: 0.28em;
  color: rgba(139, 160, 200, 0.75);
  -webkit-background-clip: initial;
  background: none;
  -webkit-text-fill-color: currentColor;
  letter-spacing: 0.05em;
}

.date {
  margin-top: 0.6rem;
  color: var(--text-dim);
  font-size: clamp(0.9rem, 2.4vw, 1.05rem);
  letter-spacing: 0.25em;
}

.detect {
  margin-top: 0.7rem;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  color: rgba(34, 211, 238, 0.65);
  min-height: 1em;
}

/* 标语打字机 */
.tagline {
  margin-top: 1.6rem;
  font-size: clamp(1.15rem, 3.4vw, 1.7rem);
  font-weight: 600;
  min-height: 1.8em;
  letter-spacing: 0.04em;
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 4px;
  vertical-align: -0.15em;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.9);
  animation: blink 1s step-end infinite;
}

.sub {
  margin-top: 0.9rem;
  color: var(--text-dim);
  font-size: 0.95rem;
  max-width: 34em;
  animation: fadeUp 1s 0.5s ease both;
}

/* 时间进度条 */
.progress-wrap {
  margin-top: 2.4rem;
  width: min(88vw, 460px);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  animation: fadeUp 1s 0.7s ease both;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.progress-label {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  width: 2.6em;
  text-align: left;
  flex-shrink: 0;
}

.progress-track {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(120, 150, 200, 0.15);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.6);
  transition: width 0.6s ease;
}

.progress-num {
  font-family: Consolas, monospace;
  font-size: 0.8rem;
  color: var(--cyan);
  width: 4.5em;
  text-align: right;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* ---------- 动画 ---------- */
@keyframes spin { to { transform: rotate(360deg); } }

@keyframes blink { 50% { opacity: 0; } }

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.8; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: none; }
}

/* 尊重系统"减少动态效果"设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
