:root {
    --bg-base: #101216;
    --bg-surface: rgba(20, 26, 38, 0.55);
    --bg-card: rgba(24, 30, 44, 0.62);
    --border-soft: rgba(255, 255, 255, 0.07);
    --border-glow: rgba(122, 148, 176, 0.35);
    --accent-cyan: #7a94b0;
    --accent-violet: #8a94a2;
    --accent-teal: #7ea09c;
    --text-main: #e8edf5;
    --text-muted: #8b9bb0;
    --text-dim: #6b7a90;
    --radius-lg: 22px;
    --radius-md: 16px;
    --shadow-deep: 0 24px 48px -16px rgba(0, 0, 0, 0.65);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", "微软雅黑", "Helvetica Neue", sans-serif;
}

html, body {
    background-color: var(--bg-base);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    scroll-behavior: smooth;
}

body {
    background-image:
        radial-gradient(circle at 18% 22%, rgba(122, 148, 176, 0.14) 0%, transparent 45%),
        radial-gradient(circle at 82% 70%, rgba(134, 144, 158, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 50% 100%, rgba(126, 160, 156, 0.08) 0%, transparent 55%);
    position: relative;
}

.aurora-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.aurora-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
    animation: orbFloat 18s ease-in-out infinite;
}

.aurora-orb.orb-1 {
    width: 480px;
    height: 480px;
    top: -120px;
    left: -100px;
    background: radial-gradient(circle, rgba(122, 148, 176, 0.45), transparent 70%);
}

.aurora-orb.orb-2 {
    width: 520px;
    height: 520px;
    bottom: -160px;
    right: -120px;
    background: radial-gradient(circle, rgba(134, 144, 158, 0.4), transparent 70%);
    animation-delay: -6s;
    animation-duration: 22s;
}

.aurora-orb.orb-3 {
    width: 360px;
    height: 360px;
    top: 40%;
    left: 55%;
    background: radial-gradient(circle, rgba(126, 160, 156, 0.28), transparent 70%);
    animation-delay: -3s;
    animation-duration: 26s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.08); }
    66% { transform: translate(-30px, 40px) scale(0.96); }
}

.grid-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
    padding: 9px 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    background: #14161b;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0;
    box-shadow: 0 6px 20px -14px rgba(0, 0, 0, 0.8);
    z-index: 200;
}

/* 公告入口暂时隐藏：页面与逻辑都保留，需要恢复时删掉这条规则即可 */
.nav-item[data-page="announcement"] {
    display: none;
}

.logo-area {
    display: none;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.nav-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 0;
    position: relative;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 11px 26px;
    background: transparent;
    border: none;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    transition: color 0.25s ease, transform 0.25s ease;
    text-align: center;
    width: auto;
    position: relative;
    z-index: 2;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.nav-item::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.nav-item:hover {
    color: #ffffff;
    transform: translateY(-2px);
}

.nav-item:hover::before {
    opacity: 1;
}

.nav-item.active {
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7), 0 0 2px rgba(0, 0, 0, 0.5);
}

.nav-item.active::before {
    opacity: 0;
}

.nav-slider {
    position: absolute;
    top: 0;
    bottom: 0;
    height: auto;
    left: 0;
    width: 0;
    background: rgba(122, 148, 176, 0.24);
    border-radius: 999px;
    transition: left 0.35s ease, width 0.35s ease;
    pointer-events: none;
    z-index: 1;
}

.main-content {
    flex: 1;
    padding: 84px 36px 130px 36px;
    overflow-y: auto;
    scroll-behavior: smooth;
    position: relative;
    z-index: 2;
}

.page-view {
    display: none;
}

.page-view.active-page {
    display: block;
    animation: pageEnter 0.55s cubic-bezier(0.2, 0.9, 0.4, 1.15) forwards;
}

@keyframes pageEnter {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
        filter: blur(4px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.card-pane {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(36px) saturate(180%);
    -webkit-backdrop-filter: blur(36px) saturate(180%);
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        var(--shadow-deep);
    padding: 30px 32px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.card-pane::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
}

.page-title {
    font-size: 30px;
    font-weight: 600;
    margin-bottom: 22px;
    color: #ffffff;
    letter-spacing: -0.3px;
    position: relative;
    padding-left: 20px;
}

.page-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--accent-cyan), var(--accent-violet));
    box-shadow: 0 0 12px rgba(122, 148, 176, 0.6);
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 26px;
    margin: 20px 0 15px;
}

.software-card {
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    display: flex;
    flex-direction: column;
    position: relative;
    transform-style: preserve-3d;
    opacity: 0;
    transform: translateY(42px);
    transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.2), border-color 0.3s ease, box-shadow 0.3s ease, opacity 0.4s ease;
    will-change: transform, opacity;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.software-card.rising {
    animation: cardFloatUp 0.85s cubic-bezier(0.2, 0.85, 0.4, 1.1) forwards;
}

@keyframes cardFloatUp {
    0% {
        opacity: 0;
        transform: translateY(42px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.software-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    pointer-events: none;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.16), transparent 60%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.software-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.38);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        0 28px 48px -18px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.12);
}

.software-card:hover::after {
    opacity: 1;
}

.software-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.02) 0 12px, transparent 12px 24px),
        rgba(8, 12, 20, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: transform 0.45s ease;
}

.software-img::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.35));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.software-card:hover .software-img::after {
    opacity: 1;
}

.software-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: none;
    padding: 10px;
    transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.4, 1.2), filter 0.3s ease;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.4));
}

.software-card:hover .software-img img {
    transform: scale(1.06);
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.5));
}

.software-info {
    padding: 20px 22px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.software-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #f3f6fc;
    letter-spacing: 0.2px;
}

.software-desc {
    font-size: 0.88rem;
    line-height: 1.55;
    color: #b3c2d6;
    margin-bottom: 16px;
    flex: 1;
}

.version-meta {
    font-size: 0.74rem;
    color: var(--text-dim);
    margin-bottom: 18px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    padding-top: 12px;
    letter-spacing: 0.3px;
}

.download-btn {
    display: inline-block;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.38);
    padding: 11px 22px;
    border-radius: 40px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    width: fit-content;
    align-self: flex-start;
    margin-top: 6px;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-family: inherit;
}

.download-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

.download-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.2));
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        0 10px 24px -6px rgba(0, 0, 0, 0.45);
    color: #ffffff;
}

.download-btn:hover::before {
    left: 130%;
}

.tip-warning {
    background: rgba(255, 255, 255, 0.08);
    border-left: 3px solid var(--accent-violet);
    padding: 14px 22px;
    border-radius: 14px;
    margin-top: 22px;
    color: #e5edf7;
    font-size: 14px;
    line-height: 1.6;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.announcement-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.announcement-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
    border-radius: var(--radius-md);
    padding: 20px 24px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.announcement-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--accent-cyan), var(--accent-violet));
    opacity: 0.7;
}

.announcement-item:hover {
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        0 12px 28px -10px rgba(0, 0, 0, 0.5);
}

.announcement-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #eef4ff;
}

.announcement-meta {
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 12px;
}

.announcement-content {
    font-size: 14px;
    line-height: 1.65;
    color: #cbdbec;
    white-space: pre-wrap;
    word-break: break-word;
}

.ann-compose {
    flex-direction: column;
    gap: 10px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ann-compose input,
.ann-compose textarea {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #e5edf7;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    resize: vertical;
}

.ann-compose input:focus,
.ann-compose textarea:focus {
    border-color: var(--accent-cyan);
}

.ann-del {
    margin-top: 10px;
}

.home-card {
    position: relative;
}

.lang-btn {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 5;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #dfe8f4;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.lang-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.ann-btns {
    margin-top: 10px;
}

.group-btn {
    display: inline-block;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.38);
    padding: 14px 30px;
    border-radius: 40px;
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 20px;
    cursor: pointer;
    letter-spacing: 0.5px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.group-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        0 12px 28px -8px rgba(0, 0, 0, 0.45);
    color: #ffffff;
}

.stat-info {
    display: flex;
    gap: 30px;
    margin: 24px 0 10px;
    flex-wrap: wrap;
}

.stat-badge {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 36px;
    padding: 7px 16px;
    font-size: 13px;
    color: #e2eaf5;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.home-hero {
    text-align: center;
    margin: 16px 0 8px;
}

.home-title {
    font-size: clamp(26px, 3.5vw, 44px);
    line-height: 1.12;
    font-weight: 800;
    background: linear-gradient(130deg, #ffffff 0%, var(--accent-cyan) 50%, var(--accent-violet) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 1px;
    margin-bottom: 10px;
    animation: gradientShift 8s ease infinite;
    filter: drop-shadow(0 4px 24px rgba(122, 148, 176, 0.25));
}

.home-sub {
    font-size: 15px;
    color: #bdc9db;
    margin-bottom: 10px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.desc-line {
    font-size: 14px;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-block;
    padding-top: 20px;
    margin-top: 20px;
}

.fade-in {
    animation: gentleAppear 0.7s ease;
}

@keyframes gentleAppear {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.social-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.32);
    color: #fff !important;
    font-size: 14px;
    font-weight: 500;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    text-decoration: none;
    border-radius: 40px;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 4px 14px -4px rgba(0, 0, 0, 0.35);
    white-space: nowrap;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.social-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

.social-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.16));
    border-color: rgba(255, 255, 255, 0.55);
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        0 10px 24px -6px rgba(0, 0, 0, 0.45);
    color: #fff !important;
    text-decoration: none;
}

.social-btn:hover::before {
    left: 130%;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    width: 50%;
    margin: 30px auto 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        var(--shadow-deep);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.6s cubic-bezier(0.2, 0.9, 0.4, 1.1), transform 0.6s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 640px) {
    .social-btn {
        padding: 6px 14px;
        font-size: 13px;
    }
    .video-wrapper {
        width: 92%;
        padding-bottom: 51.75%;
    }
    .home-title {
        font-size: 26px;
    }
}

@media (max-width: 720px) {
    .sidebar {
        top: 0;
        padding: 7px 10px;
        border-radius: 0;
    }
    .nav-links {
        width: 100%;
        justify-content: space-evenly;
    }
    .nav-item {
        padding: 9px 16px;
        font-size: 13px;
    }
    .main-content {
        padding: 82px 18px 40px 18px;
        margin-bottom: 0;
    }
    .page-title {
        font-size: 24px;
    }
    .card-pane {
        padding: 22px 18px;
    }
    .download-grid {
        grid-template-columns: 1fr;
    }
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #0d1119;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3a4356, #2a3243);
    border-radius: 10px;
    border: 2px solid #0d1119;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent-cyan), var(--accent-violet));
}

::selection {
    background: rgba(122, 148, 176, 0.3);
    color: #ffffff;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
}

.auth-tab {
    flex: 1;
    padding: 11px 0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
}

.auth-tab.active {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.1));
    border-color: rgba(255, 255, 255, 0.38);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 420px;
    margin: 0 auto;
}

.auth-form input {
    padding: 13px 18px;
    background: rgba(8, 12, 20, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    color: var(--text-main);
    font-size: 15px;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.auth-form input:focus {
    border-color: var(--border-glow);
    box-shadow: 0 0 0 3px rgba(122, 148, 176, 0.15);
}

.auth-form input::placeholder {
    color: var(--text-dim);
}

.auth-submit {
    padding: 13px 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 14px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.auth-submit:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.2));
    border-color: rgba(255, 255, 255, 0.6);
}

.auth-error {
    min-height: 20px;
    margin-top: 14px;
    text-align: center;
    font-size: 14px;
    color: #ff8a8a;
}

.chat-pane {
    display: flex;
    flex-direction: column;
    height: 80vh;
    min-height: 420px;
}

.chat-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 15px;
    color: #dfe8f4;
}

.account-info {
    text-align: center;
    font-size: 14px;
    color: #b3c2d6;
}

.field-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.field-row input {
    flex: 1;
    min-width: 0;
}

.field-hint {
    display: none;
    color: #ff8a8a;
    font-size: 12.5px;
    white-space: nowrap;
}

.field-hint.show {
    display: block;
}

.auth-form input.input-error {
    border-color: rgba(255, 120, 120, 0.7);
    box-shadow: 0 0 0 3px rgba(255, 120, 120, 0.12);
}

.site-stats {
    justify-content: center;
    gap: 14px;
    margin: 22px 0 4px;
}

.site-stats b {
    color: var(--accent-teal);
    font-weight: 600;
    margin-left: 2px;
}

.dl-count {
    color: var(--accent-teal);
    white-space: nowrap;
}

.chat-subtabs {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.chat-subtabs .auth-tab {
    flex: 1;
}

#chatView {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

#forumView {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(110, 168, 255, 0.22);
    color: #dfe8f4;
    font-weight: 600;
    font-size: 14px;
    vertical-align: middle;
}

.avatar-lg {
    width: 56px;
    height: 56px;
    font-size: 22px;
}

.avatar-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.avatar-side {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.avatar-upload-btn {
    cursor: pointer;
}

.account-stats {
    font-size: 13px;
    color: var(--text-dim);
}

.chat-msg-meta .avatar {
    width: 20px;
    height: 20px;
    font-size: 11px;
    margin-right: 6px;
}

.forum-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.forum-toolbar input {
    flex: 1;
    min-width: 0;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #e5edf7;
    font-size: 14px;
    outline: none;
}

.forum-toolbar input:focus {
    border-color: var(--accent-cyan);
}

.forum-toolbar .f-btn {
    white-space: nowrap;
}

.f-btn.primary {
    background: rgba(126, 160, 156, 0.15);
    border-color: rgba(126, 160, 156, 0.5);
    color: var(--accent-teal);
}

.compose-btns {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.post-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    cursor: pointer;
    transition: background 0.2s;
}

.post-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.post-row-icon {
    flex-shrink: 0;
}

.post-row-title {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    color: #e5edf7;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-row-counts {
    font-size: 12px;
    color: var(--text-dim);
    white-space: nowrap;
}

.post-row-meta {
    font-size: 12px;
    color: var(--text-dim);
    white-space: nowrap;
}

.post-detail .f-back {
    margin-bottom: 12px;
}

.forum-compose {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.forum-compose input,
.forum-compose textarea {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #e5edf7;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    resize: vertical;
}

.forum-compose input:focus,
.forum-compose textarea:focus {
    border-color: var(--accent-cyan);
}

.post {
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.03);
    animation: gentleAppear 0.35s ease;
}

.post-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.post-name {
    font-weight: 600;
    color: var(--accent-cyan);
}

.post-followers {
    font-size: 12px;
    color: var(--text-dim);
}

.post-time {
    font-size: 12px;
    color: var(--text-dim);
    margin-left: auto;
}

.post-title {
    font-size: 16px;
    font-weight: 600;
    margin: 8px 0 4px;
    word-break: break-word;
}

.post-content {
    color: #c8d4e2;
    font-size: 14px;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.6;
}

.post-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    align-items: center;
}

.f-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #c8d4e2;
    border-radius: 8px;
    padding: 4px 12px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.f-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.f-btn.liked {
    color: #ff7b9c;
    border-color: rgba(255, 123, 156, 0.5);
}

.f-btn.following {
    color: var(--accent-teal);
    border-color: rgba(126, 160, 156, 0.5);
}

.f-btn.f-del {
    margin-left: auto;
}

.post-replies {
    margin-top: 10px;
}

.reply {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    margin-top: 8px;
    font-size: 14px;
}

.reply-head {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 12.5px;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.reply-head .reply-name {
    color: var(--accent-cyan);
    font-weight: 600;
}

.reply-content {
    color: #c8d4e2;
    white-space: pre-wrap;
    word-break: break-word;
}

.reply-form {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.reply-form input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #e5edf7;
    font-size: 13px;
    outline: none;
}

.tag-chip {
    font-size: 11px;
    padding: 2px 9px;
    border-radius: 20px;
    background: rgba(110, 168, 255, 0.15);
    border: 1px solid rgba(110, 168, 255, 0.3);
    color: #a9c3e8;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.tag-chip:hover {
    background: rgba(110, 168, 255, 0.32);
    color: #dfe8f4;
}

.post-row-tags {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.post-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.forum-empty {
    text-align: center;
    color: var(--text-dim);
    padding: 30px 0;
    font-size: 14px;
}

.chat-logout {
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.chat-logout:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px 6px 10px 2px;
}

.chat-msg {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 78%;
    animation: gentleAppear 0.35s ease;
}

.chat-msg.mine {
    align-self: flex-end;
    align-items: flex-end;
}

.chat-msg-meta {
    font-size: 11.5px;
    color: var(--text-dim);
    padding: 0 4px;
}

.chat-msg-meta .chat-msg-name {
    color: var(--accent-cyan);
    font-weight: 600;
}

.chat-msg.mine .chat-msg-name {
    color: var(--accent-teal);
}

.chat-msg-bubble {
    padding: 10px 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 14.5px;
    line-height: 1.55;
    color: #e8eef8;
    word-break: break-word;
    white-space: pre-wrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.chat-msg.mine .chat-msg-bubble {
    background: linear-gradient(135deg, rgba(122, 148, 176, 0.28), rgba(134, 144, 158, 0.22));
    border-color: rgba(122, 148, 176, 0.4);
}

.chat-empty {
    text-align: center;
    color: var(--text-dim);
    font-size: 14px;
    margin-top: 40px;
}

.chat-input-row {
    display: flex;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-input-row input {
    flex: 1;
    padding: 12px 18px;
    background: rgba(8, 12, 20, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: var(--text-main);
    font-size: 14.5px;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.chat-input-row input:focus {
    border-color: var(--border-glow);
    box-shadow: 0 0 0 3px rgba(122, 148, 176, 0.15);
}

.chat-input-row input::placeholder {
    color: var(--text-dim);
}

.chat-send {
    padding: 12px 26px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 999px;
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}

.chat-send:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.2));
    border-color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 720px) {
    .chat-pane {
        height: 72vh;
    }
    .chat-msg {
        max-width: 88%;
    }
    .chat-send {
        padding: 12px 18px;
    }
}

.code-row {
    display: flex;
    gap: 10px;
}

.code-row input {
    flex: 1;
    min-width: 0;
}

.code-btn {
    padding: 0 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 14px;
    color: #dfe8f4;
    font-size: 13.5px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.code-btn:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}

.code-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.auth-links {
    text-align: center;
}

.auth-link {
    background: none;
    border: none;
    color: var(--accent-cyan);
    font-size: 13.5px;
    cursor: pointer;
    padding: 4px 8px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-link:hover {
    color: #ffffff;
}

.chat-header-btns {
    display: flex;
    gap: 8px;
}

.change-pwd-form {
    max-width: 420px;
    margin: 0 0 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.change-pwd-form .auth-error {
    margin-top: 0;
}

.chat-del {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 13px;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.chat-msg:hover .chat-del {
    opacity: 1;
}

.chat-del:hover {
    color: #ff8a8a;
}

.admin-badge {
    display: inline-block;
    padding: 1px 8px;
    margin-left: 4px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 600;
    color: #ffd66e;
    border: 1px solid rgba(255, 214, 110, 0.45);
    background: rgba(255, 214, 110, 0.12);
    vertical-align: 1px;
}

/* ===== 下载页软件管理（仅管理员可见） ===== */
.dl-admin-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 14px;
}

.dl-tools {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.dl-tools .f-btn {
    padding: 2px 10px;
    font-size: 12px;
}

.dl-tools .f-btn.dl-del:hover {
    color: #ff7b9c;
    border-color: rgba(255, 123, 156, 0.5);
}

.software-img:empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0 8px, transparent 8px 16px);
}

/* ===== 软件发布/编辑弹窗 ===== */
.dl-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.dl-modal {
    width: 100%;
    max-width: 520px;
    max-height: 86vh;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 22px 24px;
}

.dl-modal h3 {
    margin: 0 0 16px;
    color: #e5edf7;
    font-size: 18px;
}

/* 下载方式选择弹窗（直链 / 小飞机网盘） */
.dl-choice {
    max-width: 400px;
    max-height: 86vh;
    overflow-y: auto;
}

.dl-choice-name {
    color: #9db2c8;
    font-size: 14px;
    margin: -6px 0 16px;
}

.dl-choice-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    padding: 12px 18px;
    margin-bottom: 12px;
    border-radius: 12px;
    font-size: 15px;
    cursor: pointer;
}

.dl-choice-btn em {
    font-style: normal;
    font-size: 12px;
    opacity: 0.75;
}

.dl-choice .compose-btns {
    margin-top: 4px;
}

.dl-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dl-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #c8d4e2;
    font-size: 13px;
}

.dl-row {
    display: flex;
    gap: 12px;
}

.dl-row .dl-field {
    flex: 1;
}

.dl-field input,
.dl-field textarea,
.dl-field select {
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #e5edf7;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    resize: vertical;
    width: 100%;
    box-sizing: border-box;
}

.dl-field select option {
    background: #0d1420;
    color: #e5edf7;
}

.dl-field input:focus,
.dl-field textarea:focus,
.dl-field select:focus {
    border-color: var(--accent-cyan);
}

.dl-field input[type="file"] {
    padding: 7px;
    cursor: pointer;
}

.dl-img-hint {
    color: rgba(200, 212, 226, 0.5);
    font-size: 12px;
}

.dl-img-preview {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dl-img-preview img {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.dl-modal-btns {
    justify-content: flex-end;
    margin-top: 4px;
}

/* ===== 资源下载站改版 ===== */
.hero-card {
    padding: 28px 24px 24px;
}

.home-eyebrow {
    display: inline-block;
    padding: 6px 16px;
    margin-bottom: 16px;
    border: 1px solid rgba(122, 148, 176, 0.4);
    border-radius: 999px;
    background: rgba(122, 148, 176, 0.1);
    color: var(--accent-cyan);
    font-size: 13px;
    letter-spacing: 1.5px;
}

.hero-search {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 760px;
    margin: 20px auto 12px;
    padding: 6px 6px 6px 20px;
    background: rgba(8, 12, 20, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 14px 32px -18px rgba(0, 0, 0, 0.8);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.hero-search:focus-within {
    border-color: var(--border-glow);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 0 0 4px rgba(122, 148, 176, 0.12);
}

.hero-search-icon {
    flex-shrink: 0;
    font-size: 20px;
    color: var(--accent-cyan);
    opacity: 0.85;
}

.hero-search input {
    flex: 1;
    min-width: 0;
    padding: 12px 6px;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-size: 16px;
    font-family: inherit;
}

.hero-search input::placeholder {
    color: var(--text-dim);
}

.hero-search input::-webkit-search-cancel-button {
    display: none;
}

.hero-search-btn {
    flex-shrink: 0;
    padding: 12px 26px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(122, 148, 176, 0.9), rgba(134, 144, 158, 0.85));
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 8px 20px -10px rgba(122, 148, 176, 0.9);
}

.hero-search-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.hero-search-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.hero-tag {
    padding: 6px 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hero-tag:hover {
    color: #ffffff;
    border-color: rgba(122, 148, 176, 0.5);
    background: rgba(122, 148, 176, 0.12);
}

.home-featured-wrap {
    margin-top: 4px;
}

.featured-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 10px 2px 16px;
}

.featured-title {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.3px;
}

.home-featured {
    margin-top: 0;
}

.home-featured .software-card {
    opacity: 1;
    transform: none;
}

.dl-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.dl-total {
    color: var(--text-dim);
    font-size: 13px;
    padding-bottom: 22px;
}

.dl-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 18px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---- 资源库 Tab 切换（网站资源 / 长途旅行模组） ---- */
.dl-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dl-tab {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(8, 12, 20, 0.5);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 9px 20px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.dl-tab:hover {
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.35);
}

.dl-tab.active {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-teal));
    border-color: transparent;
    color: #06101c;
    box-shadow: 0 6px 18px -6px rgba(122, 148, 176, 0.55);
}

/* ---- 长途旅行模组区 ---- */
.tld-toolbar {
    border-bottom: none;
    margin-bottom: 2px;
    padding-bottom: 10px;
}

.tld-total {
    white-space: nowrap;
}

.tld-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 4px 0 16px;
}

.tld-chip {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(8, 12, 20, 0.45);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 12.5px;
    padding: 5px 13px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tld-chip span {
    opacity: 0.65;
    font-size: 11px;
    margin-left: 2px;
}

.tld-chip:hover {
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.32);
}

.tld-chip.active {
    background: rgba(122, 148, 176, 0.16);
    border-color: rgba(122, 148, 176, 0.55);
    color: var(--accent-cyan);
}

.tld-mod .tld-img {
    cursor: pointer;
}

.tld-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tld-img.noimg img {
    display: none;
}

.tld-noimg-text {
    font-size: 44px;
    opacity: 0.5;
}

.tld-cat {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    background: rgba(6, 16, 28, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #cfe7ff;
    font-size: 11.5px;
    padding: 3px 10px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

.tld-name-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.tld-name {
    margin-bottom: 0;
    font-size: 1.12rem;
}

.tld-ver {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--accent-cyan);
    background: rgba(122, 148, 176, 0.12);
    border: 1px solid rgba(122, 148, 176, 0.35);
    padding: 1px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.tld-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.tld-desc {
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 14px;
    flex: 1;
}

.tld-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.tld-dl {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
}

.tld-detail-btn {
    flex: 0 0 auto;
    padding: 0 16px;
}

.tld-more-wrap {
    display: flex;
    justify-content: center;
    margin: 18px 0 8px;
}

/* ---- 模组详情页 ---- */
.tld-detail-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(4px);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tld-detail {
    width: 100%;
    max-width: 680px;
    max-height: 92vh;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    position: relative;
}

.tld-detail-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    background: rgba(6, 16, 28, 0.8);
    border-radius: 18px 18px 0 0;
    overflow: hidden;
}

.tld-detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tld-detail-cover.noimg .tld-noimg-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tld-detail-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(6, 16, 28, 0.75);
    color: #e5edf7;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

.tld-detail-body {
    padding: 20px 24px 24px;
}

.tld-detail-name {
    font-size: 1.32rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
    line-height: 1.35;
}

.tld-detail-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: var(--text-dim);
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tld-detail-meta b {
    color: var(--text-muted);
    font-weight: 600;
}

.tld-detail-desc {
    font-size: 14px;
    line-height: 1.85;
    color: var(--text-muted);
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 20px;
}

.tld-detail-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tld-detail-actions .f-btn {
    flex: 1;
    min-width: 140px;
    justify-content: center;
}

@media (max-width: 640px) {
    .tld-detail-mask { padding: 10px; }
    .tld-detail { max-height: 94vh; border-radius: 14px; }
    .tld-detail-cover { aspect-ratio: 16 / 10; border-radius: 14px 14px 0 0; }
    .tld-detail-body { padding: 16px 16px 20px; }
    .tld-detail-name { font-size: 1.15rem; }
}


/* ---- 模组下载方式弹窗 ---- */
.tld-dl-status {
    min-height: 18px;
    font-size: 13px;
    margin: 6px 0 2px;
    color: var(--text-muted);
}

.tld-dl-status.ok {
    color: #7de8a8;
    font-weight: 600;
}

.tld-dl-status.err {
    color: #ff8484;
    font-weight: 600;
}

.tld-dl-tip {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-dim);
    margin-bottom: 10px;
}

.dl-choice-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.6);
}

/* ---- 模组源 / 图片源选择 ---- */
.tld-opts {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.tld-opt {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-dim);
}

.tld-opt select {
    font-family: inherit;
    font-size: 12.5px;
    color: var(--text-main);
    background: rgba(8, 12, 20, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    padding: 5px 10px;
    cursor: pointer;
    outline: none;
}

.tld-opt select:focus {
    border-color: rgba(122, 148, 176, 0.6);
}

/* ---- 分页 ---- */
.tld-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 22px 0 10px;
}

.tld-page-btn {
    min-width: 38px;
    height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(8, 12, 20, 0.5);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 13.5px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tld-page-btn:hover:not(.disabled) {
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.35);
}

.tld-page-btn.active {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-teal));
    border-color: transparent;
    color: #06101c;
    font-weight: 700;
}

.tld-page-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.tld-page-gap {
    color: var(--text-dim);
    font-size: 13px;
}

/* ---- 模组加载器（步骤卡片布局） ---- */

.loader-steps {
    display: grid;
    gap: 14px;
    max-width: 1080px;
    margin: 0 auto 16px;
}

@media (min-width: 860px) {
    .loader-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.loader-step {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-radius: 14px;
    background: rgba(13, 21, 34, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.loader-step-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.loader-step-num {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #06101c;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-teal));
}

.loader-step-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
}

.loader-state {
    margin-left: auto;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-dim);
}

.loader-state.ok {
    color: #7de8a8;
    background: rgba(125, 232, 168, 0.12);
}

.loader-state.err {
    color: #ff8484;
    background: rgba(255, 132, 132, 0.12);
}

.loader-step-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.loader-path-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.loader-path-input {
    flex: 1;
    min-width: 0;
    font-family: inherit;
    font-size: 12.5px;
    color: #d9ecff;
    background: rgba(4, 10, 18, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 8px 10px;
    outline: none;
}

.loader-step-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.loader-btn {
    flex: 1;
    font-family: inherit;
    font-size: 13.5px;
    padding: 11px 10px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #e2f1ff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.loader-btn:hover {
    border-color: rgba(150, 210, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
}

.loader-btn.primary {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-teal));
    border-color: transparent;
    color: #06101c;
    font-weight: 700;
}

.loader-btn.primary:hover {
    filter: brightness(1.12);
}

.loader-btn.big {
    padding: 14px 10px;
    font-size: 15px;
}

.loader-mini-btn {
    font-family: inherit;
    font-size: 12.5px;
    padding: 6px 14px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.loader-mini-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(150, 210, 255, 0.5);
    color: var(--text-main);
}

.loader-variant-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.loader-variant-row.single {
    grid-template-columns: 1fr;
}

.loader-variant-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-family: inherit;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.loader-variant-btn b {
    font-size: 14px;
    color: var(--text-main);
}

.loader-variant-btn span {
    font-size: 11.5px;
    color: var(--text-dim);
}

.loader-variant-btn:hover {
    border-color: rgba(150, 210, 255, 0.5);
}

.loader-variant-btn.selected {
    border-color: var(--accent-cyan);
    background: rgba(120, 195, 255, 0.12);
}

.loader-update-link {
    align-self: flex-start;
}

.loader-docs-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    max-width: 1080px;
    margin: 0 auto 12px;
}

.loader-docs-path {
    flex: 1;
    min-width: 180px;
    font-size: 12.5px;
    color: var(--text-dim);
    word-break: break-all;
}

.loader-log {
    box-sizing: border-box;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 10px 12px;
    min-height: 96px;
    max-height: 200px;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(3, 8, 14, 0.9);
    font-family: Consolas, "Courier New", monospace;
    font-size: 12.5px;
    line-height: 1.7;
    color: #b9d7f2;
    white-space: pre-wrap;
    word-break: break-all;
    display: block;
}

@media (max-width: 640px) {
    .tld-page-btn {
        min-width: 34px;
        height: 34px;
        font-size: 12.5px;
        padding: 0 10px;
    }

    .loader-win-body {
        padding: 14px 12px 12px;
    }

    .loader-variant-btn,
    .loader-btn {
        flex: 1 1 100%;
    }

    .loader-path-row,
    .loader-installed-row,
    .loader-docs-row {
        gap: 8px;
    }
}

.dl-search {
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 4px 16px;
    background: rgba(8, 12, 20, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.dl-search:focus-within {
    border-color: var(--border-glow);
    box-shadow: 0 0 0 3px rgba(122, 148, 176, 0.14);
}

.dl-search-icon {
    color: var(--accent-cyan);
    font-size: 18px;
    opacity: 0.8;
}

.dl-search input {
    flex: 1;
    min-width: 0;
    padding: 8px 0;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-size: 14.5px;
    font-family: inherit;
}

.dl-search input::placeholder {
    color: var(--text-dim);
}

.dl-search input::-webkit-search-cancel-button {
    display: none;
}

.dl-search-clear {
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    line-height: 1;
}

.dl-search-clear:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
}

.dl-sort {
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(8, 12, 20, 0.5);
    color: var(--text-main);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    cursor: pointer;
}

.dl-sort:focus {
    border-color: var(--border-glow);
}

.dl-sort option {
    background: #101724;
    color: var(--text-main);
}

.dl-upload-btn {
    padding: 10px 22px;
    border-radius: 14px;
    font-size: 14px;
}

.dl-upload-btn.is-off {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.dl-admin-upload {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--text-muted);
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    cursor: pointer;
    user-select: none;
}

.dl-admin-upload input {
    accent-color: #58e0c8;
    cursor: pointer;
}

.dl-login-hint {
    margin: 14px 0 0;
    padding: 10px 16px;
    border-radius: 12px;
    background: rgba(122, 148, 176, 0.08);
    border: 1px dashed rgba(122, 148, 176, 0.32);
    color: var(--text-muted);
    font-size: 13px;
}

.dl-login-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--accent-cyan);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.dl-login-link:hover {
    color: #ffffff;
}

.dl-empty {
    text-align: center;
    padding: 54px 20px 40px;
    color: var(--text-muted);
}

.dl-empty-icon {
    font-size: 46px;
    color: var(--accent-cyan);
    opacity: 0.5;
    margin-bottom: 10px;
}

.dl-empty-title {
    font-size: 18px;
    font-weight: 600;
    color: #e8edf5;
    margin-bottom: 6px;
}

.dl-empty-sub {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 18px;
}

.dl-upload-note {
    margin: -6px 0 14px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(122, 148, 176, 0.08);
    border: 1px solid rgba(122, 148, 176, 0.22);
    color: var(--text-muted);
    font-size: 12.5px;
    line-height: 1.6;
}

.dl-content-warn {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(255, 72, 72, 0.09);
    border: 1px solid rgba(255, 96, 96, 0.45);
    color: #f3d7d7;
    font-size: 12.5px;
    line-height: 1.7;
}

.dl-warn-title {
    color: #ff7b7b;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.4px;
    margin-bottom: 6px;
}

.dl-content-warn ul {
    margin: 0 0 10px;
    padding-left: 18px;
}

.dl-content-warn li {
    margin: 3px 0;
}

.dl-warn-agree {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #ffd9d9;
    font-weight: 600;
}

.dl-warn-agree input {
    width: 16px;
    height: 16px;
    accent-color: #ff5c5c;
    cursor: pointer;
}

/* ---- 资源分区 chips ---- */
.dl-cat-chips {
    margin: 12px 0 6px;
}

/* ---- 资源卡片：分区 / 热门徽章 + 互动统计 ---- */
.dl-cat-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    color: #d8ecff;
    background: rgba(6, 16, 28, 0.72);
    border: 1px solid rgba(122, 148, 176, 0.45);
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.dl-hot-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    color: #ffd9a8;
    background: rgba(46, 22, 6, 0.72);
    border: 1px solid rgba(255, 176, 102, 0.55);
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.dl-mini-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.74rem;
    color: var(--text-dim);
    margin: -8px 0 14px;
    letter-spacing: 0.2px;
}

.dl-mini-stats span {
    white-space: nowrap;
}

/* ---- 资源详情弹窗：点赞 / 收藏 / 回复 ---- */
.sw-detail {
    max-width: 720px;
}

.sw-detail-cat {
    position: static;
    display: inline-block;
    vertical-align: middle;
    margin-left: 8px;
    pointer-events: none;
}

.sw-stat-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--accent-teal);
    margin-bottom: 16px;
}

.sw-react b {
    font-weight: 600;
    margin-left: 2px;
}

.sw-react.on {
    border-color: rgba(122, 148, 176, 0.65);
    color: var(--accent-cyan);
    background: rgba(122, 148, 176, 0.12);
}

.sw-reply-sec {
    margin-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 16px;
}

.sw-reply-head {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 12px;
}

.sw-reply-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.sw-reply-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 12px;
}

.sw-reply-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.sw-reply-user {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-cyan);
}

.sw-reply-time {
    font-size: 11.5px;
    color: var(--text-dim);
}

.sw-reply-del {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
}

.sw-reply-del:hover {
    color: #ff8a8a;
}

.sw-reply-text {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-muted);
    word-break: break-word;
    white-space: pre-wrap;
}

.sw-reply-empty {
    text-align: center;
    color: var(--text-dim);
    font-size: 13px;
    padding: 18px 0;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 10px;
}

.sw-reply-box {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.sw-reply-box textarea {
    flex: 1;
    resize: vertical;
    min-height: 46px;
    max-height: 140px;
    background: rgba(8, 12, 20, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    color: var(--text-main);
    padding: 10px 12px;
    font-family: inherit;
    font-size: 13.5px;
    box-sizing: border-box;
}

.sw-reply-box textarea:focus {
    outline: none;
    border-color: rgba(122, 148, 176, 0.5);
}

.sw-reply-login {
    font-size: 13px;
    color: var(--text-dim);
}

.sw-reply-login button {
    background: none;
    border: none;
    color: var(--accent-cyan);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
}

@media (max-width: 640px) {
    .sw-reply-box {
        flex-direction: column;
        align-items: stretch;
    }

    .dl-cat-badge,
    .dl-hot-badge {
        font-size: 10.5px;
        padding: 2px 8px;
    }
}

.dl-choice-list {
    display: flex;
    flex-direction: column;
}

.site-toast {
    position: fixed;
    left: 50%;
    bottom: 96px;
    z-index: 1200;
    padding: 12px 24px;
    border-radius: 999px;
    background: rgba(18, 26, 40, 0.94);
    border: 1px solid rgba(122, 148, 176, 0.45);
    color: #eaf2ff;
    font-size: 14px;
    letter-spacing: 0.3px;
    box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.9);
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
    animation: toastIn 0.3s ease forwards;
    pointer-events: none;
}

.site-toast.out {
    animation: toastOut 0.5s ease forwards;
}

@keyframes toastIn {
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toastOut {
    to { opacity: 0; transform: translateX(-50%) translateY(10px); }
}

@media (max-width: 720px) {
    .dl-toolbar {
        gap: 10px;
    }
    .dl-search {
        flex-basis: 100%;
    }
    .dl-sort,
    .dl-upload-btn {
        flex: 1;
    }
    .featured-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* 手机端：搜索栏上下排布，避免胶囊内按钮挤压输入框 */
.main-content {
    min-width: 0;
}

@media (max-width: 640px) {
    .hero-card {
        padding: 22px 14px 18px;
    }
    .home-hero {
        margin-top: 6px;
    }
    .home-eyebrow {
        margin-bottom: 12px;
        padding: 5px 12px;
        font-size: 12px;
        letter-spacing: 1px;
    }
    .home-sub {
        padding: 0 6px;
        font-size: 15px;
        line-height: 1.6;
    }
    .hero-search {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin: 18px auto 12px;
        padding: 8px;
        max-width: 100%;
        border-radius: 20px;
    }
    .hero-search:focus-within {
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
    }
    .hero-search-icon {
        display: none;
    }
    .hero-search input {
        width: 100%;
        padding: 12px 14px;
        font-size: 15px;
        text-align: left;
    }
    .hero-search-btn {
        width: 100%;
        padding: 12px 0;
        border-radius: 14px;
        font-size: 14.5px;
    }
    .hero-tags {
        gap: 8px;
        margin-bottom: 16px;
    }
    .hero-tag {
        padding: 6px 13px;
        font-size: 12.5px;
    }
    .site-stats {
        gap: 10px;
        margin-top: 16px;
    }
    .stat-badge {
        padding: 7px 15px;
        font-size: 13.5px;
    }
    .social-buttons {
        flex-wrap: wrap;
    }
}

/* ---- 左上角音乐播放器 ---- */
@keyframes musicSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.music-player {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 8;
}

.music-disc {
    position: relative;
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: radial-gradient(circle at 32% 28%, #1d3247, #0a111c 72%);
    color: #cfe6ff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, transform 0.2s;
}

.music-disc:hover {
    border-color: rgba(130, 200, 255, 0.65);
    transform: scale(1.05);
}

.music-disc-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.music-note {
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-ring {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1px dashed rgba(120, 195, 255, 0.6);
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}

.music-disc.playing .music-ring {
    opacity: 1;
    animation: musicSpin 9s linear infinite;
}

.music-disc.playing .music-disc-img {
    animation: musicSpin 20s linear infinite;
}

/* 展开面板 */
.music-panel {
    display: none;
    flex-direction: column;
    position: absolute;
    left: 0;
    top: calc(100% + 10px);
    width: 320px;
    max-width: calc(100vw - 24px);
    padding: 14px;
    border-radius: 16px;
    background: #0d1522;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 18px 44px -18px rgba(0, 0, 0, 0.9);
}

.music-panel.open {
    display: flex;
}

.music-now {
    display: flex;
    align-items: center;
    gap: 10px;
}

.music-cover {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #1d3247, #0a111c 72%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    background-size: cover;
    background-position: center;
}

.music-now-text {
    min-width: 0;
    flex: 1;
}

.music-title {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-artist {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-x {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-dim);
    font-size: 13px;
    cursor: pointer;
}

.music-x:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.music-ctrl {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 14px 0 4px;
}

.m-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    color: #d7e6f7;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
}

.m-btn:hover {
    background: rgba(120, 195, 255, 0.16);
    color: #fff;
}

.m-play {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #3d8bfd, #7b5cf5);
    border: none;
    color: #fff;
}

.m-play:hover {
    filter: brightness(1.1);
    background: linear-gradient(135deg, #3d8bfd, #7b5cf5);
}

.m-ic-pause {
    display: none;
}

.music-playing .m-ic-play {
    display: none;
}

.music-playing .m-ic-pause {
    display: block;
}

.music-list-head {
    margin: 12px 0 6px;
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--text-dim);
}

.music-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 190px;
    overflow-y: auto;
}

.music-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 9px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-muted);
    transition: background 0.15s;
}

.music-item:hover {
    background: rgba(255, 255, 255, 0.07);
}

.music-item.active {
    background: rgba(120, 195, 255, 0.14);
    color: var(--text-main);
}

.music-item .mi-index {
    width: 16px;
    flex: 0 0 16px;
    font-size: 11.5px;
    color: var(--text-dim);
    text-align: center;
}

.music-item .mi-title {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-item .mi-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #63b4ff;
    opacity: 0;
    flex: 0 0 6px;
}

.music-item.active .mi-dot {
    opacity: 1;
}

.music-list-empty {
    padding: 10px 4px;
    font-size: 12.5px;
    color: var(--text-dim);
}

@media (max-width: 640px) {
    .music-player {
        left: 8px;
    }
    .music-disc {
        width: 40px;
        height: 40px;
    }
    .music-panel {
        width: calc(100vw - 20px);
        max-width: 340px;
        padding: 12px;
    }
}

/* ---- 我的（个人中心） ---- */
.profile-head {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.profile-avatar {
    flex: 0 0 auto;
    line-height: 0;
}

.profile-id {
    flex: 1;
    min-width: 170px;
}

.profile-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.25;
    word-break: break-word;
}

.profile-sub {
    margin-top: 7px;
    font-size: 13px;
    color: var(--text-dim);
    word-break: break-all;
}

.profile-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-stat {
    flex: 1;
    min-width: 108px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-stat b {
    display: block;
    font-size: 20px;
    line-height: 1.2;
    color: var(--accent-teal);
}

.profile-stat span {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-dim);
}

.profile-guest {
    text-align: center;
    padding: 32px 16px 24px;
}

.profile-guest-icon {
    font-size: 40px;
    line-height: 1;
    margin-bottom: 14px;
}

.profile-guest-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-main);
}

.profile-guest-sub {
    margin: 8px auto 20px;
    max-width: 420px;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-dim);
}

.profile-empty {
    text-align: center;
    padding: 40px 10px;
}

.profile-empty .f-btn {
    margin-top: 16px;
}

.profile-tabs .dl-tab span,
#profileTabs .dl-tab span {
    opacity: 0.75;
    margin-left: 2px;
}

/* 我的：账号管理面板 */
.pm-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.pm-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
}

.pm-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-dim);
    font-size: 14px;
    cursor: pointer;
}

.pm-close:hover { color: var(--text-main); }

.pm-avatar-row {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 14px;
    padding: 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.pm-sub {
    margin: 12px 0 8px;
    font-size: 13px;
    color: var(--text-dim);
}

@media (max-width: 640px) {
    .profile-head {
        align-items: flex-start;
    }
    .profile-actions {
        width: 100%;
    }
    .profile-actions .f-btn {
        flex: 1;
    }
    .profile-name {
        font-size: 19px;
    }
    .profile-stats {
        gap: 8px;
        margin-top: 16px;
        padding-top: 14px;
    }
    .profile-stat {
        flex: 1 1 calc(50% - 4px);
        min-width: calc(50% - 4px);
        padding: 10px 12px;
    }
    .profile-stat b {
        font-size: 18px;
    }
}

/* 手机端：资源 / 模组详情改为整屏，底部回复区不会被浏览器工具栏遮住 */
@media (max-width: 640px) {
    .tld-detail-mask {
        padding: 0;
        align-items: stretch;
    }
    .tld-detail {
        width: 100%;
        max-width: none;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 0;
        border-left: none;
        border-right: none;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
    .tld-detail-cover {
        aspect-ratio: 16 / 10;
        max-height: 34vh;
        border-radius: 0;
    }
    .tld-detail-body {
        padding: 16px 16px calc(26px + env(safe-area-inset-bottom, 0px));
    }
    .tld-detail-close {
        top: calc(12px + env(safe-area-inset-top, 0px));
    }
    .tld-detail .sw-reply-list {
        max-height: 240px;
    }
}

/* 站点说明（同时供搜索引擎抓取关键词） */
.seo-footer {
    max-width: 1100px;
    margin: 28px auto 40px;
    padding: 0 20px;
    text-align: center;
}

.seo-footer p {
    margin: 0 0 6px;
    font-size: 12px;
    line-height: 1.8;
    color: var(--text-dim);
    opacity: 0.85;
}

.seo-footer strong {
    color: var(--text-main);
    font-weight: 600;
}

/* ---- 门户式首页布局（参考传统下载站信息密度，保留本站暗色霓虹风格） ---- */
.sidebar {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    background: #0a0f17;
}

.topbar {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-sizing: border-box;
}

.sidebar .logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    text-decoration: none;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
    box-shadow: 0 6px 18px -8px rgba(122, 148, 176, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    overflow: hidden;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-name {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #fff;
}

.brand-sub {
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--text-dim);
}

.top-search {
    flex: 1;
    max-width: 520px;
    margin: 0;
    padding: 4px 4px 4px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: none;
    gap: 6px;
}

.top-search .hero-search-icon {
    font-size: 16px;
}

.top-search input {
    padding: 8px 4px;
    font-size: 13px;
}

.top-search .hero-search-btn {
    padding: 8px 18px;
    font-size: 13px;
    border-radius: 6px;
    box-shadow: none;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.top-lang {
    position: static;
    padding: 7px 12px;
    font-size: 12px;
    border-radius: 6px;
}

.sidebar .music-player {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
}

.sidebar .music-disc {
    width: 36px;
    height: 36px;
}

.sidebar .music-panel {
    left: auto;
    right: 0;
}

.nav-links {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 6px 18px 8px;
    justify-content: center;
    gap: 38px;
    box-sizing: border-box;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.nav-item {
    padding: 8px 18px;
    font-size: 13.5px;
    border-radius: 6px;
}

main.main-content {
    max-width: 1156px;
    margin: 0 auto;
    padding: 136px 18px 60px;
}

.page-view {
    max-width: 1120px;
    margin: 0 auto;
}

.home-portal {
    width: 100%;
}

/* 首页公告滚动条（从左往右滚动） */
.ann-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 8px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.ann-badge {
    flex: none;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #0a1220;
    background: linear-gradient(135deg, #7a94b0, #8a94a2);
    box-shadow: 0 0 12px rgba(122, 148, 176, 0.35);
}

.ann-viewport {
    position: relative;
    flex: 1;
    overflow: hidden;
    height: 24px;
    /* 左右各用一半宽度的椭圆形蒙版，文字沿圆弧渐隐，看起来像贴着圆柱转出来 */
    mask-image:
        radial-gradient(ellipse 30px 10px at 0% 50%, transparent 0 3px, #000 30px),
        radial-gradient(ellipse 30px 10px at 100% 50%, transparent 0 3px, #000 30px);
    -webkit-mask-image:
        radial-gradient(ellipse 30px 10px at 0% 50%, transparent 0 3px, #000 30px),
        radial-gradient(ellipse 30px 10px at 100% 50%, transparent 0 3px, #000 30px);
    mask-size: 50% 100%, 50% 100%;
    -webkit-mask-size: 50% 100%, 50% 100%;
    mask-position: 0 0, 100% 0;
    -webkit-mask-position: 0 0, 100% 0;
    mask-repeat: no-repeat, no-repeat;
    -webkit-mask-repeat: no-repeat, no-repeat;
}

.ann-track {
    display: flex;
    width: max-content;
    animation: annScroll 26s linear infinite;
    will-change: transform;
}

.ann-item {
    white-space: nowrap;
    font-size: 13px;
    line-height: 24px;
    color: #c8d6e8;
    padding-right: 64px;
    letter-spacing: 0.2px;
}

@keyframes annScroll {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}

.ann-bar:hover .ann-track {
    animation-play-state: paused;
}

.portal-icons {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    padding: 12px 14px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.portal-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 6px 2px;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease, transform 0.2s ease;
}

.portal-icon:hover {
    background: rgba(122, 148, 176, 0.1);
    transform: translateY(-2px);
}

.pi-tile {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 18px -10px rgba(0, 0, 0, 0.8);
}

.pi-1 { background: linear-gradient(135deg, #4a5563, #323a45); }
.pi-2 { background: linear-gradient(135deg, #465562, #313c46); }
.pi-3 { background: linear-gradient(135deg, #4c5260, #343943); }
.pi-4 { background: linear-gradient(135deg, #47584f, #313d36); }
.pi-5 { background: linear-gradient(135deg, #5a5245, #3d382f); }
.pi-6 { background: linear-gradient(135deg, #5a4848, #3d3131); }
.pi-7 { background: linear-gradient(135deg, #46505c, #2f363f); }
.pi-8 { background: linear-gradient(135deg, #4a4f61, #33364a); }

.pi-label {
    font-size: 12px;
    color: #c4d2e3;
    white-space: nowrap;
}

.portal-main {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr) 260px;
    gap: 12px;
    align-items: start;
}

.portal-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.portal-panel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.portal-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 9px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.portal-panel-head > span:first-child::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 12px;
    margin-right: 7px;
    vertical-align: -1px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--accent-cyan), var(--accent-violet));
    box-shadow: 0 0 8px rgba(122, 148, 176, 0.6);
}

.portal-mini {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-dim);
}

.portal-shuffle {
    padding: 2px 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: #a9bad0;
    cursor: pointer;
    font-family: inherit;
}

.portal-shuffle:hover {
    color: var(--accent-cyan);
    border-color: rgba(122, 148, 176, 0.4);
}

.portal-cat-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.portal-cat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 8px 9px;
    background: none;
    border: none;
    border-radius: 6px;
    color: #b9c7d8;
    font-family: inherit;
    font-size: 12.5px;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.portal-cat:hover {
    background: rgba(122, 148, 176, 0.1);
    color: #fff;
}

.portal-cat b {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-cyan);
}

.portal-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin: 0;
}

.portal-stats .stat-badge {
    padding: 6px 8px;
    font-size: 11px;
    border-radius: 6px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: none;
}

.portal-banner {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    padding: 22px 24px;
    border-radius: 12px;
    border: 1px solid rgba(122, 148, 176, 0.26);
    background: linear-gradient(125deg, rgba(28, 32, 39, 0.94), rgba(32, 36, 43, 0.94));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 20px 40px -30px #000;
}

.pb-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(42px);
    opacity: 0.55;
    pointer-events: none;
}

.pb-glow-a {
    width: 220px;
    height: 220px;
    right: -50px;
    top: -90px;
    background: #2b8cff;
}

.pb-glow-b {
    width: 180px;
    height: 180px;
    left: 18%;
    bottom: -110px;
    background: #8b5cf6;
}

.pb-content {
    position: relative;
    z-index: 2;
}

.pb-eyebrow {
    font-size: 11px;
    letter-spacing: 2px;
    color: #8fd0ff;
}

.pb-title {
    margin: 7px 0 6px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #fff;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.pb-sub {
    font-size: 12.5px;
    color: #c2d0e2;
}

.pb-tags {
    justify-content: flex-start;
    gap: 7px;
    margin-top: 12px;
}

.pb-tags .hero-tag {
    padding: 5px 12px;
    font-size: 11.5px;
    border-radius: 6px;
}

.portal-featured {
    padding: 12px 14px 14px;
}

.portal-featured .featured-head {
    margin: 0 0 10px;
}

.portal-featured .featured-title {
    font-size: 15px;
}

.portal-featured .f-btn {
    font-size: 12px;
}

.home-featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.home-featured .software-card {
    border-radius: 10px;
}

.home-card-item {
    flex-direction: row;
    align-items: stretch;
    min-height: 104px;
    padding: 10px;
    position: relative;
}

.home-card-item .software-img {
    width: 84px;
    height: 84px;
    flex: 0 0 84px;
    aspect-ratio: auto;
    margin: 0;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(122, 148, 176, 0.16), rgba(139, 92, 246, 0.16));
}

.hc-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.55);
}

.home-card-item .software-img img {
    position: relative;
    z-index: 1;
    padding: 6px;
    object-fit: contain;
}

.hc-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding-left: 10px;
}

.hc-name {
    margin-bottom: 3px;
    font-size: 13.5px;
    font-weight: 600;
    color: #f2f6fc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hc-desc {
    margin-bottom: 4px;
    font-size: 11.5px;
    line-height: 1.45;
    color: #93a4bb;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-card-item .hc-meta {
    margin-top: auto;
    padding-right: 64px;
    font-size: 10.5px;
    color: #77879d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-card-item .hc-dl {
    position: absolute;
    right: 9px;
    bottom: 9px;
    margin: 0;
    padding: 4px 10px;
    min-height: 0;
    border-radius: 5px;
    font-size: 11px;
    line-height: 1.4;
    box-shadow: none;
}

.home-hot-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hot-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 8px;
    border: none;
    border-radius: 6px;
    background: none;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
}

.hot-row:hover {
    background: rgba(122, 148, 176, 0.1);
}

.hot-rank {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: #9fb1c6;
    font-size: 11px;
    font-weight: 700;
}

.hot-row:nth-child(1) .hot-rank {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.hot-row:nth-child(2) .hot-rank {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.hot-row:nth-child(3) .hot-rank {
    background: rgba(255, 255, 255, 0.11);
    color: #fff;
}

.hot-name {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    color: #c8d4e4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hot-meta {
    flex: 0 0 auto;
    font-size: 10px;
    color: #718096;
}

.home-hot-empty {
    padding: 10px 4px;
    font-size: 12px;
    color: #7d8ba0;
}

.portal-social {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: flex-start;
    gap: 8px;
    margin-top: 0;
}

.portal-social .social-btn {
    padding: 8px 10px;
    border-radius: 9px;
    font-size: 12px;
    gap: 7px;
    justify-content: flex-start;
    box-shadow: none;
}

.portal-social .social-btn svg {
    width: 15px;
    height: 15px;
    flex: none;
    opacity: 0.92;
}

.portal-social .social-btn span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-social .social-btn:hover {
    border-color: var(--brand, rgba(255, 255, 255, 0.55));
    box-shadow: 0 0 0 1px var(--brand, rgba(255, 255, 255, 0.5)), 0 8px 20px -10px var(--brand, rgba(0, 0, 0, 0.6));
}

.portal-social .social-btn:hover svg {
    opacity: 1;
    filter: drop-shadow(0 0 6px var(--brand, transparent));
}

@media (max-width: 900px) {
    .topbar {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 12px;
    }

    .top-search {
        order: 3;
        flex: 1 0 100%;
        max-width: none;
    }

    .topbar-actions {
        margin-left: auto;
    }

    .nav-links {
        justify-content: flex-start;
        overflow-x: auto;
        padding: 6px 12px 8px;
        scrollbar-width: none;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .main-content {
        padding: 152px 12px 40px;
    }

    .top-search {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 6px;
        margin: 0;
        padding: 4px 4px 4px 12px;
        border-radius: 8px;
    }

    .top-search .hero-search-icon {
        display: block;
    }

    .top-search .hero-search-btn {
        width: auto;
        flex: 0 0 auto;
        padding: 8px 16px;
    }

    .portal-icons {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .portal-main {
        grid-template-columns: 1fr;
    }

    .portal-center { order: 1; }
    .portal-left { order: 2; }
    .portal-right { order: 3; }

    .portal-cat-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2px 8px;
    }

    .portal-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .portal-social {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .topbar {
        gap: 8px;
        padding: 8px 10px;
    }

    .brand-name {
        font-size: 14px;
    }

    .brand-sub {
        display: none;
    }

    .brand-mark {
        width: 32px;
        height: 32px;
        font-size: 15px;
    }

    .main-content {
        padding: 148px 10px 32px;
    }

    .portal-featured .featured-head {
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
        gap: 8px;
    }

    .portal-featured .f-btn {
        white-space: nowrap;
        font-size: 11.5px;
    }

    .portal-icons {
        gap: 4px;
        padding: 10px 6px;
    }

    .pi-tile {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .pi-label {
        font-size: 11px;
    }

    .portal-banner {
        padding: 18px 16px;
        min-height: 136px;
    }

    .pb-title {
        font-size: 19px;
    }

    .portal-featured .home-featured {
        grid-template-columns: 1fr;
    }

    .portal-stats {
        grid-template-columns: 1fr 1fr;
    }
}


/* 上传文件拖拽区 */
.dl-drop {
    margin-top: 6px;
    border: 1.5px dashed rgba(255, 255, 255, 0.28);
    border-radius: 12px;
    padding: 18px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.2s ease, background 0.2s ease;
}
.dl-drop:hover {
    border-color: rgba(122, 148, 176, 0.55);
}
.dl-drop.dragover {
    border-color: #7a94b0;
    background: rgba(122, 148, 176, 0.14);
}
.dl-drop.has-file {
    border-style: solid;
    border-color: rgba(126, 160, 156, 0.65);
}
.dl-drop-icon {
    font-size: 20px;
    line-height: 1;
    color: #7a94b0;
}
.dl-drop-text {
    font-size: 13px;
    color: #9fb2c8;
    text-align: center;
    word-break: break-all;
}
.dl-drop.has-file .dl-drop-text {
    color: #7ea09c;
}
.dl-drop-input {
    display: none;
}

/* 长途旅行子类型 / 待审核徽标与审核按钮 */
.dl-sub-badge {
    position: absolute;
    top: 10px;
    left: 78px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: #0b1220;
    background: linear-gradient(135deg, #7ea09c, #7a94b0);
    pointer-events: none;
}
.dl-pending-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: #1a1206;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.45);
    pointer-events: none;
}
.dl-approve, .dl-reject {
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
}
.dl-approve { background: rgba(126, 160, 156, 0.18); color: #7ea09c; }
.dl-reject { background: rgba(248, 113, 113, 0.16); color: #f87171; }
.dl-approve:hover, .dl-reject:hover { transform: translateY(-1px); filter: brightness(1.15); }
.dl-sub-chips { margin-top: 8px; }
.tld-chip.sub { font-size: 12px; padding: 5px 12px; opacity: 0.9; }

/* ===== 资源详情独立页（soft/<id>.html） ===== */
.nav-item { text-decoration: none; }
.nav-links a.nav-item { color: rgba(255, 255, 255, 0.92); }

main.detail-main {
    max-width: 1240px;
}

.detail-wrap {
    width: 100%;
}

.detail-crumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 18px;
}

.detail-crumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.detail-crumb a:hover { color: #9ecbff; }

.detail-crumb .sep { opacity: 0.5; }

.detail-crumb .now { color: var(--text-main); }

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 34px;
    padding: 30px;
    border-radius: 26px;
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), var(--shadow-deep);
    backdrop-filter: blur(30px) saturate(170%);
    -webkit-backdrop-filter: blur(30px) saturate(170%);
    position: relative;
    overflow: hidden;
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 0%, rgba(122, 148, 176, 0.16), transparent 45%),
        radial-gradient(circle at 92% 100%, rgba(134, 144, 158, 0.16), transparent 45%);
    pointer-events: none;
}

.detail-cover {
    position: relative;
    aspect-ratio: 16 / 10;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.02) 0 14px, transparent 14px 28px),
        rgba(8, 12, 20, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.detail-cover img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 22px;
    filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.5));
}

.detail-cover .detail-cover-letter {
    font-size: 96px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.18);
    line-height: 1;
}

.detail-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.detail-cat {
    align-self: flex-start;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #06101d;
    background: linear-gradient(135deg, #7a94b0, #8a94a2);
    box-shadow: 0 8px 18px -10px rgba(122, 148, 176, 0.9);
}

.detail-title {
    font-size: 40px;
    line-height: 1.2;
    letter-spacing: 0.5px;
    margin: 14px 0 12px;
    color: #f5f8ff;
    word-break: break-word;
}

.detail-desc {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-muted);
    white-space: pre-wrap;
    word-break: break-word;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0;
}

.detail-meta-item {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-meta-item span {
    display: block;
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.detail-meta-item b {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    word-break: break-all;
}

.detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.detail-stat {
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--text-muted);
    background: rgba(122, 148, 176, 0.1);
    border: 1px solid rgba(122, 148, 176, 0.22);
}

.detail-stat b {
    color: #ffffff;
    margin-left: 4px;
    font-weight: 600;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: auto;
    padding-top: 6px;
}

.detail-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.detail-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.1);
}

.detail-btn.primary {
    padding: 16px 42px;
    font-size: 17px;
    border: none;
    color: #16181c;
    background: #d9dde3;
    box-shadow: none;
}

.detail-btn.primary:hover {
    background: #e6e9ee;
    filter: none;
}

.detail-btn.on {
    color: #7ea09c;
    border-color: rgba(126, 160, 156, 0.5);
    background: rgba(126, 160, 156, 0.16);
}

.detail-btn b { font-weight: 700; }

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 26px;
    margin-top: 26px;
    align-items: start;
}

.detail-sec {
    margin-bottom: 22px;
    padding: 26px 28px;
}

.detail-sec:last-child { margin-bottom: 0; }

.detail-sec-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 600;
    color: #f3f6fc;
    margin-bottom: 16px;
}

.detail-sec-title::before {
    content: "";
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background: linear-gradient(180deg, #7a94b0, #8a94a2);
    box-shadow: 0 0 10px rgba(122, 148, 176, 0.55);
}

.detail-sec-title .count {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-dim);
}

.detail-body-text {
    font-size: 15px;
    line-height: 2;
    color: var(--text-muted);
    white-space: pre-wrap;
    word-break: break-word;
}

.detail-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(218px, 1fr));
    gap: 14px;
}

a.detail-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

a.detail-link:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
}

a.detail-link.primary {
    background: linear-gradient(135deg, rgba(122, 148, 176, 0.24), rgba(134, 144, 158, 0.24));
    border-color: rgba(122, 148, 176, 0.5);
}

a.detail-link b {
    font-size: 15px;
    font-weight: 600;
}

a.detail-link small {
    font-size: 12px;
    color: var(--text-dim);
}

.detail-tip {
    margin-top: 14px;
    font-size: 12.5px;
    line-height: 1.8;
    color: var(--text-dim);
}

.detail-info-table {
    display: flex;
    flex-direction: column;
}

.detail-info-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
    font-size: 13.5px;
}

.detail-info-row:last-child { border-bottom: none; }

.detail-info-row span { color: var(--text-dim); flex: 0 0 auto; }

.detail-info-row b {
    color: var(--text-main);
    font-weight: 500;
    text-align: right;
    word-break: break-all;
}

.detail-related {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-related a {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid transparent;
    color: var(--text-main);
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.detail-related a:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.detail-related img,
.detail-related .rph {
    width: 58px;
    height: 44px;
    flex: 0 0 auto;
    border-radius: 8px;
    object-fit: contain;
    padding: 3px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-related .rt {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.detail-related .rt b {
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-related .rt small {
    font-size: 11.5px;
    color: var(--text-dim);
}

.detail-comment-item {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.detail-comment-item:first-child { padding-top: 0; }

.detail-comment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 12.5px;
}

.detail-comment-name {
    color: #9ecbff;
    font-weight: 600;
}

.detail-comment-time { color: var(--text-dim); }

.detail-comment-text {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-muted);
    white-space: pre-wrap;
    word-break: break-word;
}

.detail-comment-del {
    border: none;
    background: none;
    color: #f87171;
    font-size: 12px;
    cursor: pointer;
    padding: 0 2px;
}

.detail-empty {
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-dim);
}

.detail-comment-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.detail-comment-form textarea {
    width: 100%;
    min-height: 84px;
    resize: vertical;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.7;
    outline: none;
}

.detail-comment-form textarea:focus {
    border-color: rgba(122, 148, 176, 0.55);
    box-shadow: 0 0 0 3px rgba(122, 148, 176, 0.12);
}

.detail-comment-form .detail-btn { align-self: flex-start; }

.detail-login-hint {
    margin-top: 14px;
    font-size: 13px;
    color: var(--text-dim);
}

.detail-login-hint a { color: #9ecbff; text-decoration: none; }

.detail-toast {
    position: fixed;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 10px;
    background: rgba(12, 18, 30, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 13.5px;
    z-index: 9999;
    box-shadow: 0 16px 34px -16px rgba(0, 0, 0, 0.9);
}

@media (max-width: 980px) {
    .detail-hero { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-title { font-size: 32px; }
    .detail-hero { gap: 24px; }
}

@media (max-width: 640px) {
    .detail-hero { padding: 18px; }
    .detail-title { font-size: 25px; }
    .detail-desc { font-size: 14.5px; }
    .detail-meta { grid-template-columns: 1fr; }
    .detail-sec { padding: 20px 18px; }
    .detail-actions .detail-btn { width: 100%; }
    .detail-btn.primary { width: 100%; padding: 15px 20px; }
    .detail-links { grid-template-columns: 1fr; }
}

/* ===== 资源列表卡片：参照 fuzhu86 列表页（分类 / 标题 / 两行简介 / 底部数据）===== */
.download-grid {
    grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
    gap: 22px;
    align-items: stretch;
}

.software-card {
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.software-card:hover {
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        0 22px 40px -20px rgba(0, 0, 0, 0.7);
}

.software-info {
    padding: 16px 18px 18px;
}

.software-cat {
    font-size: 12px;
    line-height: 1.3;
    color: var(--accent-cyan);
    margin-bottom: 7px;
    letter-spacing: 0.3px;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.software-name {
    font-size: 1.02rem;
    line-height: 1.45;
    font-weight: 600;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.software-desc {
    font-size: 0.84rem;
    line-height: 1.6;
    color: #9fb0c6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.software-meta {
    border-top: none;
    padding-top: 0;
    margin-bottom: 12px;
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.software-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    flex-wrap: wrap;
}

.dl-mini-stats {
    margin: 0;
    gap: 10px;
    font-size: 11.5px;
    color: #8b9bb0;
}

.dl-count::before {
    content: "↓ ";
}

.download-btn {
    margin-top: 0;
    padding: 8px 18px;
    font-size: 0.82rem;
    align-self: center;
    flex-shrink: 0;
}

@media (max-width: 720px) {
    .download-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .software-info {
        padding: 12px 12px 14px;
    }
    .software-name {
        font-size: 0.94rem;
    }
    .software-desc {
        font-size: 0.78rem;
    }
    .download-btn {
        padding: 6px 12px;
        font-size: 0.76rem;
    }
}

/* ===== 资源列表改为横向条目：左边图片、右边文字（首页推荐保持原样）===== */
.download-grid:not(.home-featured) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.download-grid:not(.home-featured) .software-card {
    flex-direction: row;
    align-items: stretch;
    min-height: 128px;
}

.download-grid:not(.home-featured) .software-img {
    width: 180px;
    flex: 0 0 180px;
    height: 112px;
    min-height: 0;
    margin: 14px;
    aspect-ratio: auto;
    align-self: center;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
}

.download-grid:not(.home-featured) .software-img img {
    width: 100%;
    height: 100%;
    padding: 8px;
    object-fit: contain;
}

.download-grid:not(.home-featured) .software-info {
    padding: 12px 18px 12px 4px;
    justify-content: center;
    min-width: 0;
}

.download-grid:not(.home-featured) .software-cat { margin-bottom: 6px; }
.download-grid:not(.home-featured) .software-name { margin-bottom: 6px; }
.download-grid:not(.home-featured) .software-desc {
    margin-bottom: 8px;
    flex: none;
}
.download-grid:not(.home-featured) .software-meta { margin-bottom: 8px; }
.download-grid:not(.home-featured) .software-foot { margin-top: 0; }

@media (max-width: 720px) {
    .download-grid:not(.home-featured) {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .download-grid:not(.home-featured) .software-card {
        min-height: 92px;
    }
    .download-grid:not(.home-featured) .software-img {
        width: 104px;
        flex: 0 0 104px;
        height: 72px;
        margin: 10px;
    }
    .download-grid:not(.home-featured) .software-img img {
        padding: 5px;
    }
    .download-grid:not(.home-featured) .software-info {
        padding: 8px 12px 8px 0;
    }
    .download-grid:not(.home-featured) .software-meta {
        font-size: 10.5px;
    }
    .download-grid:not(.home-featured) .dl-mini-stats {
        gap: 7px;
        font-size: 10.5px;
    }
    .download-grid:not(.home-featured) .download-btn {
        padding: 5px 10px;
        font-size: 0.72rem;
    }
}

.download-grid:not(.home-featured) .software-card { min-width: 0; }


/* 窄屏下允许主内容区收缩，避免长文本把整页撑宽 */
main.main-content { min-width: 0; }


/* ===== 资源库分页 ===== */
.dl-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 26px 0 6px;
}

.dl-page-btn {
    min-width: 38px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #dfe8f5;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.dl-page-btn:hover:not(:disabled) {
    border-color: rgba(122, 148, 176, 0.5);
    color: #ffffff;
}

.dl-page-btn.active {
    background: linear-gradient(135deg, rgba(122, 148, 176, 0.35), rgba(134, 144, 158, 0.35));
    border-color: rgba(122, 148, 176, 0.6);
    color: #ffffff;
    font-weight: 600;
}

.dl-page-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

/* ===== 去 AI 味：收敛夸张特效与霓虹光感（只改视觉，不改布局）===== */
body {
    background-image: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.04), transparent 55%);
}

.aurora-bg,
.grid-overlay,
.pb-glow,
.dh-glow,
.detail-glow {
    display: none !important;
}

.page-view.active-page {
    animation: none !important;
}

.card-pane,
.detail-hero,
.portal-panel {
    background: rgba(25, 28, 34, 0.94) !important;
    backdrop-filter: blur(8px) saturate(105%) !important;
    -webkit-backdrop-filter: blur(8px) saturate(105%) !important;
    box-shadow: 0 10px 28px -24px rgba(0, 0, 0, 0.85) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.card-pane::before {
    display: none !important;
}

.software-card {
    background: #1a1d23;
    box-shadow: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.software-card.rising {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}

.software-card::after {
    display: none !important;
}

.software-card:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    background: #1f232a;
}

.software-img::after {
    display: none !important;
}

.software-img img,
.software-card:hover .software-img img {
    transform: none !important;
    filter: none !important;
    transition: none !important;
}

.sidebar {
    background: #121419;
    box-shadow: none;
}

.nav-slider {
    background: rgba(255, 255, 255, 0.07);
}

.nav-item,
.nav-item:hover,
.nav-item.active,
.pb-title,
.page-title {
    text-shadow: none !important;
}

.nav-item:hover {
    transform: none;
}

.page-title::before {
    background: var(--accent-cyan);
    box-shadow: none;
}

.home-title,
.pb-title {
    background: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    -webkit-text-fill-color: currentColor !important;
    color: #f2f4f7 !important;
    animation: none !important;
    filter: none !important;
}

.download-btn,
.f-btn,
.social-btn,
.hero-tag,
.chip,
.dl-page-btn,
.portal-mini,
.stat-badge {
    box-shadow: none !important;
    text-shadow: none !important;
}

@media (hover: hover) {
    .download-btn:hover,
    .f-btn:hover,
    .social-btn:hover,
    .hero-tag:hover {
        transform: none !important;
    }
}

/* 按钮统一为低对比扁平样式 */
.hero-search-btn,
.f-btn {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: none !important;
    color: #e6e8ec !important;
}

.hero-search-btn:hover,
.f-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    filter: none !important;
}

.detail-btn {
    transition: background 0.2s ease, border-color 0.2s ease;
}

.detail-btn:hover {
    transform: none;
}

/* ===== 白色主题 ===== */
:root {
    --bg-base: #f4f5f7;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --border-soft: #e4e7ec;
    --border-glow: #d8dde5;
    --accent-cyan: #3f6288;
    --accent-violet: #5b6576;
    --accent-teal: #527a74;
    --text-main: #1e232b;
    --text-muted: #5a6472;
    --text-dim: #8a93a1;
    --shadow-deep: 0 12px 30px -26px rgba(15, 23, 42, 0.35);
}

html,
body {
    background-color: #f4f5f7;
    color: #1e232b;
}

body {
    background-image: none;
}

.sidebar {
    background: #ffffff;
    border-bottom: 1px solid #e4e7ec;
    box-shadow: 0 2px 12px -10px rgba(15, 23, 42, 0.5);
}

.nav-item {
    color: #3c4655;
}

.nav-item:hover,
.nav-item.active {
    color: #10151d;
}

.nav-slider {
    background: #eef1f5;
}

.brand-name {
    color: #1e232b !important;
}

.brand-sub {
    color: #6f7887 !important;
}

.card-pane,
.detail-hero,
.portal-panel,
.portal-banner,
.chat-pane {
    background: #ffffff !important;
    border: 1px solid #e4e7ec !important;
    box-shadow: 0 10px 30px -28px rgba(15, 23, 42, 0.4) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.page-title,
.pb-title,
.software-name,
.detail-title,
.detail-sec-title,
h1,
h2,
h3,
h4 {
    color: #1e232b !important;
}

.pb-sub,
.software-desc,
.detail-desc,
.detail-body-text,
.detail-tip,
.page-sub {
    color: #5a6472 !important;
}

.software-cat,
.detail-cat {
    color: #3f6288 !important;
}

.software-meta,
.dl-mini-stats,
.detail-stat,
.detail-meta-item span {
    color: #6f7887 !important;
}

.software-card {
    background: #ffffff;
    border: 1px solid #e4e7ec;
}

.software-card:hover {
    background: #fafbfc;
    border-color: #d3d8e0 !important;
}

.software-img {
    background: #f7f8fa !important;
    border-color: #eef0f3 !important;
}

input,
textarea,
select {
    background: #ffffff !important;
    color: #1e232b !important;
    border: 1px solid #d8dde5 !important;
}

input::placeholder,
textarea::placeholder {
    color: #98a1ae !important;
}

.hero-search-btn,
.f-btn,
.code-btn,
.dl-page-btn,
.chat-logout {
    background: #f2f4f7 !important;
    border: 1px solid #dfe3e9 !important;
    color: #2a3038 !important;
}

.hero-search-btn:hover,
.f-btn:hover,
.code-btn:hover,
.dl-page-btn:hover:not(:disabled),
.chat-logout:hover {
    background: #e9edf2 !important;
    border-color: #cfd5de !important;
}

.auth-tab {
    background: #f2f4f7 !important;
    border: 1px solid #dfe3e9 !important;
    color: #3c4655 !important;
}

.auth-tab.active {
    background: #232a33 !important;
    border-color: #232a33 !important;
    color: #ffffff !important;
}

.dl-page-btn.active {
    background: #232a33 !important;
    border-color: #232a33 !important;
    color: #ffffff !important;
}

.download-btn,
.auth-submit,
.chat-send {
    background: #232a33 !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
}

.download-btn:hover,
.auth-submit:hover,
.chat-send:hover {
    background: #2f3742 !important;
}

.tld-chip,
.chip {
    background: #ffffff !important;
    border: 1px solid #dfe3e9 !important;
    color: #4a5361 !important;
}

.tld-chip.active,
.chip.active {
    background: #232a33 !important;
    border-color: #232a33 !important;
    color: #ffffff !important;
}

.detail-btn {
    background: #f2f4f7 !important;
    border: 1px solid #dfe3e9 !important;
    color: #2a3038 !important;
    box-shadow: none !important;
}

.detail-btn.primary {
    background: #232a33 !important;
    border-color: #232a33 !important;
    color: #ffffff !important;
}

.detail-btn.primary:hover {
    background: #2f3742 !important;
}

.detail-link {
    background: #f7f8fa !important;
    border: 1px solid #e4e7ec !important;
    color: #1e232b !important;
}

.detail-link small {
    color: #6f7887 !important;
}

.chat-msg-bubble {
    background: #f1f3f6 !important;
    color: #1e232b !important;
}

.chat-msg.mine .chat-msg-bubble {
    background: #e3ecf7 !important;
}

.chat-msg-name,
.chat-msg-meta {
    color: #5a6472 !important;
}

/* 去掉滚动渐显，直接显示内容 */
.reveal,
.reveal.in-view,
.home-card-item {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
}

.nav-item,
.nav-item:hover,
.nav-item.active {
    color: #3c4655 !important;
}

.nav-item.active {
    color: #10151d !important;
}

/* 浅色下的次级文字统一加深，保证可读性 */
.category-item,
.cat-item,
.stat-label,
.stat-value,
.hot-item,
.hot-name,
.hot-meta,
.home-hot-item,
.home-hot-name,
.software-meta,
.dl-mini-stats,
.announcement-bar,
.ann-text,
.sidebar,
.card-pane {
    color: #3c4655;
}

/* 首页浅色可读性修正 */
.portal-panel-head,
.pi-label,
.stat-badge,
.stat-badge b,
.ann-item,
.ann-badge,
.hot-row,
.hot-name,
.hot-meta,
.hc-name,
.hc-desc,
.hc-meta,
.portal-mini,
.portal-cat-list,
.portal-cat-list * {
    color: #3c4655 !important;
}

.pi-label {
    color: #5a6472 !important;
}

.hc-name {
    color: #1e232b !important;
    font-weight: 600;
}

.hc-desc {
    color: #5a6472 !important;
}

.hc-meta {
    color: #8a93a1 !important;
}

.hot-rank {
    background: #eef1f5 !important;
    color: #3c4655 !important;
}

.stat-badge {
    background: #f4f6f8 !important;
    border: 1px solid #e8ebef !important;
}

.portal-mini {
    background: #f2f4f7 !important;
    border: 1px solid #e4e7ec !important;
}

.hot-row:hover {
    background: #f6f8fa !important;
}

/* 顶栏文字对比度 */
.sidebar .nav-item,
.sidebar .nav-item:hover,
.sidebar .nav-item.active {
    color: #3c4655 !important;
}

.sidebar .nav-item.active {
    color: #10151d !important;
    font-weight: 600;
}

/* 资源库标签页 / 搜索框 / 详情统计 */
.dl-tab {
    background: #f2f4f7 !important;
    border: 1px solid #e0e4ea !important;
    color: #3c4655 !important;
}

.dl-tab.active {
    background: #232a33 !important;
    border-color: #232a33 !important;
    color: #ffffff !important;
}

.dl-search {
    background: #ffffff !important;
    border: 1px solid #d8dde5 !important;
}

.dl-search input {
    background: transparent !important;
    border: none !important;
    color: #1e232b !important;
}

.dl-search-icon,
.dl-search-clear {
    color: #8a93a1 !important;
}

.detail-stat,
.detail-stats span {
    background: #f6f7f9 !important;
    border: 1px solid #e6e9ee !important;
    color: #3c4655 !important;
}

.detail-cat {
    background: #eef1f5 !important;
    color: #3c4655 !important;
}

.f-btn.primary {
    background: #232a33 !important;
    border-color: #232a33 !important;
    color: #ffffff !important;
}

.f-btn.primary:hover {
    background: #2f3742 !important;
    border-color: #2f3742 !important;
}

.group-btn {
    background: #ffffff !important;
    border: 1px solid #dfe3e9 !important;
    color: #2a3038 !important;
    box-shadow: none !important;
}

.group-btn:hover {
    background: #f4f6f8 !important;
    border-color: #cfd5de !important;
}

/* ===== Windows 11 (Fluent) 风格 ===== */
:root {
    --bg-base: #f3f3f3;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --border-soft: #e5e5e5;
    --border-glow: #d6d6d6;
    --accent-cyan: #0067c0;
    --accent-violet: #4f6bed;
    --accent-teal: #0f7b6c;
    --text-main: #1a1a1a;
    --text-muted: #5d5d5d;
    --text-dim: #8a8a8a;
    --radius-lg: 8px;
    --radius-md: 8px;
    --shadow-deep: 0 2px 4px rgba(0, 0, 0, 0.06);
}

html,
body {
    background: #f3f3f3;
    color: #1a1a1a;
    font-family: "Segoe UI Variable Text", "Segoe UI", "Microsoft YaHei UI", "微软雅黑", sans-serif;
}

body {
    background-image: radial-gradient(circle at 50% 0%, rgba(0, 103, 192, 0.05), transparent 55%);
}

/* 顶栏 */
.sidebar {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.nav-item,
.sidebar .nav-item,
.sidebar .nav-item:hover {
    color: #1a1a1a !important;
    border-radius: 4px;
    text-shadow: none;
    font-weight: 400;
}

.nav-item::before {
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.045);
}

.nav-item:hover::before {
    opacity: 1;
}

.nav-item.active::before,
.sidebar .nav-item.active::before {
    opacity: 1;
    background: rgba(0, 103, 192, 0.09);
}

.sidebar .nav-item.active {
    color: #0067c0 !important;
    font-weight: 600;
}

.nav-slider {
    display: none;
}

/* 卡片与面板 */
.card-pane,
.portal-panel,
.portal-banner,
.detail-hero,
.chat-pane {
    background: #ffffff !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.software-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: none;
}

.software-card:hover {
    background: #fafafa;
    border-color: #d6d6d6 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.software-img {
    background: #f7f7f7 !important;
    border-color: #efefef !important;
}

/* 主按钮：Fluent 强调色 */
.download-btn,
.auth-submit,
.chat-send,
.f-btn.primary,
.detail-btn.primary {
    background: #0067c0 !important;
    border: 1px solid #0067c0 !important;
    border-radius: 4px !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.download-btn:hover,
.auth-submit:hover,
.chat-send:hover,
.f-btn.primary:hover,
.detail-btn.primary:hover {
    background: #005fb8 !important;
    border-color: #005fb8 !important;
}

/* 次级按钮 */
.hero-search-btn,
.f-btn,
.code-btn,
.dl-page-btn,
.chat-logout,
.group-btn,
.detail-btn {
    background: #fbfbfb !important;
    border: 1px solid #d9d9d9 !important;
    border-radius: 4px !important;
    color: #1a1a1a !important;
    box-shadow: none !important;
}

.hero-search-btn:hover,
.f-btn:hover,
.code-btn:hover,
.dl-page-btn:hover:not(:disabled),
.chat-logout:hover,
.group-btn:hover,
.detail-btn:hover {
    background: #f2f2f2 !important;
    border-color: #c9c9c9 !important;
}

/* 标签/分页选中态 */
.dl-tab,
.auth-tab {
    background: transparent !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 4px !important;
    color: #1a1a1a !important;
}

.dl-tab.active,
.auth-tab.active,
.dl-page-btn.active {
    background: #0067c0 !important;
    border-color: #0067c0 !important;
    color: #ffffff !important;
}

.tld-chip,
.chip {
    background: #fbfbfb !important;
    border: 1px solid #d9d9d9 !important;
    border-radius: 4px !important;
    color: #1a1a1a !important;
}

.tld-chip.active,
.chip.active {
    background: #0067c0 !important;
    border-color: #0067c0 !important;
    color: #ffffff !important;
}

/* 输入框 */
input,
textarea,
select {
    background: #ffffff !important;
    border: 1px solid #d1d1d1 !important;
    border-radius: 4px !important;
    color: #1a1a1a !important;
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid rgba(0, 103, 192, 0.45);
    outline-offset: -1px;
}

.dl-search {
    background: #ffffff !important;
    border: 1px solid #d1d1d1 !important;
    border-radius: 4px !important;
}

.dl-search:focus-within {
    border-color: #0067c0 !important;
    box-shadow: inset 0 0 0 1px #0067c0;
}

.dl-search input {
    border: none !important;
    background: transparent !important;
}

/* 徽标与数据块 */
.detail-cat,
.portal-mini {
    background: #eaf2fb !important;
    border: 1px solid #d6e6f7 !important;
    border-radius: 4px !important;
    color: #005fb8 !important;
}

.stat-badge {
    background: #f7f7f7 !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 4px !important;
}

.detail-stat,
.detail-stats span {
    background: #f7f7f7 !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 4px !important;
}

.hot-rank {
    background: #f3f3f3 !important;
    color: #5d5d5d !important;
    border-radius: 4px !important;
}

/* 分类磁贴 */
.pi-tile {
    background: #eaf2fb !important;
    color: #005fb8 !important;
    border: 1px solid #d6e6f7;
    border-radius: 8px !important;
}

.portal-icon:hover .pi-tile {
    background: #dbeaf9 !important;
    border-color: #b9d6f2;
}

.pi-label {
    color: #5d5d5d !important;
}

/* 聊天气泡 */
.chat-msg-bubble {
    background: #f3f3f3 !important;
    border-radius: 8px !important;
}

.chat-msg.mine .chat-msg-bubble {
    background: #eaf2fb !important;
}

/* 滚动条 */
*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-thumb {
    background: #c7c7c7;
    border-radius: 5px;
    border: 2px solid #f3f3f3;
}

*::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

/* 社交按钮：浅色可读，悬停显示品牌色 */
.social-btn,
.portal-social .social-btn {
    background: #fbfbfb !important;
    border: 1px solid #d9d9d9 !important;
    border-radius: 4px !important;
    color: #1a1a1a !important;
}

.social-btn:hover,
.portal-social .social-btn:hover {
    background: #f2f2f2 !important;
    border-color: #c9c9c9 !important;
    color: var(--brand, #0067c0) !important;
}

.social-btn span,
.social-btn svg {
    color: inherit !important;
}

/* ===== 深色主题（默认） ===== */
html[data-theme="dark"] {
    --bg-base: #1b1b1b;
    --bg-surface: #272727;
    --bg-card: #2b2b2b;
    --border-soft: #3a3a3a;
    --border-glow: #464646;
    --accent-cyan: #4cc2ff;
    --accent-violet: #7aa7ff;
    --accent-teal: #4dd6c1;
    --text-main: #f2f2f2;
    --text-muted: #b6b6b6;
    --text-dim: #8f8f8f;
    --shadow-deep: 0 2px 10px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"],
html[data-theme="dark"] body {
    background-color: #1b1b1b !important;
    background-image: none !important;
    color: #f2f2f2 !important;
}

html[data-theme="dark"] .sidebar {
    background: #272727 !important;
    border-bottom: 1px solid #3a3a3a !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .nav-item,
html[data-theme="dark"] .sidebar .nav-item,
html[data-theme="dark"] .nav-item:hover,
html[data-theme="dark"] .sidebar .nav-item:hover {
    color: #e8e8e8 !important;
}

html[data-theme="dark"] .nav-item::before {
    background: rgba(255, 255, 255, 0.07) !important;
}

html[data-theme="dark"] .nav-item.active,
html[data-theme="dark"] .sidebar .nav-item.active {
    color: #4cc2ff !important;
}

html[data-theme="dark"] .nav-item.active::before,
html[data-theme="dark"] .sidebar .nav-item.active::before {
    background: rgba(76, 194, 255, 0.14) !important;
    opacity: 1 !important;
}

html[data-theme="dark"] .nav-slider {
    background: #333333 !important;
}

html[data-theme="dark"] .brand-name {
    color: #f2f2f2 !important;
}

html[data-theme="dark"] .brand-sub {
    color: #a0a0a0 !important;
}

html[data-theme="dark"] .card-pane,
html[data-theme="dark"] .detail-hero,
html[data-theme="dark"] .portal-panel,
html[data-theme="dark"] .portal-banner,
html[data-theme="dark"] .chat-pane {
    background: #2b2b2b !important;
    border: 1px solid #3a3a3a !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] .page-title,
html[data-theme="dark"] .pb-title,
html[data-theme="dark"] .software-name,
html[data-theme="dark"] .detail-title,
html[data-theme="dark"] .detail-sec-title,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4 {
    color: #f5f5f5 !important;
}

html[data-theme="dark"] .pb-sub,
html[data-theme="dark"] .software-desc,
html[data-theme="dark"] .detail-desc,
html[data-theme="dark"] .detail-body-text,
html[data-theme="dark"] .detail-tip,
html[data-theme="dark"] .page-sub,
html[data-theme="dark"] .hc-desc {
    color: #b6b6b6 !important;
}

html[data-theme="dark"] .software-cat {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    color: #9ddcff !important;
}

html[data-theme="dark"] .detail-cat {
    background: rgba(76, 194, 255, 0.12) !important;
    border: 1px solid rgba(76, 194, 255, 0.24) !important;
    color: #9ddcff !important;
}

html[data-theme="dark"] .software-meta,
html[data-theme="dark"] .dl-mini-stats,
html[data-theme="dark"] .detail-meta-item span,
html[data-theme="dark"] .hc-meta {
    color: #a0a0a0 !important;
}

html[data-theme="dark"] .software-card {
    background: #2b2b2b !important;
    border: 1px solid #3a3a3a !important;
}

html[data-theme="dark"] .software-card:hover {
    background: #323232 !important;
    border-color: #4a4a4a !important;
}

html[data-theme="dark"] .software-img {
    background: #242424 !important;
    border-color: #333333 !important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
    background: #1f1f1f !important;
    color: #f2f2f2 !important;
    border: 1px solid #414141 !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: #8a8a8a !important;
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus {
    outline: 2px solid rgba(76, 194, 255, 0.5);
    outline-offset: -1px;
}

html[data-theme="dark"] .hero-search-btn,
html[data-theme="dark"] .f-btn,
html[data-theme="dark"] .code-btn,
html[data-theme="dark"] .dl-page-btn,
html[data-theme="dark"] .chat-logout,
html[data-theme="dark"] .group-btn,
html[data-theme="dark"] .detail-btn,
html[data-theme="dark"] .top-lang {
    background: #2f2f2f !important;
    border: 1px solid #464646 !important;
    color: #f2f2f2 !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .hero-search-btn:hover,
html[data-theme="dark"] .f-btn:hover,
html[data-theme="dark"] .code-btn:hover,
html[data-theme="dark"] .dl-page-btn:hover:not(:disabled),
html[data-theme="dark"] .chat-logout:hover,
html[data-theme="dark"] .group-btn:hover,
html[data-theme="dark"] .detail-btn:hover,
html[data-theme="dark"] .top-lang:hover {
    background: #3a3a3a !important;
    border-color: #565656 !important;
}

html[data-theme="dark"] .download-btn,
html[data-theme="dark"] .auth-submit,
html[data-theme="dark"] .chat-send,
html[data-theme="dark"] .f-btn.primary,
html[data-theme="dark"] .detail-btn.primary {
    background: #0f6cbd !important;
    border-color: #0f6cbd !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .download-btn:hover,
html[data-theme="dark"] .auth-submit:hover,
html[data-theme="dark"] .chat-send:hover,
html[data-theme="dark"] .f-btn.primary:hover,
html[data-theme="dark"] .detail-btn.primary:hover {
    background: #115ea3 !important;
    border-color: #115ea3 !important;
}

html[data-theme="dark"] .dl-tab,
html[data-theme="dark"] .auth-tab,
html[data-theme="dark"] .tld-chip,
html[data-theme="dark"] .chip {
    background: #2f2f2f !important;
    border: 1px solid #464646 !important;
    color: #e8e8e8 !important;
}

html[data-theme="dark"] .dl-tab.active,
html[data-theme="dark"] .auth-tab.active,
html[data-theme="dark"] .tld-chip.active,
html[data-theme="dark"] .chip.active,
html[data-theme="dark"] .dl-page-btn.active {
    background: #0f6cbd !important;
    border-color: #0f6cbd !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .dl-search {
    background: #1f1f1f !important;
    border: 1px solid #414141 !important;
}

html[data-theme="dark"] .dl-search input {
    background: transparent !important;
    color: #f2f2f2 !important;
}

html[data-theme="dark"] .dl-search-icon,
html[data-theme="dark"] .dl-search-clear {
    color: #8f8f8f !important;
}

html[data-theme="dark"] .stat-badge,
html[data-theme="dark"] .stat-badge b {
    background: #262626 !important;
    border: 1px solid #3a3a3a !important;
    color: #e8e8e8 !important;
}

html[data-theme="dark"] .portal-mini {
    background: rgba(76, 194, 255, 0.12) !important;
    border: 1px solid rgba(76, 194, 255, 0.24) !important;
    color: #9ddcff !important;
}

html[data-theme="dark"] .portal-mini *,
html[data-theme="dark"] .portal-cat-list,
html[data-theme="dark"] .portal-cat-list * {
    color: #cfcfcf !important;
}

html[data-theme="dark"] .portal-panel-head,
html[data-theme="dark"] .ann-item,
html[data-theme="dark"] .ann-badge,
html[data-theme="dark"] .hot-row,
html[data-theme="dark"] .hot-name,
html[data-theme="dark"] .hot-meta,
html[data-theme="dark"] .category-item,
html[data-theme="dark"] .cat-item,
html[data-theme="dark"] .stat-label,
html[data-theme="dark"] .stat-value,
html[data-theme="dark"] .home-hot-item,
html[data-theme="dark"] .home-hot-name {
    color: #cfcfcf !important;
}

html[data-theme="dark"] .hc-name {
    color: #f2f2f2 !important;
}

html[data-theme="dark"] .hot-rank {
    background: #333333 !important;
    color: #cfcfcf !important;
}

html[data-theme="dark"] .hot-row:hover {
    background: #303030 !important;
}

html[data-theme="dark"] .pi-tile {
    background: rgba(76, 194, 255, 0.13) !important;
    border: 1px solid rgba(76, 194, 255, 0.22) !important;
    color: #9ddcff !important;
}

html[data-theme="dark"] .pi-label {
    color: #b6b6b6 !important;
}

html[data-theme="dark"] .detail-stat,
html[data-theme="dark"] .detail-stats span {
    background: #262626 !important;
    border: 1px solid #3a3a3a !important;
    color: #e8e8e8 !important;
}

html[data-theme="dark"] .detail-link {
    background: #262626 !important;
    border: 1px solid #3a3a3a !important;
    color: #f2f2f2 !important;
}

html[data-theme="dark"] .detail-link small {
    color: #a0a0a0 !important;
}

html[data-theme="dark"] .chat-msg-bubble {
    background: #333333 !important;
    color: #f2f2f2 !important;
}

html[data-theme="dark"] .chat-msg.mine .chat-msg-bubble {
    background: rgba(76, 194, 255, 0.16) !important;
}

html[data-theme="dark"] .chat-msg-name,
html[data-theme="dark"] .chat-msg-meta {
    color: #a0a0a0 !important;
}

html[data-theme="dark"] .announcement-bar,
html[data-theme="dark"] .ann-text {
    background: #262626 !important;
    border-color: #3a3a3a !important;
    color: #cfcfcf !important;
}

html[data-theme="dark"] .music-panel {
    background: #2b2b2b !important;
    border: 1px solid #3a3a3a !important;
}

html[data-theme="dark"] .music-title,
html[data-theme="dark"] .music-list-head {
    color: #f2f2f2 !important;
}

html[data-theme="dark"] .music-artist,
html[data-theme="dark"] .music-list li {
    color: #b6b6b6 !important;
}

html[data-theme="dark"] *::-webkit-scrollbar-thumb {
    background: #4a4a4a;
    border-color: #1b1b1b;
}

/* 主题切换按钮 */
.theme-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid #d9d9d9;
    background: #fbfbfb;
    color: #000000;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: background 0.2s ease;
}

.theme-btn svg {
    width: 17px;
    height: 17px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-btn:hover {
    background: #f2f2f2;
}

html[data-theme="dark"] .theme-btn {
    background: #2f2f2f !important;
    border-color: #464646 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .theme-btn:hover {
    background: #3a3a3a !important;
}

/* ===== 移动端：顶栏不再遮挡内容 ===== */
.main-content {
    padding-top: calc(var(--topbar-h, 84px) + 14px) !important;
}

@media (max-width: 720px) {
    .topbar {
        flex-wrap: wrap;
        padding-bottom: 4px;
    }

    .nav-links {
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 2px;
        justify-content: flex-start;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-item {
        padding: 9px 14px !important;
        font-size: 14px;
    }

    .main-content {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }
}

/* 移动端横向溢出修正 */
@media (max-width: 720px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden !important;
    }

    .sidebar {
        padding: 8px 10px 6px !important;
    }

    .topbar {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .logo-area {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    .topbar-actions {
        flex: 0 0 auto !important;
        margin-left: auto !important;
        gap: 6px !important;
    }

    .hero-search.top-search {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 6px !important;
        margin: 0 !important;
        padding: 4px 6px !important;
        border-radius: 8px !important;
    }

    .hero-search.top-search .hero-search-icon {
        display: block !important;
    }

    .hero-search.top-search input {
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
        padding: 8px 4px !important;
        font-size: 14px !important;
    }

    .hero-search.top-search .hero-search-btn {
        flex: 0 0 auto !important;
        width: auto !important;
        padding: 8px 14px !important;
        border-radius: 6px !important;
        font-size: 13px !important;
    }

    .portal-icons {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 10px 8px !important;
        width: 100% !important;
    }

    .portal-icon,
    .pi-tile {
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .download-grid,
    .software-list {
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important;
    }

    .software-card,
    .card-pane,
    .portal-panel {
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .main-content {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

/* ===== 手机端资源库排版（仅影响 ≤720px） ===== */
@media (max-width: 720px) {
    .dl-toolbar {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 10px !important;
    }

    .dl-toolbar .dl-search {
        flex: 1 1 100% !important;
        width: 100% !important;
    }

    .dl-toolbar .dl-sort {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        width: auto !important;
        height: 44px;
    }

    .dl-toolbar .dl-upload-btn {
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 108px;
        height: 44px;
        padding: 0 16px !important;
        font-size: 14px !important;
        white-space: nowrap !important;
        text-align: center !important;
    }

    .dl-toolbar .dl-admin-upload {
        flex: 1 1 100% !important;
        justify-content: flex-start !important;
        margin: 0 !important;
    }

    /* 资源卡片：图片在上、文字在下，缩略图不再被压成小方块 */
    .download-grid:not(.home-featured) .software-card {
        flex-direction: column !important;
        min-height: 0 !important;
        align-items: stretch !important;
    }

    .download-grid:not(.home-featured) .software-img {
        width: 100% !important;
        flex: 0 0 auto !important;
        height: auto !important;
        aspect-ratio: 16 / 9;
        margin: 0 !important;
        align-self: stretch !important;
        border: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-radius: 14px 14px 0 0 !important;
        background: rgba(0, 0, 0, 0.18) !important;
    }

    .download-grid:not(.home-featured) .software-img img {
        width: 100% !important;
        height: 100% !important;
        padding: 12px !important;
        object-fit: contain;
    }

    .download-grid:not(.home-featured) .software-info {
        padding: 12px 14px 14px !important;
    }

    .download-grid:not(.home-featured) .software-cat {
        margin-bottom: 4px;
        font-size: 12px;
    }

    .download-grid:not(.home-featured) .software-name {
        margin-bottom: 6px;
        font-size: 17px;
    }

    .download-grid:not(.home-featured) .software-desc {
        margin-bottom: 8px;
        font-size: 13px;
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .download-grid:not(.home-featured) .software-meta {
        font-size: 12px;
        line-height: 1.6;
        margin-bottom: 10px;
    }

    .download-grid:not(.home-featured) .software-foot {
        margin-top: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px;
    }

    .download-grid:not(.home-featured) .dl-mini-stats {
        gap: 10px;
        font-size: 12px;
    }

    .download-grid:not(.home-featured) .download-btn {
        padding: 8px 18px !important;
        font-size: 14px !important;
        min-height: 38px;
    }

    .download-grid:not(.home-featured) .dl-tools {
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 10px;
    }

    .download-grid:not(.home-featured) .dl-tools .f-btn {
        min-height: 34px;
        padding: 6px 14px;
        font-size: 13px;
    }
}

/* 手机端首页「最近更新」卡片：同样改为大图在上 */
@media (max-width: 720px) {
    .home-card-item,
    .home-featured .home-card-item {
        flex-direction: column !important;
        align-items: stretch !important;
        min-height: 0 !important;
        padding: 0 !important;
        overflow: hidden;
    }

    .home-card-item .software-img {
        width: 100% !important;
        flex: 0 0 auto !important;
        height: auto !important;
        aspect-ratio: 16 / 9;
        margin: 0 !important;
        border: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-radius: 0 !important;
    }

    .home-card-item .software-info {
        padding: 10px 12px 12px !important;
    }

    .home-card-item .software-name {
        font-size: 16px;
        margin-bottom: 4px;
    }

    .home-card-item .software-desc {
        font-size: 12.5px;
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 8px;
    }

    .home-card-item .software-foot {
        margin-top: 0 !important;
    }

    .home-card-item .download-btn {
        padding: 8px 16px !important;
        font-size: 13.5px !important;
        min-height: 36px;
    }
}

/* ===== 浅色主题补充：修复浅色下不可读的控件 ===== */
html[data-theme="light"] .top-lang {
    background: #fbfbfb !important;
    border: 1px solid #d9d9d9 !important;
    color: #1a1a1a !important;
}

html[data-theme="light"] .top-lang:hover {
    background: #f2f2f2 !important;
    border-color: #c9c9c9 !important;
}

html[data-theme="light"] .loader-step {
    background: #fbfbfb;
    border-color: #e4e7ec;
}

html[data-theme="light"] .loader-step-title {
    color: #1e232b;
}

html[data-theme="light"] .loader-variant-btn {
    background: #ffffff;
    border-color: #d9d9d9;
}

html[data-theme="light"] .loader-variant-btn b {
    color: #1e232b;
}

html[data-theme="light"] .loader-variant-btn span {
    color: #5a6472;
}

html[data-theme="light"] .loader-variant-btn.selected {
    background: #eaf3ff;
    border-color: #0067c0;
}

html[data-theme="light"] .loader-btn:not(.primary),
html[data-theme="light"] .loader-mini-btn {
    background: #fbfbfb;
    border-color: #d9d9d9;
    color: #1a1a1a;
}

html[data-theme="light"] .loader-btn:not(.primary):hover,
html[data-theme="light"] .loader-mini-btn:hover {
    background: #f2f2f2;
    border-color: #c9c9c9;
    color: #1a1a1a;
}

html[data-theme="light"] .loader-state {
    background: #eef1f5;
    color: #5a6472;
}

html[data-theme="light"] .loader-path-input {
    background: #ffffff;
    border-color: #d9d9d9;
    color: #1e232b;
}

html[data-theme="light"] .loader-log {
    background: #f7f8fa;
    border-color: #e4e7ec;
    color: #3c4655;
}

html[data-theme="light"] .tld-page-btn {
    background: #fbfbfb;
    border-color: #d9d9d9;
    color: #5a6472;
}

html[data-theme="light"] .tld-page-btn:hover:not(.disabled) {
    color: #1e232b;
    border-color: #c9c9c9;
}

html[data-theme="light"] .tld-page-btn.active {
    background: #0067c0;
    border-color: #0067c0;
    color: #ffffff;
}

/* 深色主题：搜索框清除按钮的悬停反馈 */
html[data-theme="dark"] .dl-search-clear:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    color: #e8e8e8 !important;
}
