:root {
    --bg: #fff5fb;
    --card: #ffffff;
    --card2: #fff9fd;
    --text: #670028;
    --muted: #a05a78;
    --line: #ffd9e8;
    --pink: #ec2b86;
    --pink2: #ff74b7;
    --blue: #2377ff;
    --tag: #fff8fc;
    --shadow: 0 4px 14px rgba(160, 0, 70, .12);
    --top-h: 52px;

    --drawer-bg: #ffffff;
    --drawer-text: #65002e;
    --drawer-muted: #9a5a75;
    --drawer-line: #ffd9e8;
    --drawer-search-bg: #fff4fa;
    --drawer-search-text: #65002e;
    --drawer-label: #65002e;
    --drawer-theme-bg: #ffffff;
    --drawer-theme-border: #ffc3dc;
    --drawer-theme-text: #5b6fff;
}

body.dark {
    --bg: #1f1f1f;
    --card: #303030;
    --card2: #363636;
    --text: #eeeeee;
    --muted: #bdbdbd;
    --line: #4b4b4b;
    --pink: #3f7cff;
    --pink2: #6f96ff;
    --blue: #3f7cff;
    --tag: #3a3a3a;
    --shadow: none;

    --drawer-bg: #242424;
    --drawer-text: #eeeeee;
    --drawer-muted: #bdbdbd;
    --drawer-line: #4b4b4b;
    --drawer-search-bg: #303030;
    --drawer-search-text: #eeeeee;
    --drawer-label: #eeeeee;
    --drawer-theme-bg: #303030;
    --drawer-theme-border: #555555;
    --drawer-theme-text: #8fb0ff;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font-family: inherit;
}

button {
    cursor: pointer;
}

body.drawer-open,
body.notice-open {
    overflow: hidden;
}

body.drawer-open .page-wrap,
body.drawer-open .topbar {
    filter: blur(4px);
    pointer-events: none;
    user-select: none;
}

body.notice-open .page-wrap,
body.notice-open .topbar {
    filter: blur(3px);
    pointer-events: none;
    user-select: none;
}

.topbar {
    height: var(--top-h);
    position: sticky;
    top: 0;
    z-index: 90;
    background: #fff;
    border-bottom: 1px solid #f3e8ee;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .04);
    transition: filter .2s ease;
}

body.dark .topbar {
    background: #242424;
    border-color: #151515;
}

.top-inner {
    max-width: 430px;
    margin: 0 auto;
    height: 100%;
    padding: 0 18px;
    display: grid;
    grid-template-columns: 28px 28px 1fr 28px 28px;
    gap: 22px;
    align-items: center;
}

.icon-btn {
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    color: var(--blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.icon-btn svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.logo {
    justify-self: center;
    text-align: center;
    font-weight: 900;
    color: #3980ff;
    line-height: .8;
    font-size: 20px;
    letter-spacing: -1px;
}

.desktop-search {
    display: none;
}

.page-wrap {
    max-width: 430px;
    margin: 0 auto;
    padding: 8px 7px 20px;
    transition: filter .2s ease;
}


.topic {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 106px;
    gap: 11px;
    padding: 14px;
    border-bottom: 1px solid var(--line);
}

.topic:last-child {
    border-bottom: 0;
}

.topic h3 {
    margin: 0 0 9px;
    font-size: 16px;
    line-height: 1.25;
    color: var(--text);
}

.topic p {
    margin: 0;
    color: var(--text);
    opacity: .86;
    line-height: 1.6;
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.thumb {
    width: 106px;
    height: 106px;
    border-radius: 7px;
    border: 0;
    background: linear-gradient(135deg, #ffe2ef, #ffd0e2, #cfe4ff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bf4778;
    font-weight: 800;
    overflow: hidden;
}

.meta {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 12px;
}

.pill {
    height: 27px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--tag);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 10px;
    color: var(--muted);
}

.meta .spacer {
    flex: 1;
}

.drawer-mask {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 180;
    background: rgba(0, 0, 0, .62);
    backdrop-filter: blur(2px);
}

.drawer-mask.show {
    display: block;
}

.drawer {
    position: fixed;
    z-index: 190;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: var(--drawer-bg);
    color: var(--drawer-text);
    border-radius: 0 10px 10px 0;
    transition: left .25s ease, background .2s ease, color .2s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.drawer.show {
    left: 0;
}

.drawer::-webkit-scrollbar {
    width: 6px;
}

.drawer::-webkit-scrollbar-track {
    background: transparent;
}

.drawer::-webkit-scrollbar-thumb {
    background: #aaa;
    border-radius: 10px;
}

body.dark .drawer::-webkit-scrollbar-thumb {
    background: #555;
}

.drawer-head {
    height: 86px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--drawer-line);
}

.drawer-title {
    font-weight: 900;
    font-size: 16px;
    color: var(--drawer-text);
}

.close-btn {
    border: 0;
    background: transparent;
    color: var(--drawer-text);
    font-size: 26px;
    line-height: 1;
}

.drawer-section {
    padding: 22px 24px;
    border-bottom: 1px solid var(--drawer-line);
}

.drawer-label {
    font-weight: 800;
    font-size: 13px;
    margin-bottom: 14px;
    color: var(--drawer-label);
}

.drawer-search {
    position: relative;
    height: 46px;
    border-radius: 8px;
    background: var(--drawer-search-bg);
    display: flex;
    align-items: center;
    padding: 0 14px;
    border: 1px solid transparent;
}

body.dark .drawer-search {
    border-color: #444;
}

.drawer-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--drawer-search-text);
    padding-right: 42px;
}

.drawer-search input::placeholder {
    color: var(--drawer-muted);
}

.drawer-search svg {
    width: 16px;
    height: 16px;
    stroke: var(--blue);
    fill: none;
    stroke-width: 2;
    flex: 0 0 auto;
}

.clear-search {
    position: absolute;
    right: 34px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--drawer-muted);
    font-size: 18px;
    display: none;
}

.drawer-search.has-value .clear-search {
    display: block;
}

.theme-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.theme-btn {
    height: 48px;
    border-radius: 9px;
    border: 1px solid var(--drawer-theme-border);
    background: var(--drawer-theme-bg);
    color: var(--drawer-theme-text);
    font-weight: 800;
}

.theme-btn.active.light {
    border-color: #ffb13c;
    background: #fff8ee;
    color: #ff9300;
}

.theme-btn.active.dark {
    border-color: #5b6fff;
    background: #f4f6ff;
    color: #5b6fff;
}

body.dark .theme-btn.active.light {
    border-color: #555;
    background: #303030;
    color: #aaa;
}

body.dark .theme-btn.active.dark {
    border-color: #3f7cff;
    background: rgba(63, 124, 255, .16);
    color: #8fb0ff;
}

.node-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.node-item {
    height: 51px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 700;
    color: var(--drawer-text);
    transition: color .2s ease, background .2s ease;
    border-radius: 8px;
    padding: 0 4px;
}

.node-item:hover {
    background: rgba(236, 43, 134, .08);
    color: #ec2b86;
}

body.dark .node-item:hover {
    background: rgba(63, 124, 255, .14);
    color: #8fb0ff;
}

.node-item span {
    width: 18px;
    text-align: center;
}

.notice-mask {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 240;
    background: rgba(0, 0, 0, .42);
    backdrop-filter: blur(2px);
    padding: 18px;
}

.notice-mask.show {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.notice-modal {
    width: 100%;
    max-width: 360px;
    margin-top: 8px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(80, 0, 40, .22);
    border: 1px solid #f2dce7;
    color: #666;
    overflow: hidden;
    animation: noticeIn .18s ease;
}

@keyframes noticeIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.notice-head {
    height: 48px;
    padding: 0 16px 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1e4eb;
}

.notice-title {
    font-size: 15px;
    font-weight: 500;
    color: #555;
}

.notice-close {
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    color: #999;
    font-size: 22px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notice-body {
    padding: 16px 18px 14px;
    margin: 0;
    line-height: 1.8;
    color: #000;
    font-size: 13px;
}

.notice-body img {
    width: 100%;
    height: auto;
}

.notice-text a {
    color: #80a83c;
    font-weight: 800;
    text-decoration: underline;
}

.notice-foot {
    display: flex;
    justify-content: flex-end;
    padding: 2px 18px 18px;
}

.notice-cancel {
    height: 38px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid #e5e7ef;
    background: #fff;
    color: #666;
}

.footer {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    padding: 18px 0 4px;
}

@media (max-width: 360px) {
    .drawer {
        width: 86vw;
        left: -86vw;
    }

    .drawer.show {
        left: 0;
    }

    .notice-mask {
        padding: 12px;
    }

    .notice-modal {
        max-width: none;
    }

    .city-card {
        padding: 16px 14px 20px;
    }

    .city-tags {
        gap: 11px 10px;
    }

    .city-tag {
        min-width: 58px;
        height: 36px;
        padding: 0 14px;
        font-size: 14px;
    }
}

@media (min-width: 721px) {
    :root {
        --top-h: 58px;
    }

    .top-inner {
        max-width: 980px;
        padding: 0 26px;
        grid-template-columns: 28px 1fr auto 300px 28px 28px;
        gap: 26px;
    }

    .mobile-search-btn {
        display: none;
    }

    .logo {
        grid-column: 3;
        font-size: 20px;
    }

    .desktop-search {
        grid-column: 4;
        width: 300px;
        height: 36px;
        border-radius: 8px;
        background: #fff4fa;
        display: flex;
        align-items: center;
        padding: 0 12px 0 16px;
    }

    .desktop-search input {
        flex: 1;
        min-width: 0;
        height: 100%;
        border: 0;
        outline: 0;
        background: transparent;
        color: #65002e;
        font-size: 14px;
    }

    .desktop-search input::placeholder {
        color: #b10057;
    }

    .desktop-search button {
        width: 28px;
        height: 28px;
        border: 0;
        background: transparent;
        color: var(--blue);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .desktop-search svg {
        width: 17px;
        height: 17px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    body.dark .desktop-search {
        background: #303030;
    }

    body.dark .desktop-search input {
        color: #eee;
    }

    body.dark .desktop-search input::placeholder {
        color: #aaa;
    }

    .page-wrap,
    .top-inner {
        max-width: 980px;
    }

    .page-wrap {
        padding-left: 12px;
        padding-right: 12px;
    }

    .layout {
        display: block;
    }

    .topic {
        grid-template-columns: minmax(0, 1fr) 118px;
    }

    .thumb {
        width: 118px;
        height: 94px;
    }

    .notice-modal {
        margin-top: 12px;
    }
}

.top-user-box {
    position: relative;
    display: inline-block;
}

.icon-btn,
.top-user-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
}

.icon-btn svg,
.top-user-btn svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.top-username {
    cursor: pointer;
    font-size: 14px;
    max-width: 90px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.top-user-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 36px;
    min-width: 120px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    padding: 6px 0;
    z-index: 999;
}

.top-user-menu a {
    display: block;
    padding: 9px 14px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.top-user-menu a:hover {
    background: #f5f5f5;
}

.top-user-menu.show {
    display: block;
}
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 18px 10px;
    margin: 0;
    list-style: none;

    /* 白色主题 */
    background: #ffffff;
    border-top: 1px solid #eeeeee;
}

.pagination li {
    display: inline-flex;
}

.pagination li a,
.pagination li span {
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border-radius: 5px;
    border: 1px solid #dcdfe6;
    background: #ffffff;
    color: #333333;
    font-size: 13px;
    line-height: 30px;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.pagination li a:hover {
    background: #f2f6ff;
    border-color: #3b82f6;
    color: #3b82f6;
}

.pagination li.active span {
    background: #409eff;
    border-color: #409eff;
    color: #ffffff;
    font-weight: 600;
}

.pagination li.disabled span {
    background: #f5f5f5;
    border-color: #eeeeee;
    color: #b5b5b5;
    cursor: not-allowed;
}

/* 手机端优化 */
@media screen and (max-width: 600px) {
    .pagination {
        gap: 5px;
        padding: 16px 8px;
        background: #ffffff;
        border-top: 1px solid #eeeeee;
    }

    .pagination li a,
    .pagination li span {
        min-width: 29px;
        height: 29px;
        padding: 0 7px;
        font-size: 13px;
        line-height: 29px;
        border-radius: 5px;
    }
}

.empty-box {
    margin: 12px 8px;
    padding: 46px 16px;
    border-radius: 8px;
    border: 1px dashed #f3b6c8;
    background: #fff5f9;
    color: #b04a70;
    font-size: 15px;
    text-align: center;
    letter-spacing: 1px;
}

/* 暗黑主题 */
body.dark .empty-box,
.dark .empty-box {
    border-color: #444444;
    background: #2b2b2b;
    color: #dddddd;
}