/* ════════════════════════════════════════════════════════════
   HERMES.NZ v2 — Vision Pro / Linear 风格
   克制的高级感 · 空间玻璃深度 · 真 3D 背景
   ──────────────────────────────────────────────────────────── */

:root {
  /* ── 调色板：克制、不堆砌 ── */
  --ink-0: #050608;
  --ink-1: #0a0c10;
  --ink-2: #11141a;
  --ink-3: #181c24;
  --ink-4: #232831;

  --fg:        #e8edf5;
  --fg-soft:   #b4bcc8;
  --fg-dim:    #6b7280;
  --fg-muted:  #4b5260;
  --fg-faint:  #2a2f3a;

  /* accent — 高级蓝（不是霓虹） */
  --accent:        #4a6cff;
  --accent-soft:   rgba(74, 108, 255, 0.12);
  --accent-glow:   rgba(74, 108, 255, 0.35);
  --accent-line:   rgba(74, 108, 255, 0.45);

  /* 辅色 — 暖金（克制使用） */
  --gold:        #c9a87a;
  --gold-soft:   rgba(201, 168, 122, 0.15);

  /* 状态 */
  --green: #4ade80;
  --green-soft: rgba(74, 222, 128, 0.15);
  --red:   #f87171;
  --red-soft: rgba(248, 113, 113, 0.15);

  /* 玻璃 */
  --glass-1: rgba(17, 20, 26, 0.55);
  --glass-2: rgba(17, 20, 26, 0.72);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-border-hover: rgba(255, 255, 255, 0.12);
  --glass-highlight: rgba(255, 255, 255, 0.04);

  /* 字体 */
  --font-display: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  --font-sans:    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
  --font-jp:      'Hiragino Sans', 'Yu Gothic', 'Meiryo', 'PingFang SC', sans-serif;
  --font-mono:    'SF Mono', 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Source Code Pro', 'Courier New', monospace;

  /* 过渡曲线 */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* 层级 */
  --z-bg: 0;
  --z-content: 10;
  --z-header: 100;
  --z-modal: 1000;
}

/* ── 重置 ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--ink-0);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -0.005em;
  overflow-x: hidden;
  position: relative;
}

/* ── 3D 背景画布 ── */
#bg-3d {
  position: fixed;
  inset: 0;
  z-index: var(--z-bg);
  pointer-events: none;
}

#bg-3d-canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* ── 内容层 — 浮在 3D 之上 ── */
.content-layer {
  position: relative;
  z-index: var(--z-content);
}

/* ── 全局装饰：细微光晕 / 顶部 vignette ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(74, 108, 255, 0.08), transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(201, 168, 122, 0.05), transparent 60%),
    linear-gradient(180deg, transparent 0%, rgba(5, 6, 8, 0.4) 100%);
}

::selection {
  background: var(--accent-soft);
  color: var(--fg);
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--ink-3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }

/* ════════════════════════════════════════════════════════════
   HEADER
   ──────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  padding: 18px 0;
  background: rgba(5, 6, 8, 0.5);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.3s var(--ease-out);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--fg);
  transition: opacity 0.2s;
}

.brand:hover { opacity: 0.8; }

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #7c5cff);
  display: grid;
  place-items: center;
  color: white;
  font-family: var(--font-jp);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 16px -4px var(--accent-glow);
  position: relative;
  overflow: hidden;
}

.brand-mark::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 50%, rgba(255, 255, 255, 0.15));
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.brand-sub {
  font-family: var(--font-jp);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--fg-dim);
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--fg-soft);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 8px;
  transition: all 0.2s var(--ease-out);
  position: relative;
}

.nav-link:hover {
  color: var(--fg);
  background: var(--high-light, rgba(255, 255, 255, 0.04));
}

.nav-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--green);
  padding: 6px 10px 6px 8px;
  border-radius: 100px;
  background: var(--green-soft);
  border: 1px solid rgba(74, 222, 128, 0.2);
  margin-left: 8px;
}

.nav-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@media (max-width: 768px) {
  .header-inner { gap: 12px; }
  .nav-link { padding: 6px 10px; font-size: 12px; }
  .nav-status { padding: 5px 8px 5px 6px; font-size: 11px; }
}

@media (max-width: 540px) {
  .brand-text { display: none; }
}

/* ════════════════════════════════════════════════════════════
   HERO — 自由布局，不再三等分
   ──────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-inner > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 80px 0 60px; }
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 28px;
  padding: 6px 12px;
  border: 1px solid var(--accent-line);
  border-radius: 100px;
  background: var(--accent-soft);
}

.hero-tag svg { width: 12px; height: 12px; }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.5vw, 4.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
  color: var(--fg);
}

.hero-title .accent {
  background: linear-gradient(135deg, var(--accent) 0%, #7c5cff 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: gradientFlow 8s ease-in-out infinite;
}

@keyframes gradientFlow {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.hero-desc {
  font-size: 17px;
  line-height: 1.6;
  color: var(--fg-soft);
  max-width: 560px;
  margin-bottom: 36px;
}

.hero-desc code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--fg);
  background: var(--ink-2);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--glass-border);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.005em;
  padding: 11px 20px;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s var(--ease-out);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

.btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: var(--fg);
  color: var(--ink-0);
  border-color: var(--fg);
}
.btn-primary:hover {
  background: var(--accent);
  color: var(--fg);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -8px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--fg-soft);
  border-color: var(--glass-border);
}
.btn-ghost:hover {
  background: var(--ink-2);
  color: var(--fg);
  border-color: var(--glass-border-hover);
}

/* ── 右侧实时面板 ── */
.hero-side {
  position: relative;
  padding: 20px 22px;
  background: rgba(17, 20, 26, 0.65);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  box-shadow:
    0 1px 0 var(--glass-highlight) inset,
    0 24px 60px -20px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03);
  transform: perspective(1200px) rotateY(-3deg) rotateX(2deg);
  transition: transform 0.6s var(--ease-out);
  /* 限制最大高度 + 自身内容居中 */
  max-height: 280px;
}

.hero-side:hover {
  transform: perspective(1200px) rotateY(0deg) rotateX(0deg);
}

.hero-side-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--glass-border);
}

.hero-side-title {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-soft);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-side-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: dotPulse 1.5s ease-in-out infinite;
}

.hero-side-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 5px 0;
  border-bottom: 1px dashed var(--fg-faint);
}

.hero-stat:last-child { border-bottom: none; }

.hero-stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-stat-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 960px) {
  .hero-side {
    transform: none;
  }
}

/* ════════════════════════════════════════════════════════════
   SECTION
   ──────────────────────────────────────────────────────────── */
.section {
  position: relative;
  padding: 60px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 36px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--glass-border);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.section-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.section-title-zh {
  font-family: var(--font-jp);
  font-size: 13px;
  color: var(--fg-dim);
  margin-left: 4px;
}

.section-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
  letter-spacing: 0.05em;
}

@media (max-width: 640px) {
  .section { padding: 40px 0; }
  .section-title { font-size: 22px; }
  .section-hint { display: none; }
}

/* ════════════════════════════════════════════════════════════
   GLASS CARD (通用)
   ──────────────────────────────────────────────────────────── */
.glass {
  position: relative;
  background: var(--glass-1);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  overflow: hidden;
  transition: all 0.3s var(--ease-out);
  box-shadow:
    0 1px 0 var(--glass-highlight) inset,
    0 8px 24px -8px rgba(0, 0, 0, 0.3);
}

.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 40%, transparent 60%, rgba(255, 255, 255, 0.02));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ════════════════════════════════════════════════════════════
   MARKET — 非对称布局
   ──────────────────────────────────────────────────────────── */
.market-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 16px;
}

@media (max-width: 900px) { .market-grid { grid-template-columns: 1fr; } }

.market-card {
  padding: 22px 24px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.market-card.featured {
  background: var(--glass-2);
}

.market-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.market-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-soft);
}

.market-name-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--ink-3);
  display: grid;
  place-items: center;
  color: var(--accent);
  border: 1px solid var(--glass-border);
}

.market-name-icon svg { width: 14px; height: 14px; }

.market-name-icon.gold { color: var(--gold); background: var(--gold-soft); }

.market-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border-radius: 100px;
  text-transform: uppercase;
}

.badge-live {
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid rgba(74, 222, 128, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-live::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: dotPulse 1.2s ease-in-out infinite;
}

.badge-closed {
  color: var(--fg-dim);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
}

.badge-pre {
  color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid rgba(201, 168, 122, 0.3);
}

.market-price {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
  margin-bottom: 8px;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.market-price .unit {
  font-size: 13px;
  font-weight: 400;
  color: var(--fg-dim);
  letter-spacing: 0;
}

.market-price.gold {
  background: linear-gradient(135deg, var(--gold), #e8c39e);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.market-change {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 14px;
}

.market-change .pct { color: var(--fg-dim); font-size: 12px; }

.up   { color: var(--red); }
.down { color: var(--green); }

.market-info {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}

.market-info .kv strong {
  color: var(--fg-soft);
  font-weight: 500;
  margin-left: 3px;
}

.market-chart {
  flex: 1;
  min-height: 80px;
  height: 80px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--fg-faint);
  position: relative;
}

.market-chart canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.market-card.flash {
  animation: cardFlash 0.5s var(--ease-out);
}

@keyframes cardFlash {
  0%   { background: var(--accent-soft); }
  100% { background: var(--glass-1); }
}

/* ════════════════════════════════════════════════════════════
   INFO — 天气 + 时间 + 系统（2 列布局，密度均匀）
   ──────────────────────────────────────────────────────────── */
.info-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .info-layout { grid-template-columns: 1fr; }
}

/* ── 天气 ── */
.weather {
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
}

.weather::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
}

.weather-top {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
}

.weather-icon-box {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: var(--ink-2);
  border: 1px solid var(--glass-border);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.weather-icon-box svg { width: 40px; height: 40px; }
.weather-icon-box line,
.weather-icon-box circle,
.weather-icon-box path,
.weather-icon-box polyline,
.weather-icon-box rect {
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.weather-icon-box .filled { fill: var(--accent); opacity: 0.3; }

.weather-main {
  flex: 1;
  min-width: 0;
}

.weather-temp {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--fg);
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}

.weather-temp .deg {
  font-size: 28px;
  color: var(--fg-soft);
  font-weight: 300;
}

.weather-desc {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--fg-soft);
  margin-top: 6px;
}

.weather-feels {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-dim);
  margin-top: 4px;
  letter-spacing: 0.02em;
}

.weather-grid {
  display: grid;
  /* 改成 3 列 × 2 行，不再挤 */
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.wd-item {
  padding: 14px 16px;
  background: var(--ink-2);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  transition: all 0.2s var(--ease-out);
}

.wd-item:hover {
  border-color: var(--glass-border-hover);
  background: var(--ink-3);
}

.wd-label {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--fg-dim);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.wd-label svg { width: 12px; height: 12px; }

.wd-val {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.wd-val:empty::before,
.wd-val[data-empty="true"] {
  content: '—';
  color: var(--fg-faint);
  font-weight: 400;
}

@media (max-width: 720px) {
  .weather-grid { grid-template-columns: repeat(2, 1fr); }
  .weather-temp { font-size: 44px; }
  .weather-temp .deg { font-size: 22px; }
}

.weather-sun {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-soft);
}

.weather-sun .sun-time {
  color: var(--fg);
  font-weight: 500;
  margin-left: 8px;
}

.weather-sun svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }

.weather-hourly {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 4px 12px 0;
  margin: 0 -4px 20px -4px;
  scrollbar-width: thin;
}

.hourly-item {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: var(--ink-2);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  min-width: 56px;
  transition: all 0.2s;
}

.hourly-item:hover {
  background: var(--ink-3);
  border-color: var(--accent-line);
}

.hourly-time {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-dim);
  letter-spacing: 0.05em;
}

.hourly-icon svg { width: 18px; height: 18px; }
.hourly-icon line,
.hourly-icon circle,
.hourly-icon path,
.hourly-icon polyline { stroke: var(--accent); stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.hourly-temp {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg);
  font-weight: 500;
}

.weather-tomorrow {
  padding: 16px 20px;
  background: var(--ink-2);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.tmr-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.tmr-main {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--fg);
  font-weight: 500;
}

.tmr-temp {
  color: var(--fg);
  font-weight: 600;
  font-family: var(--font-mono);
}

.tmr-detail {
  display: flex;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
}

.tmr-cell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tmr-cell .tmr-icon {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
}

.tmr-cell > span:last-child {
  color: var(--fg-soft);
}

/* ── 右侧"Time + System"合并卡 ── */
.time-sys {
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-card-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--fg-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-card-label::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

.time-section {
  display: flex;
  flex-direction: column;
}

.time-display {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin-top: 12px;
}

.time-uptime {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
  margin-top: 8px;
  letter-spacing: 0.02em;
}

.sys-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 0;
}

.sys-section {
  display: flex;
  flex-direction: column;
}

.sys-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.sys-cell {
  padding: 10px 12px;
  background: var(--ink-2);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
}

.sys-cell-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.sys-cell-label svg { width: 12px; height: 12px; }
.sys-cell-label.cpu svg { color: var(--accent); }
.sys-cell-label.mem svg { color: #7c5cff; }
.sys-cell-label.disk svg { color: var(--gold); }
.sys-cell-label.oss svg { color: var(--green); }

.sys-cell-value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* ── 快捷链接 ── */
.sys-grid-quick {
  gap: 8px;
}

.sys-quick-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--ink-2);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--fg-soft);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s var(--ease-out);
}

.sys-quick-link:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  transform: translateY(-1px);
}

.sys-quick-link svg { flex-shrink: 0; }

/* ════════════════════════════════════════════════════════════
   PROJECTS — 自由卡片网格
   ──────────────────────────────────────────────────────────── */
.project-list {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.project-card {
  display: flex;
  flex-direction: column;
  padding: 28px 28px 24px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease-out);
}

.project-card.col-3 { grid-column: span 3; }
.project-card.col-2 { grid-column: span 2; }
.project-card.col-6 { grid-column: span 6; }

@media (max-width: 900px) {
  .project-list { grid-template-columns: 1fr; }
  .project-card.col-3, .project-card.col-2, .project-card.col-6 { grid-column: span 1; }
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--glass-border-hover);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.4);
}

.project-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, var(--accent-soft), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.project-card:hover::after { opacity: 1; }

.project-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--ink-2);
  border: 1px solid var(--glass-border);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  color: var(--accent);
  transition: all 0.3s;
}

.project-icon svg { width: 24px; height: 24px; }

.project-icon.gold { color: var(--gold); background: var(--gold-soft); }
.project-icon.green { color: var(--green); background: var(--green-soft); }

.project-card:hover .project-icon {
  transform: scale(1.05);
  border-color: var(--accent-line);
}

.project-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.project-title small {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--fg-dim);
  letter-spacing: 0.05em;
}

.project-desc {
  font-size: 14px;
  color: var(--fg-soft);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 20px;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--fg-dim);
  text-transform: uppercase;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
}

.project-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  transition: transform 0.3s;
}

.project-card:hover .project-arrow {
  transform: translateX(4px);
}

.project-arrow svg { width: 14px; height: 14px; }

/* ════════════════════════════════════════════════════════════
   FOOTER
   ──────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: 80px;
  padding: 32px 0;
  border-top: 1px solid var(--glass-border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--fg-dim);
  letter-spacing: 0.01em;
}

.footer-copy .sep { margin: 0 8px; color: var(--fg-faint); }

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--fg-dim);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--fg); }

/* ════════════════════════════════════════════════════════════
   CHAT
   ──────────────────────────────────────────────────────────── */
.chat-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 70px);
  max-width: 880px;
  margin: 0 auto;
  padding: 0 32px;
}

.chat-header {
  padding: 24px 0 16px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.chat-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.01em;
}

.chat-title-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: dotPulse 1.5s ease-in-out infinite;
}

.chat-models {
  display: inline-flex;
  background: var(--ink-2);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}

.chat-model {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 7px;
  color: var(--fg-dim);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.chat-model:hover { color: var(--fg-soft); }

.chat-model.active {
  background: var(--ink-0);
  color: var(--fg);
  box-shadow: 0 1px 0 var(--glass-highlight) inset, 0 2px 8px rgba(0, 0, 0, 0.2);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 28px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-behavior: smooth;
}

.msg {
  max-width: 85%;
  padding: 14px 18px;
  border-radius: 16px;
  line-height: 1.6;
  font-size: 14px;
  animation: msgIn 0.3s var(--ease-out);
  position: relative;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.msg.user {
  align-self: flex-end;
  background: var(--ink-2);
  border: 1px solid var(--glass-border);
  color: var(--fg);
  border-bottom-right-radius: 4px;
}

.msg.assistant {
  align-self: flex-start;
  background: var(--glass-1);
  border: 1px solid var(--glass-border);
  color: var(--fg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-left-radius: 4px;
}

.msg.reasoning {
  align-self: flex-start;
  background: var(--ink-2);
  border: 1px dashed var(--glass-border-hover);
  color: var(--fg-dim);
  font-size: 13px;
  font-style: italic;
  max-width: 90%;
  border-left: 2px solid var(--accent);
}

.msg-header {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--fg-dim);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.msg.user .msg-header { color: var(--accent); }
.msg.assistant .msg-header { color: var(--fg-soft); }
.msg.reasoning .msg-header { color: var(--gold); }

.msg-content { white-space: pre-wrap; word-break: break-word; }
.msg-content p { margin: 6px 0; }
.msg-content p:first-child { margin-top: 0; }
.msg-content p:last-child { margin-bottom: 0; }

.msg-content code {
  font-family: var(--font-mono);
  background: var(--ink-0);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  border: 1px solid var(--glass-border);
}

.msg-content pre {
  background: var(--ink-0);
  padding: 14px 16px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 10px 0;
  font-family: var(--font-mono);
  font-size: 0.85em;
  border: 1px solid var(--glass-border);
}

.msg-content pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--fg);
}

.msg-content strong { color: var(--accent); font-weight: 600; }
.msg-content em { color: var(--gold); font-style: italic; }

.typing-cursor {
  display: inline-block;
  width: 6px;
  height: 14px;
  background: var(--accent);
  border-radius: 2px;
  animation: blink 0.8s infinite;
  margin-left: 3px;
  vertical-align: middle;
  box-shadow: 0 0 6px var(--accent-glow);
}

@keyframes blink {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

.chat-input-wrap {
  display: flex;
  gap: 10px;
  padding: 16px 0 24px;
  border-top: 1px solid var(--glass-border);
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  background: var(--ink-2);
  border: 1px solid var(--glass-border);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 14px 18px;
  border-radius: 12px;
  resize: none;
  outline: none;
  transition: all 0.2s var(--ease-out);
  line-height: 1.5;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.chat-input:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.chat-input::placeholder { color: var(--fg-dim); }

.chat-send {
  background: var(--accent);
  border: none;
  color: white;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 14px 22px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chat-send svg { width: 16px; height: 16px; }

.chat-send:hover:not(:disabled) {
  background: #5a7cff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -6px var(--accent-glow);
}

.chat-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.chat-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  text-align: center;
  padding: 40px 20px;
}

.chat-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--glass-1);
  border: 1px solid var(--glass-border);
  display: grid;
  place-items: center;
  color: var(--accent);
  box-shadow: 0 8px 24px -8px var(--accent-glow);
}

.chat-empty-icon svg { width: 32px; height: 32px; }

.chat-empty-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.02em;
}

.chat-empty-hint {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-dim);
  letter-spacing: 0.05em;
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
  max-width: 520px;
}

.chat-suggestion {
  font-family: var(--font-sans);
  font-size: 13px;
  padding: 7px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  background: var(--ink-2);
  color: var(--fg-soft);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.chat-suggestion:hover {
  border-color: var(--accent-line);
  color: var(--fg);
  background: var(--accent-soft);
}

@media (max-width: 640px) {
  .chat-page { padding: 0 16px; }
  .chat-header { padding: 16px 0 12px; }
  .chat-title { font-size: 16px; }
  .chat-model { padding: 5px 10px; font-size: 11px; }
  .chat-messages { padding: 16px 0; gap: 14px; }
  .msg { padding: 12px 14px; font-size: 13px; }
  .chat-input { padding: 12px 14px; font-size: 14px; }
  .chat-send { padding: 12px 18px; }
}

/* ════════════════════════════════════════════════════════════
   FADE IN
   ──────────────────────────────────────────────────────────── */
.fade-in {
  animation: fadeInUp 0.6s var(--ease-out) backwards;
}

.fade-in:nth-child(1) { animation-delay: 0.05s; }
.fade-in:nth-child(2) { animation-delay: 0.15s; }
.fade-in:nth-child(3) { animation-delay: 0.25s; }
.fade-in:nth-child(4) { animation-delay: 0.35s; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.num-anim { animation: numAnim 0.4s var(--ease-out); }
@keyframes numAnim {
  0%   { opacity: 0.3; }
  100% { opacity: 1; }
}

/* 防止内容层高于 3D 背景的指针事件 */
.content-layer { pointer-events: auto; }
#bg-3d { pointer-events: none; }
