/* ============ 主题变量 ============ */
:root {
    --brand: #ff5c39;
    --brand-soft: rgba(255, 92, 57, .12);
    --bg: #f4f5f7;
    --card: #ffffff;
    --text: #16181d;
    --text-2: #6b7280;
    --line: #e8eaee;
    --hover: rgba(0, 0, 0, .06);
    --header-h: 52px;
    --footer-h: 56px;
    --shadow: 0 2px 10px rgba(16, 24, 40, .06);
}

[data-theme="dark"] {
    --brand: #ff6b4a;
    --brand-soft: rgba(255, 107, 74, .18);
    --bg: #0e1013;
    --card: #171a1f;
    --text: #e9ecef;
    --text-2: #8b929c;
    --line: #242830;
    --hover: rgba(255, 255, 255, .08);
    --shadow: 0 2px 10px rgba(0, 0, 0, .45);
}

/* ============ 基础 ============ */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent
}

html,
body {
    margin: 0;
    padding: 0
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    padding-bottom: calc(var(--footer-h) + env(safe-area-inset-bottom));
    -webkit-font-smoothing: antialiased;
    transition: background .25s, color .25s;
}

a {
    color: inherit;
    text-decoration: none
}

button {
    font-family: inherit
}

svg {
    display: block
}

/* ============ 头部 ============ */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    padding-top: env(safe-area-inset-top);
    transition: background .25s, border-color .25s;
}

.header-bar {
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
}

.logo-light {
    width: 130px;
    display: flex;
    align-items: center;
    gap: 8px
}

.logo img {
    width: 130px;
    height: auto;
}
.logo .logo-dark { display: none;width: 130px; }

/* 深色模式：切换显示 */
[data-theme="dark"] .logo .logo-light { display: none; }
[data-theme="dark"] .logo .logo-dark  { display: block; }
.logo-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff7a45, #ff3d00);
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 4px 12px rgba(255, 92, 57, .35);
}

.logo-mark svg {
    width: 20px;
    height: 20px
}

.logo-text {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .3px
}

.logo-text b {
    color: var(--brand);
    font-weight: 700
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 2px
}

.icon-btn {
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    color: var(--text);
    border-radius: 10px;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background .2s;
}

.icon-btn:active {
    background: var(--hover)
}

.icon-btn svg {
    width: 22px;
    height: 22px
}

/* 搜索面板 */
.search-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height .28s cubic-bezier(.4, 0, .2, 1);
}

.search-panel.open {
    max-height: 80px
}

.search-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px 10px
}

.search-field {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    background: var(--bg);
    border: 1px solid var(--line);
}

.search-field form {
    display: flex;
}

.search-field svg {
    width: 18px;
    height: 18px;
    color: var(--text-2);
    flex: 0 0 auto
}

.search-field input {
    flex: 1;
    border: 0;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: var(--text);
}

.search-field input::placeholder {
    color: var(--text-2)
}

.btn-text {
    border: 0;
    background: transparent;
    color: var(--brand);
    font-size: 14px;
    padding: 0 4px;
    cursor: pointer;
}

/* ============ 页面容器 ============ */
.page {
    max-width: 680px;
    margin: 0 auto;
    padding-bottom: 16px
}

@keyframes fade {
    from {
        opacity: 0;
        transform: translateY(6px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

/* ============ 首页 Banner ============ */
.banner {
    position: relative;
    /* margin: 12px;
    border-radius: 16px; */
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--card);
    box-shadow: var(--shadow);
    touch-action: pan-y;
    margin-bottom: 25px;
}

.banner-track {
    display: flex;
    height: 100%;
    transition: transform .45s cubic-bezier(.4, 0, .2, 1)
}

.banner-slide {
    flex: 0 0 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 16px;
    color: #fff;
}

.banner-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, .6) 100%);
}

.banner-info {
    position: relative;
    z-index: 1
}

.banner-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .22);
    backdrop-filter: blur(6px);
    margin-bottom: 8px;
}

.banner-tag::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, .28);
}

.banner-info h3 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600
}

.banner-info p {
    margin: 0;
    font-size: 12px;
    opacity: .85
}

.banner-dots {
    position: absolute;
    right: 14px;
    bottom: 20px;
    display: flex;
    gap: 5px;
    z-index: 2;
}

.banner-dots i {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .5);
    transition: .25s;
}

.banner-dots i.active {
    width: 16px;
    background: #fff
}

/* ============ 首页大洲区块 ============ */
.section {
    margin: 0 12px 22px
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.section-head h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600
}

.more {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    color: var(--text-2);
}

.more svg {
    width: 14px;
    height: 14px
}

/* ============ 频道卡片 ============ */
.channel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 10px
}

.ch-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.ch-logo {
    width: 100%;
    height: 100%;
    border-radius: 5px;
    border: 1px solid #ddd;
    box-shadow: 0 3px 10px rgba(16, 24, 40, .14);
    transition: transform .18s;
    aspect-ratio: 8 / 5;
}

.ch-card:active .ch-logo {
    transform: scale(.94)
}

.ch-name {
    height: 22px;
    font-size: 13px;
    color: #8b929c;
    text-align: center;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============ 列表页 ============ */
.page-head {
    display: flex;
    justify-content: space-between;
    /* padding: 16px 12px 4px; */
    padding: 30px 12px 30px;
    background-size: cover;
}

.page-head h1 {
    margin: 0;
    font-size: 19px;
    font-weight: 600;
    color: white;
}

.page-sub {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--text-2)
}

.page-head .typeimg {
    align-content: center;
}

.page-head .typeimg img {
    height: 44px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.cat-block {
    padding: 10px 12px 0;
    position: relative
}

.cats {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    overflow: hidden;
    transition: max-height .3s ease;
}

.cats.collapsed {
    max-height: 80px
}

.chip {
    height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--text-2);
    font-size: 13px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    transition: .2s;
}

.chip.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 3px 10px rgba(255, 92, 57, .3);
}

.cat-toggle {
    display: none;
    align-items: center;
    gap: 2px;
    margin: 2px auto 0;
    padding: 4px 10px;
    border: 0;
    background: transparent;
    color: var(--text-2);
    font-size: 12px;
    cursor: pointer;
}

.cat-toggle .chev {
    width: 14px;
    height: 14px;
    transition: transform .25s
}

.cat-toggle.up .chev {
    transform: rotate(180deg)
}

.type-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 12px 4px;
    scrollbar-width: none;
}

.type-row::-webkit-scrollbar {
    display: none
}

.type-row .chip {
    height: 28px;
    font-size: 12px;
    padding: 0 12px
}

.list-grid {
    margin: 12px 12px 0
}

/* 分页 */
.pager {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 22px 12px 8px;
}

.page li {
    list-style: none;
}

.pager li a,
.pageinfo {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    transition: .2s;
    list-style: none;
}

.pager li.selected {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 3px 10px rgba(255, 92, 57, .3);
    padding: 8px 12px;
    font-size: 12.5px;
    border-radius: 8px;
}

.pager li:disabled {
    opacity: .35;
    pointer-events: none
}

/* ============ 播放页 ============ */
.player-wrap {}

.player {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow);
    min-height: 250px;
}

.player iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    position: absolute;
    inset: 0
}

.player-ph {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #7b828d;
    font-size: 13px;
    background: radial-gradient(circle at 50% 40%, #1c2027, #0a0c0f 70%);
}

.player-ph svg {
    width: 46px;
    height: 46px;
    opacity: .5
}

.play-title {
    padding: 14px 14px 0;
    margin: 0;
    font-size: 17px;
    font-weight: 600
}

.lines {
    padding: 14px 12px 0
}

.lines-label {
    font-size: 12px;
    color: var(--text-2);
    margin-bottom: 8px
}

.line-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px
}

.line-btn {
    height: 34px;
    padding: 0 16px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    transition: .2s;
}

.line-btn.active {
    background: var(--brand-soft);
    border-color: var(--brand);
    color: var(--brand);
    font-weight: 600;
}

.card {
    margin: 16px 12px 0;
    padding: 14px;
    background: var(--card);
    border-radius: 10px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.card h3 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600
}

.card .desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.75;
    color: var(--text-2)
}

.rec-title {
    margin: 22px 12px 10px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rec-title::before {
    content: '';
    width: 3px;
    height: 15px;
    border-radius: 2px;
    background: var(--brand);
}

.rec-grid {
    margin: 0 12px
}

/* ============ 底部 Tab ============ */
.footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    background: var(--card);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
    transition: background .25s, border-color .25s;
}

.tabbar {
    display: flex;
    height: var(--footer-h);
    max-width: 680px;
    margin: 0 auto
}

.tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-2);
    font-size: 11px;
    cursor: pointer;
    border: 0;
    background: transparent;
    transition: color .2s;
}

.tab svg {
    width: 22px;
    height: 22px
}

.tab.active {
    color: var(--brand)
}

/* ============ 侧边栏 ============ */
.drawer-mask {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s, visibility .28s;
}

.drawer-mask.open {
    opacity: 1;
    visibility: visible
}

.drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    width: 79%;
    max-width: 320px;
    background: var(--card);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
    box-shadow: -8px 0 30px rgba(0, 0, 0, .18);
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

.drawer.open {
    transform: translateX(0)
}

.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    padding: 0 8px 0 16px;
    border-bottom: 1px solid var(--line);
    flex: 0 0 auto;
}

.drawer-title {
    font-size: 15px;
    font-weight: 600
}

.drawer-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 12px;
    border-radius: 10px;
    font-size: 14px;
    color: var(--text);
    transition: background .2s;
}

.nav-item:active,
.nav-item.active {
    background: var(--brand-soft);
    color: var(--brand)
}

.nav-item span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-item svg {
    width: 18px;
    height: 18px;
    /* fill: currentcolor; */
    opacity: .5
}

.nav-item.active svg {
    opacity: 1
}

.drawer-foot {
    flex: 0 0 auto;
    border-top: 1px solid var(--line);
    padding: 12px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.foot-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px
}

.foot-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-2);
}

.foot-label svg {
    width: 18px;
    height: 18px
}

.lang-select {
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
    padding: 0 8px;
    outline: none;
}

/* 开关 */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex: 0 0 auto
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0
}

.slider {
    position: absolute;
    inset: 0;
    background: var(--line);
    border-radius: 999px;
    transition: .25s;
    cursor: pointer;
}

.slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: .25s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}

.switch input:checked+.slider {
    background: var(--brand)
}

.switch input:checked+.slider::before {
    transform: translateX(20px)
}

/* ============ 表单模态框 ============ */
.modal-mask {
    position: fixed;
    inset: 0;
    z-index: 140;
    background: rgba(0, 0, 0, .5);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
}

.modal-mask.open {
    opacity: 1;
    visibility: visible
}

.modal {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 150;
    width: calc(100% - 40px);
    max-width: 380px;
    max-height: 88vh;
    overflow-y: auto;
    transform: translate(-50%, -46%) scale(.96);
    background: var(--card);
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
    opacity: 0;
    visibility: hidden;
    transition: .28s cubic-bezier(.4, 0, .2, 1);
    padding: 20px;
}

.modal.open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1)
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.modal-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600
}

.form-group {
    margin-bottom: 14px
}

.form-group label {
    display: block;
    font-size: 12px;
    color: var(--text-2);
    margin-bottom: 6px
}

.form-group select,
.form-group input,
.form-group .title {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    appearance: none;
    -webkit-appearance: none;
}

.form-group .title {
    display: flex;
    align-items: center;
}

.form-group textarea {
    width: 100%;
    height: 60px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    appearance: none;
    -webkit-appearance: none;
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-group select:focus,
.form-group input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
}

.captcha-row {
    /* display: flex; */
    /* gap: 8px */
    position: relative;
}

.captcha-row input {
    flex: 1
}

.captcha-code {
    /* border: 1px dashed var(--brand); */
    position: absolute;
    margin: 8px 0 0px -75px;
}

.captcha-code:active {
    transform: scale(.95)
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px
}

.btn-primary,
.btn-ghost {
    flex: 1;
    height: 42px;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
    border: 0;
}

.btn-primary {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 92, 57, .3);
}

.btn-primary:active {
    transform: scale(.97)
}

.btn-ghost {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--line);
}

.btn-ghost:active {
    background: var(--hover)
}

.form-tip {
    font-size: 11px;
    color: var(--text-2);
    margin-top: 10px;
    text-align: center;
}

/* Toast */
.toast {
    position: fixed;
    left: 50%;
    bottom: calc(var(--footer-h) + 26px);
    transform: translate(-50%, 10px);
    z-index: 200;
    background: rgba(0, 0, 0, .82);
    color: #fff;
    font-size: 13px;
    padding: 9px 18px;
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    transition: .25s;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0)
}

.share-icons {
    display: grid;
    justify-content: space-around;
    margin-top: 10px;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.sharer-icon {
    justify-content: center;
    display: flex;
}

.share-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--c-text-2);
    cursor: pointer;
}

.sharer-btn {
    display: grid;
}

.share-icon-item button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    color: inherit;
    outline: none;
}

.sharer-btn svg {
    width: 30px;
    height: 30px;
}

.sharer-btn.qzone .sharer-icon {
    color: #f5c926;
}

.sharer-btn.facebook .sharer-icon {
    color: #1877f2;
}

.sharer-btn.twitter .sharer-icon {
    color: #000;
}

.sharer-btn.weibo .sharer-icon {
    color: #e6162d;
}

.sharer-btn.telegram .sharer-icon {
    color: #229ed9;
}

.sharer-btn.whatsapp .sharer-icon {
    color: #25d366;
}

.sharer-btn.linkedin .sharer-icon {
    color: var(--c-linkedin);
}

.sharer-btn.reddit .sharer-icon {
    color: var(--c-reddit);
}

.sharer-btn.pinterest .sharer-icon {
    color: var(--c-pinterest);
}

.sharer-btn.viber .sharer-icon {
    color: var(--c-viber);
}

.sharer-btn.myspace .sharer-icon {
    color: #000000;
}

.sharer-btn.blogger .sharer-icon {
    color: var(--c-blogger);
}

.sharer-btn.evernote .sharer-icon {
    color: var(--c-evernote);
}

.sharer-btn.flipboard .sharer-icon {
    color: var(--c-pinterest);
}

.sharer-btn.stumbleupon .sharer-icon {
    color: var(--c-stumble);
}

.sharer-btn.digg .sharer-icon {
    color: #000000;
}

.sharer-btn.pocket .sharer-icon {
    color: var(--c-pocket);
}

.sharer-btn.instapaper .sharer-icon {
    color: var(--c-instapaper);
}

.drawer-brand {
    padding: 25px 20px;
    background: linear-gradient(135deg, #e34b2b 0%, #ff7b5c 100%);
}

.brand-inner {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    padding: 6px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.brand-title {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
}

.brand-slogan {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
}

.cat-tabs-wrap {
    position: sticky;
    top: var(--header-h);
    z-index: 30;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    padding: 0 12px;
    transition: background .25s, border-color .25s;
}

.cat-tabs {
    display: flex;
    justify-content: space-between;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.cat-tabs::-webkit-scrollbar {
    display: none;
}

.cat-tab {
    position: relative;
    flex: 0 0 auto;
    height: 44px;
    padding: 0 14px;
    border: 0;
    background: transparent;
    color: var(--text-2);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: color .2s;
}

.cat-tab:hover {
    color: var(--text);
}

.cat-tab.active {
    color: var(--brand);
    font-weight: 600;
}

.cat-tab.active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 22px;
    height: 3px;
    border-radius: 3px;
    background: var(--brand);
    transition: width .2s;
}
.empty-state {
    margin: 20px 10px;
    border: 1px solid #ddd;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    flex-flow: column;
}
.empty-icon {
    display: flex;
    justify-content: center;
}
.empty-icon svg {
    width: 100px;
    fill: currentColor;
}
.empty-title {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}
.empty-desc {
    text-align: center;
    font-size: 12.5px;
    color: #6b7280;
}
.empty-suggestions {
    font-size: 12.5px;
    color: #6b7280;
}
/* ============ 赞助弹窗 ============ */
.donate-tabs {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid var(--line);
    /* .modal 本身 padding: 20px，负 margin 让 tab 栏贴边 */
    margin: 0 -20px 18px;
    padding: 0 12px;
}
.donate-tabs::-webkit-scrollbar { display: none; }

.donate-tab {
    position: relative;
    flex: 0 0 auto;
    height: 40px;
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: color .2s;
}
.donate-tab:hover { color: var(--text); }
.donate-tab.active {
    color: var(--brand);
    font-weight: 600;
}
.donate-tab.active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -1px;
    transform: translateX(-50%);
    width: 22px;
    height: 3px;
    border-radius: 3px;
    background: var(--brand);
}

/* 面板 */
.donate-panel { display: none; }
.donate-panel.active {
    display: block;
    animation: fade .25s ease;
}

/* 二维码容器：固定 1:1，图片没加载也不塌陷 */
.donate-qr {
    width: 200px;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    border-radius: 12px;
    background: var(--bg);
    border: 1px dashed var(--line);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.donate-qr img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.donate-tip {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-2);
    text-align: center;
}
.donate-account {
    margin: 0;
    font-size: 12px;
    color: var(--text-2);
    text-align: center;
    word-break: break-all;
}
.donate-account code {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 12px;
    font-family: ui-monospace, Menlo, Consolas, monospace;
}

/* PayPal 按钮 */
.donate-paypal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 20px;
    margin: 4px auto 12px;
    border-radius: 11px;
    background: #0070ba;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 112, 186, .3);
    transition: transform .15s, background .2s;
    /* 让按钮在父级居中 */
    display: flex;
    width: fit-content;
}
.donate-paypal-btn:active { transform: scale(.97); }
.donate-paypal-btn svg { width: 20px; height: 20px; }

/* 费用用途列表 */
.usage-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.usage-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-2);
}
.usage-list li svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 3px;
    color: var(--brand);
}
.usage-list li strong {
    color: var(--text);
    font-weight: 600;
}

.usage-note {
    margin: 16px 0 0;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
    font-size: 12px;
    color: var(--text-2);
    text-align: center;
    line-height: 1.7;
}