
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

:root {
  --bg-1: #4facfe;
  --bg-2: #00f2fe;
  --bg-3: #667eea;
  --bg-overlay: rgba(12, 20, 38, 0.72);
  --text-primary: rgba(255, 255, 255, 0.98);
  --text-secondary: rgba(255, 255, 255, 0.90);
  --text-tertiary: rgba(255, 255, 255, 0.84);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-hover: rgba(255, 255, 255, 0.14);
  --glass-active: rgba(255, 255, 255, 0.10);
  --panel-bg: rgba(20, 30, 50, 0.85);
  --panel-strong: rgba(12, 20, 38, 0.72);
  --hover-soft: rgba(255, 255, 255, 0.08);
  --divider: rgba(255, 255, 255, 0.06);
  --bar-track: rgba(255, 255, 255, 0.10);
  --bar-fill: rgba(255, 255, 255, 0.60);
  --active-fill: rgba(255, 255, 255, 0.20);
  --ring: rgba(255, 255, 255, 0.30);
  --ring-soft: rgba(255, 255, 255, 0.06);
  --focus-ring: rgba(255, 255, 255, 0.90);
  --code-bg: rgba(0, 0, 0, 0.25);
  --error-text: rgba(255, 190, 190, 0.95);
  --stale: #f3c078;
  --arc: rgba(255, 255, 255, 0.24);
  --sun-arc: rgba(255, 255, 255, 0.42);
  --sun-fill: rgba(255, 216, 155, 0.10);
  --sun-core: #fff3cf;
  --sun-mid: #ffcf6b;
  --sun-edge: #e0901a;
  --sun-rim: rgba(255, 220, 160, 0.28);
  --sun-glow: rgba(255, 170, 50, 0.24);
  --scrim: rgba(5, 12, 24, 0.62);
  --chart-line: rgba(255, 255, 255, 0.94);
  --chart-fill: rgba(255, 255, 255, 0.16);
  --chart-grid: rgba(255, 255, 255, 0.14);
  --uv-low: rgba(90, 175, 255, 0.30);
  --uv-moderate: rgba(80, 205, 140, 0.30);
  --uv-high: rgba(245, 195, 70, 0.30);
  --uv-very-high: rgba(250, 140, 80, 0.30);
  --uv-extreme: rgba(235, 100, 130, 0.30);
  --radius: 24px;
  --radius-sm: 16px;
  --radius-xs: 12px;
  --transition: 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  color-scheme: dark;
}

html[data-appearance="light"] {
  --bg-overlay: rgba(255, 255, 255, 0.66);
  --text-primary: #0b1524;
  --text-secondary: rgba(11, 21, 36, 0.86);
  --text-tertiary: rgba(11, 21, 36, 0.78);
  --glass-bg: rgba(255, 255, 255, 0.46);
  --glass-border: rgba(11, 21, 36, 0.16);
  --glass-hover: rgba(255, 255, 255, 0.66);
  --glass-active: rgba(255, 255, 255, 0.56);
  --panel-bg: rgba(255, 255, 255, 0.94);
  --panel-strong: rgba(255, 255, 255, 0.90);
  --hover-soft: rgba(11, 21, 36, 0.06);
  --divider: rgba(11, 21, 36, 0.10);
  --bar-track: rgba(11, 21, 36, 0.14);
  --bar-fill: rgba(11, 21, 36, 0.55);
  --active-fill: rgba(11, 21, 36, 0.12);
  --ring: rgba(11, 21, 36, 0.45);
  --ring-soft: rgba(11, 21, 36, 0.10);
  --focus-ring: rgba(11, 21, 36, 0.85);
  --code-bg: rgba(11, 21, 36, 0.08);
  --error-text: #8a2233;
  --stale: #7a4b00;
  --arc: rgba(11, 21, 36, 0.30);
  --sun-arc: rgba(11, 21, 36, 0.46);
  --sun-fill: rgba(138, 79, 0, 0.08);
  --sun-core: #fffdf6;
  --sun-mid: #ffe08a;
  --sun-edge: #f5a623;
  --sun-rim: rgba(96, 52, 4, 0.62);
  --sun-glow: rgba(255, 176, 60, 0.38);
  --scrim: rgba(10, 20, 40, 0.50);
  --chart-line: rgba(11, 21, 36, 0.92);
  --chart-fill: rgba(11, 21, 36, 0.12);
  --chart-grid: rgba(11, 21, 36, 0.16);
  --uv-low: rgba(0, 110, 210, 0.22);
  --uv-moderate: rgba(0, 140, 80, 0.22);
  --uv-high: rgba(190, 130, 0, 0.24);
  --uv-very-high: rgba(200, 70, 20, 0.24);
  --uv-extreme: rgba(175, 30, 60, 0.24);
  --shadow: 0 8px 32px rgba(20, 40, 80, 0.16);
  color-scheme: light;
}

html { font-size: 16px; scroll-behavior: smooth; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: calc(16px + env(safe-area-inset-left));
  top: -64px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: 999px;
  background: #0d1b2a;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-3);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 1;
  transition: opacity 0.9s var(--ease-out-quart);
  pointer-events: none;
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2) 50%, var(--bg-3));
}

#bgLayerNext,
#bgLayerThird { opacity: 0; }

.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg-overlay);
  transition: background-color 0.9s var(--ease-out-quart);
  backdrop-filter: blur(60px);
  -webkit-backdrop-filter: blur(60px);
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  z-index: -2;
  pointer-events: none;
  transition: all 2s ease;
}
.orb-1 { width: 400px; height: 400px; background: var(--bg-1); top: -100px; left: -100px; animation: float1 20s ease-in-out infinite; }
.orb-2 { width: 500px; height: 500px; background: var(--bg-2); bottom: -150px; right: -150px; animation: float2 25s ease-in-out infinite; }

@keyframes float1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(80px, 60px); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-60px, -40px); }
}

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding:
    calc(24px + env(safe-area-inset-top))
    calc(20px + env(safe-area-inset-right))
    calc(60px + env(safe-area-inset-bottom))
    calc(20px + env(safe-area-inset-left));
  position: relative;
  z-index: 1;
}

.section-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  user-select: none;
}
.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

footer {
  text-align: center;
  padding: 24px 0;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}
footer a {
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 4px;
  transition: color 0.2s ease;
}
footer a:hover {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
footer a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.prefs-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 28px;
}
.seg {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  background: var(--glass-bg);
}
.seg button {
  border: 0;
  background: none;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 100px;
  cursor: pointer;
  transition: var(--transition);
}
.seg button[aria-pressed="true"] {
  background: var(--active-fill);
  color: var(--text-primary);
}
.seg button:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* AdSense 自适应广告位：先预留高度避免填充时跳动；未填充由页面脚本收敛 */
.ad-slot {
  display: block;
  width: 100%;
  min-height: 280px;
  margin: 32px 0 8px;
  overflow: hidden;
}
.ad-slot .adsbygoogle {
  display: block;
  width: 100%;
  min-height: inherit;
}
.ad-slot.is-empty {
  min-height: 0;
  height: 0;
  margin: 0;
}

@media (max-width: 400px) {
  .ad-slot {
    min-height: 250px;
    margin: 24px 0 8px;
  }
}

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