/* ===== 主题变量（深色为默认，[data-theme="light"] 覆盖） ===== */
:root {
    --bg: #0b0f19;
    --panel: #0e1322;
    --panel-2: #12192c;
    --border: #1e293b;
    --panel-translucent: rgba(14, 19, 34, 0.6);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --muted-2: #64748b;
}
[data-theme="light"] {
    --bg: #f8fafc;
    --panel: #ffffff;
    --panel-2: #f1f5f9;
    --border: #e2e8f0;
    --panel-translucent: rgba(255, 255, 255, 0.7);
    --text: #0f172a;
    --muted: #475569;
    --muted-2: #94a3b8;
}

/* ===== Smiley Sans（得意黑）全局字体：精简为单一 woff2 ===== */
@font-face {
    font-family: 'Smiley Sans';
    src: url('../fonts/SmileySans-Oblique.otf.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
body {
    font-family: 'Smiley Sans', ui-sans-serif, system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: var(--bg);
    color: var(--text);
}

/* ===== 隐藏滚动条 ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

/* ===== 天气悬浮卡片：hover / 键盘聚焦 / 点击展开 ===== */
.weather-pop {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
}
.weather-trigger:hover .weather-pop,
.weather-trigger:focus-within .weather-pop,
.weather-trigger.weather-open .weather-pop {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.weather-trigger { outline: none; }
.weather-trigger:focus-visible { box-shadow: 0 0 0 2px #6366f1; }

/* ===== 尊重 prefers-reduced-motion：关闭动画与过渡 ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
