/* 双源飞流下载站 - 全新极简现代设计系统 (Ultramodern Edition) */

@import url('fonts.css');

:root,
:root[data-theme="indigo"] {
    /* 核心色彩 - Indigo 主题 (默认) */
    --h-primary: 239;
    --h-secondary: 270;
    --h-accent: 187;

    --accent-primary: hsl(var(--h-primary), 84%, 67%);
    --accent-secondary: hsl(var(--h-secondary), 95%, 75%);
    --accent-tertiary: hsl(var(--h-accent), 85%, 60%);

    /* 兼容旧变量名 */
    --accent-indigo: var(--accent-primary);
    --accent-purple: var(--accent-secondary);
    --accent-cyan: var(--accent-tertiary);

    /* 界面基础颜色 */
    --bg-deep: #05070a;
    --bg-surface: rgba(13, 17, 26, 0.7);
    --bg-glass: rgba(255, 255, 255, 0.03);

    --text-high: #ffffff;
    --text-mid: #94a3b8;
    --text-low: #64748b;

    /* 边框与阴影 */
    --border-glass: rgba(255, 255, 255, 0.08);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px -10px hsla(var(--h-primary), 80%, 60%, 0.4);

    /* 渐变 */
    --grad-main: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    --grad-surface: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    --grad-glow: linear-gradient(135deg, hsla(var(--h-primary), 80%, 60%, 0.2) 0%, hsla(var(--h-secondary), 80%, 60%, 0.1) 100%);
}

/* Emerald 主题 - 翡翠绿 */
:root[data-theme="emerald"] {
    --h-primary: 158;
    --h-secondary: 187;
    --h-accent: 199;

    --accent-primary: hsl(158, 64%, 52%);
    --accent-secondary: hsl(187, 85%, 53%);
    --accent-tertiary: hsl(199, 89%, 48%);

    --accent-indigo: var(--accent-primary);
    --accent-purple: var(--accent-secondary);
    --accent-cyan: var(--accent-tertiary);

    /* 带绿色调的深色背景 */
    --bg-deep: #040a0a;
    --bg-surface: rgba(10, 30, 28, 0.9);
    --bg-glass: rgba(16, 185, 129, 0.08);
    --border-glass: rgba(16, 185, 129, 0.15);

    --shadow-glow: 0 0 30px -10px hsla(158, 80%, 50%, 0.4);
    --grad-main: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    --grad-glow: linear-gradient(135deg, hsla(158, 80%, 50%, 0.2) 0%, hsla(187, 80%, 50%, 0.1) 100%);
}

/* Sunset 主题 - 日落橙 */
:root[data-theme="sunset"] {
    --h-primary: 25;
    --h-secondary: 0;
    --h-accent: 45;

    --accent-primary: hsl(25, 95%, 53%);
    --accent-secondary: hsl(0, 84%, 60%);
    --accent-tertiary: hsl(45, 93%, 58%);

    --accent-indigo: var(--accent-primary);
    --accent-purple: var(--accent-secondary);
    --accent-cyan: var(--accent-tertiary);

    /* 带暖色调的深色背景 */
    --bg-deep: #0a0604;
    --bg-surface: rgba(30, 18, 10, 0.9);
    --bg-glass: rgba(249, 115, 22, 0.08);
    --border-glass: rgba(249, 115, 22, 0.15);

    --shadow-glow: 0 0 30px -10px hsla(25, 90%, 55%, 0.4);
    --grad-main: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    --grad-glow: linear-gradient(135deg, hsla(25, 90%, 55%, 0.2) 0%, hsla(0, 80%, 55%, 0.1) 100%);
}

/* Light 主题 - 亮色 */
:root[data-theme="light"] {
    --h-primary: 239;
    --h-secondary: 270;
    --h-accent: 187;

    --accent-primary: hsl(239, 84%, 60%);
    --accent-secondary: hsl(270, 95%, 65%);
    --accent-tertiary: hsl(187, 85%, 45%);

    --accent-indigo: var(--accent-primary);
    --accent-purple: var(--accent-secondary);
    --accent-cyan: var(--accent-tertiary);

    /* 亮色界面基础颜色 */
    --bg-deep: #f5f7fa;
    --bg-surface: rgba(255, 255, 255, 0.9);
    --bg-glass: rgba(0, 0, 0, 0.03);

    --text-high: #1a1a2e;
    --text-mid: #4a5568;
    --text-low: #718096;

    /* 边框与阴影 */
    --border-glass: rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 30px -10px hsla(239, 80%, 60%, 0.25);

    --grad-main: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    --grad-surface: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.4) 100%);
    --grad-glow: linear-gradient(135deg, hsla(239, 80%, 60%, 0.15) 0%, hsla(270, 80%, 60%, 0.08) 100%);
}

.gradient-text {
    background: var(--grad-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

* {
    box-sizing: border-box;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-high);
    font-family: 'Plus Jakarta Sans', -apple-system, system-ui, sans-serif;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* 动态背景装饰 */
.bg-blob {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: 0.12;
    pointer-events: none;
    animation: blobFloat 25s infinite ease-in-out;
}

.blob-1 {
    background: var(--accent-primary);
    top: -200px;
    left: -200px;
}

.blob-2 {
    background: var(--accent-secondary);
    bottom: -200px;
    right: -200px;
    animation-delay: -10s;
}

.blob-3 {
    background: var(--accent-tertiary);
    top: 50%;
    left: 50%;
    animation-duration: 35s;
}

@keyframes blobFloat {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    33% {
        transform: translate(100px, 50px) rotate(120deg) scale(1.1);
    }

    66% {
        transform: translate(-50px, 100px) rotate(240deg) scale(0.9);
    }

    100% {
        transform: translate(0, 0) rotate(360deg) scale(1);
    }
}

/* 导航栏动态 SVG 图标样式 */
.nav-svg-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    transition: all 0.3s ease;
}

.nav-flat-item:hover .nav-svg-icon {
    filter: drop-shadow(0 0 5px var(--accent-primary));
    transform: scale(1.1);
}

/* 下拉菜单 SVG 图标样式 */
.dropdown-svg-icon {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    display: inline-block;
    vertical-align: middle;
    margin-right: 2px;
}

/* 动画类型 */
.animate-float {
    animation: nav-float 3s ease-in-out infinite;
}

@keyframes nav-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2px);
    }
}

.animate-pulse {
    animation: nav-pulse 2s ease-in-out infinite;
}

@keyframes nav-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.85;
    }
}

.animate-bounce {
    animation: nav-bounce 2.5s ease-in-out infinite;
}

@keyframes nav-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

.animate-spin-slow {
    animation: nav-spin 8s linear infinite;
}

@keyframes nav-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* 导航栏 */
.compact-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(5, 7, 10, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.navbar-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -1px;
    background: var(--grad-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.navbar-menu {
    display: flex;
    gap: 8px;
}

.nav-flat-item {
    padding: 10px 18px;
    border-radius: 12px;
    color: var(--text-mid);
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-flat-item:hover {
    color: var(--text-high);
    background: var(--bg-glass);
    transform: translateY(-1px);
}

/* 页面主要区域 */
/* 页面主要区域 */
.main-content {
    padding: 90px 32px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* 现代搜索体验 */
.search-wrapper {
    position: relative;
    max-width: 640px;
    margin: 0 auto 60px;
}

.search-box {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 20px 32px;
    color: var(--text-high);
    font-size: 18px;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.search-box:focus {
    outline: none;
    border-color: var(--accent-indigo);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-glow), 0 20px 40px -15px rgba(0, 0, 0, 0.6);
    transform: translateY(-4px);
}

/* 下载区块设计 */
.glass-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: 32px;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.category-section {
    margin-bottom: 24px;
}

.category-title {
    padding: 20px 32px;
    background: var(--bg-glass);
    border-radius: 24px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.category-title:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-glass);
    transform: scale(1.005);
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 32px;
    right: 32px;
    height: 2px;
    background: var(--grad-main);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-title.expanded::after {
    transform: scaleX(1);
}

.category-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s;
    margin-right: 20px;
}

.category-icon svg {
    width: 26px;
    height: 26px;
    color: inherit;
    filter: drop-shadow(0 0 10px currentColor);
    animation: iconFloat 4s ease-in-out infinite;
}

@keyframes iconFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

.category-title:hover .category-icon {
    transform: scale(1.15) rotate(5deg);
}

.category-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.category-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-high);
    letter-spacing: -0.8px;
}

.category-badge {
    padding: 6px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.category-arrow {
    color: var(--text-low);
    font-size: 16px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 20px;
}

/* 下载卡片网格 */
.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
    padding: 24px 0 0;
    transition: all 0.5s ease;
}

.download-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.download-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6),
        0 0 40px -10px rgba(99, 102, 241, 0.25);
}

.download-name {
    font-size: 19px;
    font-weight: 800;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.version-tag {
    font-size: 11px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-indigo);
    padding: 2px 10px;
    border-radius: 6px;
    font-weight: 800;
    border: 1px solid rgba(99, 102, 241, 0.2);
    white-space: nowrap;
    display: inline-block;
}

.patch-card-badge-container {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.download-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.version-badge {
    font-size: 11px;
    color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 700;
    border: 1px solid rgba(99, 102, 241, 0.2);
    white-space: nowrap;
    flex-shrink: 0;
    /* 防止版本号被压缩 */
}

.download-desc {
    font-size: 13px;
    /* 稍微调小一点描述文字 */
    color: var(--text-muted);
    /* 使用更柔和的颜色 */
    margin-bottom: 20px;
    line-height: 1.5;
}

.download-btn {
    background: var(--grad-main);
    color: #fff;
    padding: 12px 24px;
    border-radius: 14px;
    border: none;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 16px -4px rgba(99, 102, 241, 0.4);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.5s;
}

.download-btn:hover::before {
    left: 100%;
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -4px rgba(99, 102, 241, 0.5);
}

/* 分类主题色设置 */
.category-server .category-icon {
    color: var(--accent-indigo);
}

.category-desktop .category-icon {
    color: var(--accent-purple);
}

.category-patch .category-icon {
    color: var(--accent-cyan);
}

.category-cloud .category-icon {
    color: #38bdf8;
    /* 天蓝色 */
}

.category-legacy .category-icon {
    color: #94a3b8;
    /* 灰蓝色 */
}

.category-server .category-badge {
    background: var(--accent-indigo);
    color: #000;
}

.category-desktop .category-badge {
    background: var(--accent-purple);
    color: #000;
}

.category-patch .category-badge {
    background: var(--accent-cyan);
    color: #000;
}

.category-cloud .category-badge {
    background: #38bdf8;
    color: #000;
}

/* 模态框高端设计 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: all 0.4s;
}

.modal-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-container {
    width: 95%;
    height: 92%;
    max-width: 1400px;
    background: var(--bg-deep);
    border-radius: 32px;
    border: 1px solid var(--border-glass);
    box-shadow: 0 100px 200px rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95) translateY(30px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 16px 32px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-weight: 800;
    font-size: 18px;
    color: var(--accent-indigo);
    margin: 0;
}

.modal-close {
    background: var(--bg-glass);
    border: none;
    color: var(--text-high);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.modal-iframe-container {
    flex: 1;
    position: relative;
    background: #fff;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-iframe {
    width: 100%;
    height: 8000px;
    /* 固定大高度，支撑容器滚动实现自动跳转 */
    border: none;
    display: block;
}

/* 加载动画与提示 */
.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-mid);
    z-index: 10;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--accent-indigo);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 操作指引横幅 */
.guide-banner {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    background: rgba(13, 17, 26, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid var(--accent-indigo);
    padding: 16px 24px;
    border-radius: 16px;
    z-index: 2001;
    /* 确保在容器之上，但设为禁止点击以便穿透 */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    /* 关键：允许点击事件穿透到下方的 iframe 容器 */
    animation: bannerSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.guide-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-high);
    text-align: center;
}

/* 亮色主题下引导横幅适配 */
:root[data-theme="light"] .guide-banner {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

:root[data-theme="light"] .guide-text {
    color: #334155;
}

/* 引导文字高亮类 */
.guide-hl-primary {
    color: #818cf8;
}

/* 亮色下稍深一点 */
.guide-hl-cyan {
    color: #22d3ee;
}

.guide-hl-warn {
    color: #fbbf24;
}

:root[data-theme="light"] .guide-hl-primary {
    color: #4f46e5;
}

:root[data-theme="light"] .guide-hl-cyan {
    color: #0891b2;
}

:root[data-theme="light"] .guide-hl-warn {
    color: #d97706;
}


@keyframes bannerSlideIn {
    from {
        transform: translate(-50%, -20px);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* 统一命令手册与补丁表格 */
.command-item,
.patch-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 16px;
    transition: all 0.3s;
}

.code-block {
    background: #000;
    border-radius: 14px;
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: var(--accent-cyan);
    border: 1px solid rgba(34, 211, 238, 0.2);
    white-space: pre-wrap;
    word-break: break-all;
    text-align: left;
}

/* 响应式优化 (Mobile Optimized) */
@media (max-width: 768px) {
    .main-content {
        padding: 84px 14px 60px;
    }

    h1.display-4 {
        font-size: 26px !important;
        letter-spacing: -1.5px;
    }

    .page-header p {
        font-size: 13px;
        opacity: 0.8;
    }

    .glass-card {
        padding: 24px 16px;
        border-radius: 28px;
    }

    .downloads-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .download-card,
    .patch-card {
        padding: 20px 16px 16px;
        margin-bottom: 12px;
        position: relative;
        overflow: hidden;
    }

    .download-btn {
        padding: 10px 20px;
        font-size: 13px;
        border-radius: 12px;
    }

    .download-desc {
        margin-bottom: 16px;
    }

    .download-name {
        font-size: 16px;
        padding-right: 0;
        /* 移除 padding */
        display: block;
    }

    /* 移动端徽章统一到右上角 */
    .patch-card-badge-container {
        position: absolute;
        top: 12px;
        right: 12px;
        margin: 0;
        z-index: 2;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
        transform: scale(0.85);
        transform-origin: right top;
    }

    /* 内部标签不再独立定位 */
    .version-tag,
    .patch-card-tag {
        position: static;
        margin: 0;
    }

    .category-title {
        position: relative;
        /* 关键：确保箭头相对于标题定位 */
        padding: 20px 50px 20px 20px;
        min-height: auto;
        display: flex;
        align-items: center;
        gap: 14px;
    }

    .category-icon {
        margin: 0;
        padding-top: 0;
    }

    .category-icon svg {
        width: 24px;
        height: 24px;
    }

    .category-info {
        display: block;
        /* 改为块级流式布局 */
        padding-right: 0;
    }

    .category-name {
        font-size: 18px;
        font-weight: 800;
        line-height: 1.5;
        letter-spacing: -0.5px;
        display: inline;
        /* 关键：允许文字内部换行 */
    }

    .category-badge {
        position: static;
        display: inline-block;
        /* 像文字一样排列 */
        padding: 2px 10px;
        font-size: 11px;
        font-weight: 800;
        border-radius: 6px;
        margin: 0 0 0 8px;
        /* 左侧间距 */
        z-index: 5;
        vertical-align: middle;
        transform: translateY(-2px);
        /* 微调垂直对齐 */
    }

    .category-arrow {
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 16px;
        opacity: 0.6;
    }

    .category-title.expanded .category-arrow {
        transform: translateY(-50%) rotate(180deg);
    }

    .patch-card-tag,
    .severity-badge {
        font-size: 10px;
        padding: 2px 6px;
        border-radius: 4px;
        white-space: nowrap;
    }

    .patch-card-info {
        margin-bottom: 10px;
    }

    .search-box {
        padding: 14px 20px;
        font-size: 15px;
        border-radius: 16px;
    }

    .announcement-container {
        top: 80px;
        /* 移动端在顶部 */
        right: 12px;
        left: 12px;
        max-width: none;
        padding: 14px 18px;
        bottom: auto;
    }

    .back-to-top {
        bottom: 65px;
        right: 15px;
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .back-to-top svg {
        width: 18px;
        height: 18px;
    }

    /* 模态框移动端点击与滑动优化 */
    .modal-container {
        width: 100% !important;
        height: 100% !important;
        border-radius: 0;
        transform: translateY(100%);
        /* 从底部滑入 */
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .modal-overlay.active .modal-container {
        transform: translateY(0);
    }

    .modal-iframe-container {
        -webkit-overflow-scrolling: touch;
        /* iOS 顺滑滚动 */
        overflow-y: scroll;
        position: relative;
    }

    .modal-header {
        padding: 12px 20px;
        border-top: 4px solid var(--accent-indigo);
        /* 移动端增加顶部装饰条 */
    }

    .guide-banner {
        top: 60px;
        width: 95%;
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* 导航栏自适应增强 */
.navbar-mobile-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

@media (max-width: 992px) {
    .navbar-menu {
        position: fixed;
        top: 64px;
        left: 12px;
        right: 12px;
        background: rgba(13, 17, 26, 0.98);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border: 1px solid var(--border-glass);
        border-radius: 20px;
        flex-direction: column;
        padding: 12px;
        gap: 4px;
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
        pointer-events: none;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 40px 80px rgba(0, 0, 0, 0.8);
    }

    .navbar-menu.active {
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: all;
    }

    .navbar-mobile-toggle {
        display: flex;
    }

    .nav-flat-item {
        width: 100%;
        padding: 14px 20px;
        justify-content: flex-start;
    }
}

/* 公告容器 (右下角，相对于内容区域定位) */
.announcement-container {
    position: fixed;
    bottom: 100px;
    right: max(32px, calc((100vw - 1400px) / 2 - 60px));
    top: auto;
    left: auto;
    max-width: 340px;
    background: var(--bg-surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 20px;
    z-index: 9997;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
    animation: slideUpIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpIn {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}


.announcement-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.announcement-close:hover {
    background: #ff4d4f;
    color: white;
}

.announcement-icon {
    font-weight: 800;
    color: var(--accent-indigo);
    font-size: 16px;
}

.announcement-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-main);
}

/* ==================== 首页分类折叠交互 ==================== */
.category-content {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-content.collapsed {
    display: none;
    opacity: 0;
    transform: translateY(-10px);
}

.category-title.expanded .category-arrow {
    transform: rotate(180deg);
    color: var(--accent-indigo);
}

/* ==================== 补丁页面专用样式 (Ultra Patch UI) ==================== */

/* 内容区块显示控制 */
.content-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 标签页导航 */
.tabs-container {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    padding: 6px;
    background: var(--bg-surface);
    border-radius: 18px;
    width: fit-content;
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-xl);
}

.tab-btn {
    padding: 12px 24px;
    border-radius: 14px;
    border: none;
    background: transparent;
    color: var(--text-mid);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    background: var(--grad-main);
    color: #fff;
    box-shadow: 0 8px 16px -4px rgba(99, 102, 241, 0.4);
}

/* 补丁页搜索栏 */
.search-container {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 20px;
    color: var(--text-low);
    font-size: 18px;
    pointer-events: none;
}

.search-input {
    width: 100%;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 16px 20px 16px 52px;
    color: #fff;
    font-size: 15px;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-indigo);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-glow);
}

.search-btn {
    padding: 0 28px;
    background: var(--grad-main);
    border: none;
    border-radius: 16px;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 16px -4px rgba(99, 102, 241, 0.3);
}

/* 深色玻璃表格 */
.table-container {
    overflow-x: auto;
    border-radius: 20px;
    border: 1px solid var(--border-glass);
    background: rgba(0, 0, 0, 0.2);
}

.dark-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: var(--text-mid);
}

.dark-table th {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px 16px;
    text-align: left;
    font-weight: 800;
    color: #fff;
}

.dark-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.severity-critical {
    background: #fee2e2;
    color: #991b1b;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
}

.severity-high {
    background: #ffedd5;
    color: #9a3412;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
}

.table-download-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(34, 211, 238, 0.1);
    color: var(--accent-cyan);
    padding: 8px 14px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid rgba(34, 211, 238, 0.2);
    transition: all 0.3s;
}

.table-download-link:hover {
    background: var(--accent-cyan);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 211, 238, 0.4);
}

.mobile-cards-container {
    display: none;
}

@media (max-width: 992px) {
    .table-container {
        display: none;
    }

    .mobile-cards-container {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .patch-card {
        padding: 16px;
    }

    .patch-card-title {
        font-size: 15px;
        line-height: 1.4;
    }

    .patch-card-download {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* 返回顶部 (动态扁平化) */
.back-to-top {
    position: fixed;
    bottom: 85px;
    /* AI 按钮上方 */
    right: 25px;
    width: 48px;
    height: 48px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    color: #fff;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9997;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.back-to-top:hover {
    transform: translateY(-5px);
    background: var(--accent-indigo);
    border-color: var(--accent-indigo);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4);
}

.back-to-top svg {
    width: 22px;
    height: 22px;
    transition: transform 0.4s;
}

.back-to-top:hover svg {
    transform: translateY(-2px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.command-title,
.command-description {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}