/* ============================================================
   喜乐导航 v3 — 极光 · 高级感视觉语言
   居中窄栏 / 超大时钟 / 毛玻璃 / 极光渐变背景 / 克制微动效
   ============================================================ */

/* ---------- 设计变量 ---------- */
:root {
    --page-bg: #edf0f7;
    --ink: #0f172a;
    --ink-2: #475569;
    --ink-3: #94a3b8;
    --glass: rgba(255, 255, 255, .52);
    --glass-strong: rgba(255, 255, 255, .78);
    --panel: #ffffff; /* 实底浮层：联想词/引擎下拉，避免半透明叠底发花 */
    --card: rgba(255, 255, 255, .46);
    --card-hover: rgba(255, 255, 255, .68);
    --line: rgba(15, 23, 42, .09);
    --line-strong: rgba(15, 23, 42, .16);
    --accent: #4f6df5;
    --accent-soft: rgba(79, 109, 245, .12);
    --danger: #e11d48;
    --shadow-sm: 0 2px 10px rgba(15, 23, 42, .05);
    --shadow: 0 8px 30px rgba(15, 23, 42, .08);
    --shadow-hover: 0 16px 42px rgba(15, 23, 42, .13);
    --radius-card: 18px;
    --radius-pill: 999px;
    --blur: blur(22px) saturate(160%);
}

body.theme-dark {
    --page-bg: #090d17;
    --ink: #e6ebf5;
    --ink-2: #a5afc5;
    --ink-3: #6c7690;
    --glass: rgba(18, 24, 40, .52);
    --glass-strong: rgba(20, 27, 45, .82);
    --panel: #161d31; /* 实底浮层（深色） */
    --card: rgba(255, 255, 255, .055);
    --card-hover: rgba(255, 255, 255, .10);
    --line: rgba(255, 255, 255, .09);
    --line-strong: rgba(255, 255, 255, .18);
    --accent: #8698ff;
    --accent-soft: rgba(134, 152, 255, .16);
    --danger: #fb7185;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, .3);
    --shadow: 0 8px 30px rgba(0, 0, 0, .38);
    --shadow-hover: 0 16px 42px rgba(0, 0, 0, .5);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC',
        'Hiragino Sans GB', 'Microsoft YaHei', 'Segoe UI', sans-serif;
    color: var(--ink);
    background: var(--page-bg);
    transition: background .4s ease, color .4s ease;
    overflow-x: hidden;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; }
ul, ol { list-style: none; }
kbd {
    display: inline-block; padding: 1px 6px; border-radius: 6px;
    border: 1px solid var(--line-strong); background: var(--glass);
    font-family: inherit; font-size: 11px; color: var(--ink-2);
}

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

/* ---------- 背景层 ---------- */
.bg-layer {
    position: fixed; inset: 0; z-index: -3;
    background-size: cover; background-position: center; background-repeat: no-repeat;
    transition: opacity .4s ease;
}
.bg-shade {
    position: fixed; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(7, 10, 20, .62), rgba(7, 10, 20, .5));
    opacity: 0; pointer-events: none; transition: opacity .4s ease;
}
.bg-shade.on { opacity: 1; }
/* 浅色模式 + 深色皮肤（星空/风景图）→ 提亮层保证可读性 */
.bg-shade.lite {
    background: linear-gradient(180deg, rgba(250, 251, 254, .6), rgba(244, 246, 251, .48));
    opacity: 1;
}

/* 极光层 */
.aurora-layer {
    position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none;
}
.aurora-blob {
    position: absolute; border-radius: 50%;
    filter: blur(90px);
    will-change: transform;
    opacity: .5;
}
body.theme-dark .aurora-blob { opacity: .42; }

.blob-a {
    width: 55vmax; height: 55vmax; left: -12vmax; top: -18vmax;
    background: radial-gradient(circle at 40% 40%, rgba(99, 102, 241, .55), transparent 65%);
    animation: drift-a 46s ease-in-out infinite alternate;
}
.blob-b {
    width: 48vmax; height: 48vmax; right: -14vmax; top: -6vmax;
    background: radial-gradient(circle at 60% 40%, rgba(34, 211, 238, .42), transparent 65%);
    animation: drift-b 58s ease-in-out infinite alternate;
}
.blob-c {
    width: 52vmax; height: 52vmax; left: 8vmax; bottom: -24vmax;
    background: radial-gradient(circle at 50% 60%, rgba(167, 139, 250, .45), transparent 65%);
    animation: drift-c 52s ease-in-out infinite alternate;
}
.blob-d {
    width: 38vmax; height: 38vmax; right: 4vmax; bottom: -12vmax;
    background: radial-gradient(circle at 50% 50%, rgba(244, 114, 182, .3), transparent 65%);
    animation: drift-d 64s ease-in-out infinite alternate;
}

@keyframes drift-a {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(9vmax, 6vmax) scale(1.12); }
    100% { transform: translate(-4vmax, 12vmax) scale(.94); }
}
@keyframes drift-b {
    0%   { transform: translate(0, 0) scale(1.05); }
    50%  { transform: translate(-10vmax, 8vmax) scale(.92); }
    100% { transform: translate(-3vmax, -6vmax) scale(1.1); }
}
@keyframes drift-c {
    0%   { transform: translate(0, 0) scale(.96); }
    50%  { transform: translate(8vmax, -7vmax) scale(1.1); }
    100% { transform: translate(-8vmax, -3vmax) scale(1.02); }
}
@keyframes drift-d {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-9vmax, -9vmax) scale(1.16); }
}

/* ---------- 顶栏 ---------- */
.topbar {
    max-width: 1100px; margin: 0 auto;
    padding: 18px 24px 0;
    display: flex; align-items: center; justify-content: flex-end; gap: 12px;
}

.topbar-actions { display: flex; align-items: center; gap: 8px; }

.weather-pill {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 16px; border-radius: var(--radius-pill);
    background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--line); box-shadow: var(--shadow-sm);
    font-size: 13px; color: var(--ink);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.weather-pill:hover { transform: translateY(-1px); box-shadow: var(--shadow); background: var(--card-hover); }
.weather-pill-icon { font-size: 15px; }
.weather-pill-temp { font-weight: 600; font-variant-numeric: tabular-nums; }
.weather-pill-city { color: var(--ink-2); max-width: 7em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.icon-btn {
    width: 38px; height: 38px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--line); box-shadow: var(--shadow-sm);
    color: var(--ink-2);
    transition: transform .2s ease, color .2s ease, box-shadow .2s ease, background .2s ease;
}
.icon-btn:hover { transform: translateY(-1px); color: var(--ink); box-shadow: var(--shadow); background: var(--card-hover); }
.icon-btn.active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* ---------- 主栏 ---------- */
.wrap {
    max-width: 1100px; margin: 0 auto;
    padding: 0 24px 40px;
}

/* ---------- Hero ---------- */
.hero { text-align: center; padding: clamp(40px, 8vh, 84px) 0 34px; }

.greeting {
    font-size: clamp(15px, 2vw, 18px);
    color: var(--ink-2); font-weight: 400; letter-spacing: .12em;
}

.clock {
    margin-top: 8px;
    font-size: clamp(3rem, 8vw, 5.4rem);
    font-weight: 200;
    line-height: 1.05;
    letter-spacing: .015em;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(120deg, var(--ink) 30%, var(--ink-2) 70%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    user-select: none;
}

.date-line {
    margin-top: 10px;
    font-size: clamp(13px, 1.6vw, 15px);
    color: var(--ink-3); letter-spacing: .2em;
}

.hitokoto {
    margin-top: 26px;
    display: inline-flex; align-items: center; gap: 4px;
    max-width: 640px;
    padding: 10px 22px; border-radius: var(--radius-pill);
    background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--line);
    font-size: 13.5px; color: var(--ink-2); line-height: 1.6;
    transition: transform .2s ease, box-shadow .2s ease, color .2s ease;
}
.hitokoto:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); color: var(--ink); }
.hitokoto-mark { color: var(--ink-3); }
.hitokoto-refresh { margin-left: 8px; flex: none; color: var(--ink-3); transition: transform .4s ease; }
.hitokoto:hover .hitokoto-refresh { transform: rotate(160deg); }

/* ---------- 搜索 ---------- */
.search-zone { margin-top: 16px; position: relative; z-index: 30; /* 让联想词/引擎下拉浮层盖住下方的卡片（卡片有 backdrop-filter 会形成层叠上下文） */ }

.search-pill {
    position: relative;
    max-width: 800px; margin: 0 auto;
    display: flex; align-items: center;
    height: 78px; padding: 0 12px 0 16px;
    border-radius: var(--radius-pill);
    background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    transition: box-shadow .25s ease, border-color .25s ease, background .25s ease;
}
.search-pill:focus-within {
    border-color: var(--line-strong);
    background: var(--glass-strong);
    box-shadow: var(--shadow-hover);
}

.engine-trigger {
    display: flex; align-items: center; gap: 5px;
    padding: 8px 10px; border-radius: var(--radius-pill);
    cursor: pointer; user-select: none;
    transition: background .2s ease;
}
.engine-trigger:hover, .engine-trigger.open { background: var(--accent-soft); }
.engine-trigger-logo { width: 24px; height: 24px; border-radius: 6px; }
.engine-trigger-arrow { color: var(--ink-3); transition: transform .2s ease; }
.engine-trigger.open .engine-trigger-arrow { transform: rotate(180deg); }

.search-input {
    flex: 1; min-width: 0;
    border: none; outline: none; background: transparent;
    padding: 0 14px; height: 100%;
    font-size: 19px; color: var(--ink); font-family: inherit;
}
.search-input::placeholder { color: var(--ink-3); }

.search-submit {
    width: 56px; height: 56px; flex: none;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent); color: #fff;
    box-shadow: 0 4px 14px rgba(79, 109, 245, .35);
    transition: transform .2s ease, box-shadow .2s ease;
}
.search-submit:hover { transform: scale(1.06); box-shadow: 0 6px 20px rgba(79, 109, 245, .45); }
.search-submit:active { transform: scale(.96); }

/* 引擎下拉 */
.engine-menu {
    position: absolute; top: calc(100% + 10px); left: 0; z-index: 60;
    min-width: 168px; padding: 6px;
    border-radius: 16px;
    background: var(--panel);
    border: 1px solid var(--line); box-shadow: var(--shadow-hover);
    animation: pop-in .18s ease;
}
.engine-menu li {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 11px;
    font-size: 14px; color: var(--ink-2); cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.engine-menu li:hover { background: var(--accent-soft); color: var(--ink); }
.engine-menu li.active { color: var(--accent); font-weight: 600; }
.engine-menu li img { width: 17px; height: 17px; border-radius: 4px; }

/* 联想词 */
.sug-list {
    position: absolute; top: calc(100% + 10px); left: 0; right: 0; z-index: 55;
    padding: 6px;
    border-radius: 18px;
    background: var(--panel);
    border: 1px solid var(--line); box-shadow: var(--shadow-hover);
    animation: pop-in .18s ease;
    max-height: 320px; overflow-y: auto;
}
.sug-item {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 15px; border-radius: 12px;
    font-size: 15px; color: var(--ink); cursor: pointer;
    transition: background .12s ease;
}
.sug-item::before {
    content: ''; flex: none; width: 5px; height: 5px; border-radius: 50%;
    background: var(--ink-3); opacity: .6;
}
.sug-item.active, .sug-item:hover { background: var(--accent-soft); }

.search-hint {
    text-align: center; margin-top: 14px;
    font-size: 12px; color: var(--ink-3); letter-spacing: .04em;
}

/* ---------- 分类胶囊 ---------- */
.chips {
    margin-top: 46px;
    display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
}
.chip {
    padding: 8px 18px; border-radius: var(--radius-pill);
    font-size: 13.5px; color: var(--ink-2);
    background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--line);
    transition: all .2s ease;
}
.chip:hover { color: var(--ink); border-color: var(--line-strong); transform: translateY(-1px); }
.chip.active {
    color: #fff; background: var(--accent); border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(79, 109, 245, .32);
}
body.theme-dark .chip.active { color: #0b0f1c; }

/* ---------- 网站坞 ---------- */
.sites-grid {
    margin-top: 36px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 10px; row-gap: 30px;
}
/* 应用坞式：无背景块，图标块为视觉主体 */
.site-card {
    position: relative;
    display: flex; flex-direction: column; align-items: center; gap: 11px;
    padding: 4px 2px;
    border-radius: var(--radius-card);
}
.site-card-icon {
    width: 56px; height: 56px; border-radius: 17px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 600; color: #fff;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform .24s cubic-bezier(.34, 1.45, .64, 1), box-shadow .24s ease, border-color .24s ease;
}
.site-card:hover .site-card-icon {
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-hover);
    border-color: var(--line-strong);
}
.site-card-icon img { width: 100%; height: 100%; object-fit: contain; }
.site-card-name {
    font-size: 12.5px; color: var(--ink-2);
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    transition: color .2s ease;
}
.site-card:hover .site-card-name { color: var(--ink); }

.site-card-actions {
    position: absolute; top: -2px; right: 4px;
    display: none; gap: 4px;
}
.site-card.custom:hover .site-card-actions { display: flex; }
.site-card-actions button {
    width: 22px; height: 22px; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
    color: var(--ink-2);
    transition: color .15s ease, border-color .15s ease;
}
.site-card-actions button:hover { color: var(--accent); border-color: var(--accent); }
.site-card-actions .act-del:hover { color: var(--danger); border-color: var(--danger); }

.add-site-card { color: var(--ink-3); }
.add-site-card:hover { color: var(--accent); }
.add-site-icon {
    background: transparent; border: 1.5px dashed var(--line-strong);
    color: inherit; box-shadow: none;
}
.add-site-card:hover .add-site-icon { border-color: var(--accent); color: var(--accent); }

/* ---------- 小组件区 ---------- */
.widgets {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}
.widget-card {
    border-radius: var(--radius-card);
    background: var(--card); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--line); box-shadow: var(--shadow-sm);
    padding: 18px 20px;
    transition: transform .2s ease, box-shadow .2s ease;
}
.widget-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

#progressCard { grid-column: span 3; }
#holidayCard { grid-column: span 3; }
.todo-card { grid-column: span 3; }
.hot-card { grid-column: span 3; }

.widget-head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    margin-bottom: 14px;
}
.widget-title {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 13px; font-weight: 600; letter-spacing: .06em; color: var(--ink-2);
}
.widget-foot { margin-top: 10px; font-size: 12px; color: var(--ink-3); }

/* 今日进度 */
.progress-pct {
    font-size: 15px; font-weight: 600; color: var(--accent);
    font-variant-numeric: tabular-nums;
}
.progress-track {
    height: 6px; border-radius: 3px; overflow: hidden;
    background: var(--line);
}
.progress-fill {
    height: 100%; width: 0;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent), #22d3ee);
    transition: width .6s ease;
}

/* 节假日 */
.holiday-body { display: flex; align-items: center; gap: 16px; }
.holiday-days {
    font-size: 40px; font-weight: 200; line-height: 1;
    font-variant-numeric: tabular-nums; color: var(--ink);
    display: flex; align-items: baseline; gap: 4px;
}
.holiday-days small { font-size: 13px; font-weight: 400; color: var(--ink-3); }
.holiday-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.holiday-name { font-size: 15px; font-weight: 600; color: var(--ink); }
.holiday-date { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* 待办 */
.todo-count { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.todo-form { display: flex; gap: 8px; margin-bottom: 10px; }
.todo-form input {
    flex: 1; min-width: 0; height: 34px; padding: 0 12px;
    border-radius: 10px; border: 1px solid var(--line);
    background: var(--glass); font-size: 13px; color: var(--ink);
    font-family: inherit; outline: none;
    transition: border-color .2s ease, background .2s ease;
}
.todo-form input:focus { border-color: var(--accent); background: var(--glass-strong); }
.todo-add {
    width: 34px; height: 34px; flex: none; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent); color: #fff;
    transition: transform .15s ease;
}
.todo-add:hover { transform: scale(1.06); }

.todo-list { max-height: 168px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.todo-item {
    display: flex; align-items: center; gap: 9px;
    padding: 7px 8px; border-radius: 10px;
    font-size: 13.5px; color: var(--ink);
    transition: background .15s ease;
}
.todo-item:hover { background: var(--accent-soft); }
.todo-check {
    flex: none; width: 17px; height: 17px; border-radius: 6px;
    border: 1.5px solid var(--line-strong);
    display: inline-flex; align-items: center; justify-content: center;
    color: transparent; cursor: pointer;
    transition: all .15s ease;
}
.todo-item.done .todo-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.todo-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-item.done .todo-text { text-decoration: line-through; color: var(--ink-3); }
.todo-del {
    flex: none; width: 22px; height: 22px; border-radius: 7px;
    display: none; align-items: center; justify-content: center;
    color: var(--ink-3);
}
.todo-item:hover .todo-del { display: inline-flex; }
.todo-del:hover { color: var(--danger); background: var(--glass-strong); }
.todo-empty { padding: 12px 8px; font-size: 12.5px; color: var(--ink-3); text-align: center; }

/* 热搜 */
.hot-refresh-btn {
    width: 28px; height: 28px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--ink-3); transition: color .2s ease, background .2s ease;
}
.hot-refresh-btn:hover { color: var(--accent); background: var(--accent-soft); }
.hot-refresh-btn.spinning svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.hot-list { display: flex; flex-direction: column; min-height: 288px; }
.hot-row {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 6px; border-radius: 10px;
    transition: background .15s ease;
}
.hot-row:hover { background: var(--accent-soft); }
.hot-rank {
    flex: none; width: 20px; text-align: center;
    font-size: 12.5px; font-weight: 600; color: var(--ink-3);
    font-variant-numeric: tabular-nums; font-style: italic;
}
.hot-rank.top { color: #f43f5e; }
.hot-title {
    flex: 1; min-width: 0;
    font-size: 13.5px; color: var(--ink);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    cursor: pointer;
}
.hot-tag {
    flex: none; font-size: 10px; color: #fff; background: #f43f5e;
    padding: 1px 5px; border-radius: 5px; line-height: 1.5;
}
.hot-score { flex: none; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.hot-pager {
    margin-top: 8px;
    display: flex; align-items: center; justify-content: center; gap: 12px;
}
.hot-page-btn {
    width: 26px; height: 26px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); color: var(--ink-2); font-size: 14px;
    transition: all .15s ease;
}
.hot-page-btn:hover:not(.disabled) { color: var(--accent); border-color: var(--accent); }
.hot-page-btn.disabled { opacity: .35; cursor: not-allowed; }
.hot-page-info { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- 专注模式 ---------- */
body.focus-mode .widgets,
body.focus-mode .hitokoto,
body.focus-mode .search-hint { display: none; }
body.focus-mode .hero { padding-bottom: 20px; }

/* ---------- 页脚 ---------- */
.site-footer {
    max-width: 1100px; margin: 0 auto;
    padding: 26px 24px 34px;
    text-align: center;
    font-size: 12.5px; color: var(--ink-3);
}
.footer-links { margin-top: 6px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.footer-links a { transition: color .2s ease; }
.footer-links a:hover { color: var(--ink); }

/* ---------- 弹窗 ---------- */
.modal-backdrop {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(8, 12, 24, .4);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    animation: fade-in .18s ease;
}
/* hidden 属性必须压过上面的 display:flex，否则弹窗会在页面加载时全部弹出 */
.modal-backdrop[hidden] { display: none; }
.modal-box {
    width: 100%; max-width: 420px;
    max-height: 84vh; overflow-y: auto;
    border-radius: 22px;
    background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--line-strong);
    box-shadow: var(--shadow-hover);
    padding: 22px 24px;
    animation: pop-in .22s cubic-bezier(.2, .8, .3, 1.05);
}
.skin-modal { max-width: 520px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-title { font-size: 16px; font-weight: 600; }
.modal-close {
    width: 30px; height: 30px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--ink-3); transition: all .15s ease;
}
.modal-close:hover { color: var(--ink); background: var(--accent-soft); }
.modal-hint { margin-top: 14px; font-size: 12px; color: var(--ink-3); }

/* 换肤画廊 */
.skin-gallery {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px;
}
.skin-item { cursor: pointer; text-align: center; }
.skin-preview {
    height: 62px; border-radius: 14px;
    background-size: cover; background-position: center;
    border: 2px solid var(--line);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.skin-item:hover .skin-preview { transform: translateY(-2px); }
.skin-item.active .skin-preview { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.skin-preview.aurora-preview {
    background:
        radial-gradient(circle at 25% 30%, rgba(99, 102, 241, .8), transparent 60%),
        radial-gradient(circle at 75% 25%, rgba(34, 211, 238, .6), transparent 60%),
        radial-gradient(circle at 55% 80%, rgba(167, 139, 250, .7), transparent 60%),
        #11162a;
}
.skin-name { display: block; margin-top: 7px; font-size: 12px; color: var(--ink-2); }
.skin-item.active .skin-name { color: var(--accent); font-weight: 600; }

/* 表单 */
.form-group { margin-bottom: 14px; }
.form-label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--ink-2); }
.required { color: var(--danger); }
.form-group input, .form-group select {
    width: 100%; height: 40px; padding: 0 13px;
    border-radius: 12px; border: 1px solid var(--line);
    background: var(--glass); color: var(--ink);
    font-size: 14px; font-family: inherit; outline: none;
    transition: border-color .2s ease, background .2s ease;
}
.form-group input:focus, .form-group select:focus { border-color: var(--accent); background: var(--glass-strong); }
.form-error {
    margin-bottom: 12px; padding: 9px 13px;
    border-radius: 11px; font-size: 12.5px;
    color: var(--danger); background: rgba(225, 29, 72, .08);
    border: 1px solid rgba(225, 29, 72, .22);
}
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }
.btn-primary, .btn-secondary {
    height: 38px; padding: 0 20px; border-radius: 12px;
    font-size: 13.5px; font-weight: 500; font-family: inherit;
    transition: all .2s ease;
}
.btn-primary {
    background: var(--accent); color: #fff;
    box-shadow: 0 4px 14px rgba(79, 109, 245, .3);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-secondary { border: 1px solid var(--line-strong); color: var(--ink-2); }
.btn-secondary:hover { color: var(--ink); background: var(--glass); }

/* 城市选择 */
.city-quick-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 14px; }
.city-quick-btn {
    height: 34px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--glass);
    font-size: 12.5px; color: var(--ink-2);
    transition: all .15s ease;
}
.city-quick-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.city-quick-btn.active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.city-search-form { display: flex; gap: 8px; }
.city-search-form input {
    flex: 1; min-width: 0; height: 38px; padding: 0 13px;
    border-radius: 12px; border: 1px solid var(--line);
    background: var(--glass); color: var(--ink);
    font-size: 13.5px; font-family: inherit; outline: none;
}
.city-search-form input:focus { border-color: var(--accent); }
.city-search-form .btn-primary { height: 38px; }

/* ---------- 动效定义 ---------- */
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in {
    from { opacity: 0; transform: scale(.94) translateY(8px); }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    #progressCard, #holidayCard, .todo-card, .hot-card { grid-column: span 6; }
}
@media (max-width: 640px) {
    .topbar { padding: 14px 16px 0; }
    .wrap { padding: 0 16px 32px; }
    .weather-pill-city { display: none; }
    .widgets { grid-template-columns: 1fr; }
    #progressCard, #holidayCard, .todo-card, .hot-card { grid-column: span 1; }
    .sites-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; row-gap: 24px; }
    .search-pill { height: 62px; }
    .search-hint { display: none; }
    .city-quick-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 降低动效 ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    .aurora-blob { animation: none !important; }
}
