﻿:root {
    --bg: #f3f6fb;
    --bg-soft: #eef3f9;
    --card: #ffffff;
    --card-soft: #f8fbff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #d9e2ec;
    --line-strong: #c7d3e0;
    --brand: #1678d3; /* Metro 主色 */
    --brand-dark: #0f5ea8;
    --brand-soft: #e7f1fb;
    --accent: #00a88f;
    --danger: #d83b01;
    --shadow: 0 8px 24px rgba(15, 23, 42, .08);
    --radius: 4px; /* Metro 更偏直角 */
    --radius-sm: 4px;
    --maxw: 730px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #f7f9fc 0%, #f3f6fb 100%);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input {
    font: inherit;
}

.app {
    max-width: var(--maxw);
    margin: 0 auto;
    min-height: 100vh;
    background: transparent;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(243,246,251,.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.topbar-inner {
    padding: 14px 16px 12px;
}

.page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.title-main {
    min-width: 0;
}

.title-main h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: .2px;
}

.title-main p {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--muted);
}

.title-badge {
    flex: 0 0 auto;
    background: var(--brand);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 10px;
    line-height: 1;
    border-radius: var(--radius);
}

.hero {
    padding: 16px;
}

.hero-card {
    background: linear-gradient(135deg, #1678d3 0%, #2693f0 100%);
    color: #fff;
    box-shadow: var(--shadow);
    overflow: hidden;
    border-radius:var(--radius);
}

.hero-body {
    padding: 18px 16px;
}

.hero-kicker {
    font-size: 12px;
    opacity: .88;
    margin-bottom: 8px;
    letter-spacing: .4px;
}

.hero-title {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 700;
}

.hero-desc {
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.6;
    opacity: .95;
}

.section {
    padding: 0 16px 14px;
}

.panel {
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px;
}

.search-icon {
    width: 18px;
    height: 18px;
    color: var(--brand);
    flex: 0 0 auto;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--text);
    font-size: 15px;
}

.search-box input::placeholder {
    color: #95a1af;
}

.chips-wrap {
    padding: 10px 10px 12px;
    overflow-x: auto;
    white-space: nowrap;
    background: var(--card);
    border-top: 1px solid var(--line);
}

/* PC显示滚动条 */
.chips-wrap::-webkit-scrollbar {
    height: 6px;
}

.chips-wrap::-webkit-scrollbar-track {
    background: transparent;
}

.chips-wrap::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    margin-right: 8px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    cursor: pointer;
    transition: all .16s ease;
    user-select: none;
    font-size: 13px;
    border-radius: var(--radius);
}

.chip.active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.summary-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    background: var(--card-soft);
    border: 1px solid var(--line);
    border-top: 0;
    color: var(--muted);
    font-size: 13px;
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
}

.list {
    display: grid;
    gap: 12px;
}

.article-card {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 12px;
    padding: 12px;
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    transition: transform .15s ease, border-color .15s ease;
    border-radius: var(--radius);
}

.article-card:active {
    transform: scale(.995);
}

.thumb {
    width: 112px;
    height: 84px;
    overflow: hidden;
    background: #e9eef5;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.thumb-fallback {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 12px;
    color: #8a97a6;
    background: linear-gradient(135deg, #edf3f9, #e3ebf4);
}

.meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.meta-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.cat-tag {
    flex: 0 0 auto;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    font-size: 12px;
    color: var(--brand-dark);
    background: var(--brand-soft);
    border: 1px solid #cde1f7;
}

.title {
    margin: 0 0 6px;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--text);
}

.summary {
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta-bottom {
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.mini {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    color: #526172;
    border-radius: var(--radius);
}

.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px;
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

.pager-info {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.pager-btns {
    display: flex;
    gap: 8px;
}

.btn {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--brand);
    background: #fff;
    color: var(--brand);
    cursor: pointer;
    transition: all .16s ease;
    border-radius: var(--radius);
}

.btn.primary {
    background: var(--brand);
    color: #fff;
}

.btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.empty,
.loading,
.error {
    padding: 30px 16px;
    text-align: center;
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    color: var(--muted);
    line-height: 1.7;
}

.error {
    color: var(--danger);
}

.footer-space {
    height: 20px;
}

@media (max-width: 520px) {
    .title-main h1 {
        font-size: 22px;
    }

    .hero-title {
        font-size: 20px;
    }

    .article-card {
        grid-template-columns: 96px 1fr;
        gap: 10px;
    }

    .thumb {
        width: 96px;
        height: 76px;
    }

    .title {
        font-size: 16px;
    }
    .chips-wrap {
        scrollbar-width: none;
    }

    .chips-wrap::-webkit-scrollbar {
        display: none;
    }
}
