/* ============================================================
   网址导航 · 前台样式
   ============================================================ */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --text: #1f2937;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --bg: #f5f7fb;
    --card-bg: #ffffff;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(17, 24, 39, .06);
    --shadow-hover: 0 8px 24px rgba(37, 99, 235, .12);
}

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

body {
    font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #e9f6fe;
    background-image: url("../images/bg.svg");
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; }
.hide { display: none !important; }

/* ---------------- 顶部栏 ---------------- */
.topbar {
    background: transparent;
    position: relative;
}

.user-area {
    position: absolute;
    top: 16px;
    right: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 13.5px;
    padding: 6px 16px;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 16px;
    background: rgba(255, 255, 255, .85);
    transition: all .2s;
    white-space: nowrap;
}

.user-link:hover { color: var(--primary); border-color: var(--primary); }

.user-link.primary { color: #fff; background: var(--primary); border-color: var(--primary); }
.user-link.primary:hover { background: var(--primary-dark); color: #fff; }

.user-chip {
    font-size: 13.5px;
    color: var(--text);
    padding: 6px 14px;
    background: rgba(255, 255, 255, .85);
    border-radius: 16px;
    white-space: nowrap;
}

a.user-chip-link { text-decoration: none; transition: all .2s; }
a.user-chip-link:hover { color: var(--primary); box-shadow: 0 2px 8px rgba(37, 99, 235, .15); }

.bar-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding-top: 26px;
    padding-bottom: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}

.logo-ico { font-size: 30px; }

.search {
    width: 100%;
    max-width: 800px;
    display: flex;
    border: 2px solid var(--primary);
    border-radius: 28px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow .2s;
}

.search:focus-within { box-shadow: 0 0 0 4px rgba(37, 99, 235, .15); }

.search select {
    border: none;
    outline: none;
    padding: 14px 8px 14px 18px;
    font-size: 15px;
    color: var(--text);
    background: transparent;
    cursor: pointer;
}

.search input {
    flex: 1;
    border: none;
    outline: none;
    padding: 15px 16px;
    font-size: 16px;
    min-width: 0;
}

.search button {
    border: none;
    background: var(--primary);
    color: #fff;
    padding: 0 36px;
    font-size: 16px;
    cursor: pointer;
    transition: background .2s;
}

.search button:hover { background: var(--primary-dark); }

/* ---------------- 顶部时钟 + 天气 ---------------- */
.clock-bar {
    display: flex;
    align-items: stretch; /* 天气卡片自动拉伸到与左侧时间模块等高 */
    justify-content: center;
    gap: 40px;
    width: 100%;
}

.clock-main { text-align: center; }

.clock-time {
    font-size: 54px;
    font-weight: 700;
    line-height: 1.1;
    height: 59px; /* 归一化行高，供右侧太阳+温度行按同一高度带对齐 */
    color: var(--text);
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
}

.clock-date {
    margin-top: 4px;
    font-size: 13px;
    line-height: 20px;
    height: 20px;
    color: #5b6b7d;
}

.clock-date .dot { margin: 0 8px; color: #9aa8b6; }

/* 天气模块：无背景，与左侧时间模块等高（.clock-bar stretch）。
   结构分两段：wc-top（温度）与 .clock-time 同高居中（与时间对齐），
   wc-desc（城市 | 天气 | 风向风力）与 .clock-date（年月 周X）同一行高、同字号同色，底部对齐 */
.weather-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* wc-top 贴顶、wc-desc 钉底 */
    color: var(--text);
}

/* 分割线：位于时间与天气之间，通到顶部与底部对齐 */
.weather-card::before {
    content: '';
    position: absolute;
    left: -21px; /* 居中于 .clock-bar 的 40px 间距内 */
    top: 0;
    bottom: 0;
    width: 2px;
    border-radius: 1px;
    background: #c9d5e0;
}

.wc-top {
    height: 59px; /* 与 .clock-time 同高：太阳+温度在时间的高度带内居中 */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.wc-city {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    vertical-align: top; /* 与同行文字共用 20px 行框，顶部对齐避免基线偏移 */
}

.wc-city svg { width: 13px; height: 13px; fill: currentColor; flex-shrink: 0; }

.wc-main { display: flex; align-items: center; justify-content: center; gap: 10px; }

.wc-icon { width: 34px; height: 34px; flex-shrink: 0; }

.wc-temp {
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .5px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.wc-unit { font-size: 15px; font-weight: 600; margin-left: 1px; }

/* 与 .clock-date（年月 周X）同字号、同色、同一行高，形成同一行对齐 */
.wc-desc {
    font-size: 13px;
    font-weight: 400;
    line-height: 20px;
    height: 20px;
    color: #5b6b7d;
    white-space: nowrap;
    text-align: center;
}

.wc-sep { margin: 0 8px; color: #9aa8b6; }

/* ---------------- 主体 ---------------- */
.main { flex: 1; padding-top: 6px; padding-bottom: 40px; }

.search-tip {
    background: rgba(239, 246, 255, .92);
    border: 1px solid #bfdbfe;
    color: #1e40af;
    border-radius: var(--radius);
    padding: 12px 18px;
    font-size: 14px;
    margin-bottom: 18px;
}

/* ---------------- 分类筛选条 ---------------- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 18px;
}

.chip {
    border: 1px solid rgba(255, 255, 255, .9);
    background: rgba(255, 255, 255, .85);
    color: var(--text-light);
    font-size: 13.5px;
    padding: 6px 18px;
    border-radius: 16px;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
}

.chip:hover { color: var(--primary); border-color: var(--primary); }

.chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 600;
}

.grid-empty {
    display: none;
    text-align: center;
    color: var(--text-light);
    padding: 40px 0;
    font-size: 14px;
}

/* 网址卡片：每行固定 10 个 */
.grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 10px;
}

.site-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    padding: 14px 6px 10px;
    text-decoration: none;
    color: var(--text);
    transition: all .2s;
    min-width: 0;
}

.site-card:hover {
    transform: translateY(-3px);
}

.site-card:hover .site-name { color: var(--primary); }

.site-card.hide-by-search { display: none; }

.site-ico {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex-shrink: 0;
    object-fit: contain;
    background: #fff;
}

.site-ico.letter {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    user-select: none;
}

.site-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 空状态 */
.empty-page { text-align: center; padding: 80px 20px; color: var(--text-light); }
.empty-page .sub { font-size: 14px; margin-top: 10px; }
.empty-page a { color: var(--primary); }
.empty { color: var(--text-light); font-size: 13.5px; padding: 10px 2px; }

/* ---------------- 页脚 ---------------- */
.footer {
    text-align: center;
    padding: 22px 16px 26px;
    color: var(--text-light);
    font-size: 13px;
    line-height: 2;
}

.footer a { color: var(--text-light); }

/* ---------------- 用户网址管理后台（左右布局） ---------------- */
.up-layout {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding-top: 18px;
    padding-bottom: 50px;
}

.up-side {
    width: 212px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, .9);
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 16px 12px 12px;
    position: sticky;
    top: 16px;
}

.up-side-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 9px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 3px;
    transition: all .15s;
}

.up-side-nav a:hover { background: rgba(37, 99, 235, .08); color: var(--primary); }

.up-side-nav a.active {
    background: linear-gradient(120deg, #2563eb, #3b82f6);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(37, 99, 235, .3);
}

.up-side-nav .nav-ico { font-size: 15px; width: 20px; text-align: center; }

/* 用户名标识：位于侧边栏顶部，图标与文字尺寸与菜单项一致 */
.up-side-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    padding: 2px 12px 12px;
    border-bottom: 1px solid rgba(15, 23, 42, .07);
    font-size: 14px;
    color: var(--text-light);
}

.up-side-foot .nav-ico { font-size: 15px; width: 20px; text-align: center; }

.up-content { flex: 1; min-width: 0; }

.up-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.up-stat {
    background: rgba(255, 255, 255, .88);
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: var(--radius);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: var(--shadow);
}

.up-stat-num { font-size: 24px; font-weight: 700; color: var(--primary); line-height: 1.1; }

.up-stat-label { font-size: 12.5px; color: var(--text-light); }

.up-panel {
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 18px;
    box-shadow: var(--shadow);
}

.up-panel h2 { font-size: 16px; margin-bottom: 14px; }

/* 面板头部：标题 + 右侧操作按钮 */
.up-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.up-panel-head h2 { margin-bottom: 0; }

/* 分类编辑框（点表格「编辑」后出现在面板顶部） */
.up-editcat-box {
    background: rgba(248, 250, 252, .92);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px 2px;
    margin-bottom: 16px;
}

/* 添加网址弹窗 */
.up-dialog {
    margin: auto; /* 抵消全局 * { margin: 0 }，保持弹窗居中 */
    border: none;
    border-radius: 14px;
    padding: 0;
    width: min(620px, calc(100vw - 40px));
    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

.up-dialog::backdrop { background: rgba(15, 23, 42, .45); }

.up-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(15, 23, 42, .07);
}

.up-dialog-head b { font-size: 15.5px; }

.up-dialog-close {
    border: none;
    background: #f1f5f9;
    color: #475569;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s;
}

.up-dialog-close:hover { background: #e2e8f0; }

.up-dialog-form {
    padding: 16px 20px 20px;
    max-height: min(68vh, 620px);
    overflow-y: auto;
}

.up-row { display: flex; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 12px; }

.up-field { flex: 1 1 220px; min-width: 0; }

.up-field label {
    display: block;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.req { color: #ef4444; font-style: normal; }

.up-field input[type="text"],
.up-field select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background: #fff;
    transition: border .15s, box-shadow .15s;
}

.up-field input:focus, .up-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}

.up-check { display: flex; align-items: flex-end; padding-bottom: 8px; }

/* 名称联想（图标对应库匹配下拉） */
.up-field { position: relative; }

.up-suggest {
    position: absolute;
    z-index: 40;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .14);
    overflow: hidden;
}

.up-suggest-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: #fff;
    cursor: pointer;
    font-size: 13.5px;
    text-align: left;
    font-family: inherit;
    transition: background .12s;
}

.up-suggest-item:hover { background: #eff6ff; }

.up-suggest-item img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    background: #fff;
    border-radius: 4px;
    flex-shrink: 0;
}

.up-suggest-item .s-name { color: var(--text); font-weight: 600; white-space: nowrap; }
.up-suggest-item .s-url {
    color: var(--text-light);
    font-size: 12px;
    margin-left: auto;
    max-width: 55%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.up-check label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    color: var(--text);
    cursor: pointer;
    margin: 0;
}

.up-btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 24px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s;
}

.up-btn:hover { background: var(--primary-dark); }

.up-btn.gray { background: #f1f5f9; color: #475569; margin-left: 8px; }
.up-btn.gray:hover { background: #e2e8f0; }

.up-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

.up-table th, .up-table td {
    text-align: left;
    padding: 9px 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.up-table th { color: var(--text-light); font-size: 12.5px; background: rgba(248, 250, 252, .85); }

.up-table tbody tr:hover { background: rgba(248, 250, 255, .8); }

/* 我的网址：分类横向一排标签，点击切换显示对应分类 */
.up-cat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.up-cat-tabs .chip { font-size: 13.5px; padding: 5px 16px; }

.up-cat-block { margin-bottom: 4px; }

.up-cat-title {
    display: flex;
    align-items: center;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text);
    padding: 4px 0 8px;
    margin: 0;
}

.up-cat-title::before {
    content: '';
    width: 4px;
    height: 14px;
    border-radius: 2px;
    background: var(--primary);
    margin-right: 8px;
}

.up-cat-empty { font-size: 13px; color: var(--text-light); padding: 2px 0 6px; }

.row-dim { opacity: .55; }

.up-link { color: var(--text); text-decoration: none; }
.up-link:hover { color: var(--primary); }

.up-url {
    display: block;
    color: #94a3b8;
    font-size: 12px;
    margin-top: 2px;
    max-width: 380px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.up-badge {
    display: inline-block;
    font-size: 11.5px;
    border-radius: 5px;
    padding: 2px 8px;
    border: 1px solid transparent;
}

.up-badge.ok { background: #f0fdf4; color: #16a34a; border-color: #bbf7d0; }
.up-badge.off { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }

.up-ops { white-space: nowrap; }
.up-ops .up-mini, .up-ops form { margin-right: 4px; }

.up-mini {
    display: inline-block;
    font-size: 12.5px;
    color: var(--primary);
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 4px 10px;
    text-decoration: none;
    cursor: pointer;
    transition: all .15s;
}

.up-mini:hover { background: #dbeafe; }
.up-mini.gray { color: #475569; background: #f1f5f9; border-color: #e2e8f0; }
.up-mini.gray:hover { background: #e2e8f0; }
.up-mini.danger { color: #dc2626; background: #fef2f2; border-color: #fecaca; }
.up-mini.danger:hover { background: #fee2e2; }

/* 上移/下移到边界时的禁用态（不可点的 span） */
.up-mini.up-mini-disabled {
    color: #cbd5e1;
    background: #f8fafc;
    border-color: #eef2f7;
    cursor: not-allowed;
    user-select: none;
}

.inline { display: inline-block; }

.up-alert {
    border-radius: 8px;
    padding: 11px 15px;
    font-size: 13.5px;
    margin-bottom: 14px;
    border: 1px solid transparent;
}

.up-alert-success { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.up-alert-error { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

.up-empty { color: var(--text-light); font-size: 13.5px; padding: 14px 4px; }

/* 图标库选择器（网址表单内） */
.icon-picker-label {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.icon-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
    max-height: 240px;
    overflow-y: auto;
    padding: 10px;
    border: 1px dashed var(--border);
    border-radius: 8px;
}

.ipick {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 6px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}

.ipick:hover { border-color: var(--primary); transform: translateY(-1px); }

.ipick.active {
    border-color: var(--primary);
    background: #eff6ff;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, .25);
}

.ipick img { width: 30px; height: 30px; object-fit: contain; }

.ipick-letter {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    user-select: none;
}

/* 图标库管理面板 */
.lib-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.lib-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 6px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.lib-card img { width: 34px; height: 34px; object-fit: contain; }

.lib-card .ipick-letter { width: 34px; height: 34px; font-size: 16px; }

.lib-del {
    position: absolute;
    top: 4px;
    right: 4px;
    line-height: 1;
}

.lib-del button {
    width: 19px;
    height: 19px;
    border: none;
    border-radius: 50%;
    background: rgba(220, 38, 38, .12);
    color: #dc2626;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    opacity: .3;
    transition: all .15s;
    padding: 0;
}

.lib-card:hover .lib-del button { opacity: 1; background: #dc2626; color: #fff; }

/* 文件选择框 */
.up-field input[type="file"] {
    width: 100%;
    font-size: 13.5px;
    color: var(--text);
    padding: 7px 0;
}

.up-field input[type="file"]::file-selector-button {
    background: #eff6ff;
    color: var(--primary);
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    padding: 7px 14px;
    margin-right: 10px;
    cursor: pointer;
    font-size: 13px;
}

.up-field input[type="file"]::file-selector-button:hover { background: #dbeafe; }

/* ---------------- 登录 / 注册页 ---------------- */
.auth-body {
    background-color: #e9f6fe;
    background-image: url("../images/bg.svg");
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-box {
    width: 380px;
    max-width: 100%;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(31, 45, 61, .10);
    padding: 34px 32px 26px;
    text-align: center;
}

.auth-logo { font-size: 40px; }

.auth-box h1 { font-size: 19px; margin-top: 6px; }

.auth-sub { color: var(--text-light); font-size: 13px; margin: 4px 0 18px; }

.auth-field { margin-bottom: 14px; text-align: left; }

.auth-field label {
    display: block;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.auth-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border .15s, box-shadow .15s;
}

.auth-field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}

.auth-btn {
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 11px;
    font-size: 15px;
    cursor: pointer;
    transition: background .2s;
}

.auth-btn:hover { background: var(--primary-dark); }

.auth-alert {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13.5px;
    margin-bottom: 14px;
    text-align: left;
}

.auth-alt { margin-top: 16px; font-size: 12.5px; color: var(--text-light); }
.auth-alt a { color: var(--primary); text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1100px) {
    .grid { grid-template-columns: repeat(7, 1fr); }
}

@media (max-width: 820px) {
    .grid { grid-template-columns: repeat(5, 1fr); }
    .logo { font-size: 22px; }
    .logo-ico { font-size: 26px; }
    body { background-attachment: scroll; }
}

@media (max-width: 860px) {
    .up-layout { flex-direction: column; }
    .up-side { width: 100%; position: static; }
    .up-side-nav { display: flex; flex-wrap: wrap; gap: 4px; }
    .up-side-nav a { margin-bottom: 0; }
    .up-side-foot { display: none; }
}

@media (max-width: 620px) {
    .grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
    .site-card { padding: 10px 2px 8px; }
    .site-ico { width: 40px; height: 40px; border-radius: 10px; }
    .site-name { font-size: 12px; }
    .bar-inner { padding-top: 14px; padding-bottom: 14px; gap: 12px; }
    .user-area { top: 10px; right: 12px; gap: 6px; }
    .user-link { padding: 5px 12px; font-size: 12.5px; }
    .clock-bar { flex-direction: column; align-items: center; gap: 12px; }
    .clock-time { font-size: 40px; }
    .clock-date { font-size: 13px; }
    .clock-date .dot { margin: 0 4px; }
    .weather-card::before { display: none; } /* 窄屏上下堆叠，无需分割线 */
}
