/* ========== 颜色变量系统 ========== */
:root {
    /* 主色调 */
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-200: #bae6fd;
    --primary-400: #38bdf8;
    --primary-500: #0ea5e9;
    --primary-600: #0284c7;
    --primary-700: #0369a1;

    /* 紫色渐变 */
    --purple-400: #c084fc;
    --purple-500: #a855f7;
    --purple-600: #9333ea;

    /* 中性色 */
    --gray-50: #fafafa;
    --gray-100: #f4f4f5;
    --gray-200: #e4e4e7;
    --gray-300: #d4d4d8;
    --gray-400: #a1a1aa;
    --gray-500: #71717a;
    --gray-600: #52525b;
    --gray-700: #3f3f46;
    --gray-800: #27272a;
    --gray-900: #18181b;

    /* 语义色 */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* 背景色 */
    --bg-body: #ffffff;
    --bg-secondary: var(--gray-50);
    --bg-card: #ffffff;

    /* 文字颜色 */
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-tertiary: var(--gray-500);

    /* 边框 */
    --border-color: var(--gray-200);
    --border-hover: var(--primary-400);

    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
        'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(14, 165, 233, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ========== 导航栏 ========== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.3s ease;
}

.nav-logo:hover {
    transform: translateY(-2px);
}

.nav-logo-icon {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(14, 165, 233, 0.3));
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-500), var(--purple-500));
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover {
    color: var(--primary-600);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ========== 主容器 ========== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* ========== 页面头部 ========== */
.page-header {
    padding-top: 8rem;
    padding-bottom: 4rem;
    text-align: center;
}

.page-header h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--purple-600) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    animation: fadeInUp 0.8s ease-out;
}

.page-header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* ========== 提示框 ========== */
.hint-box {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05) 0%, rgba(168, 85, 247, 0.05) 100%);
    border: 2px solid var(--primary-200);
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hint-box strong {
    color: var(--primary-700);
    font-weight: 700;
}

.hint-box code {
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary-700);
    padding: 0.25rem 0.6rem;
    border-radius: 0.375rem;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid var(--primary-200);
}

/* ========== 产品系列容器（左右分栏） ========== */
.products-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

/* ========== 分类区域 ========== */
.category-section {
    animation: fadeInUp 0.8s ease-out;
}

.category-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05) 0%, rgba(168, 85, 247, 0.05) 100%);
    border-radius: 1rem;
    border: 2px solid var(--border-color);
}

.category-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 900;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--purple-600) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.01em;
}

.category-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ========== 下载卡片网格 ========== */
.downloads-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

/* ========== 下载卡片 ========== */
.download-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 1.5rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    box-shadow: var(--shadow-md);
}

.download-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-500), var(--purple-500));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.download-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-2xl);
}

.download-card:hover::before {
    opacity: 1;
}

/* 已发布卡片特殊样式 */
.download-card:not(.card-upcoming):hover {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.02) 0%, rgba(168, 85, 247, 0.02) 100%);
}

/* 开发中的卡片 */
.card-upcoming {
    opacity: 0.75;
    position: relative;
    overflow: hidden;
}

.card-upcoming::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: repeating-linear-gradient(45deg,
            transparent,
            transparent 10px,
            rgba(245, 158, 11, 0.02) 10px,
            rgba(245, 158, 11, 0.02) 20px);
    pointer-events: none;
}

.card-upcoming:hover {
    opacity: 0.9;
    border-color: var(--warning);
}

/* ========== 卡片头部 ========== */
.card-header {
    padding: 1.25rem 1.25rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(14, 165, 233, 0.03) 0%, transparent 100%);
    position: relative;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: inline-block;
    filter: drop-shadow(0 4px 8px rgba(14, 165, 233, 0.2));
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.download-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.download-card h2 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.card-subtitle {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* ========== 状态标签 ========== */
.status-badge {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.status-published {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.status-coming {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.download-card:hover .status-badge {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* ========== 横向卡片布局 ========== */
.card-content-horizontal {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem;
}

.card-icon-left {
    flex-shrink: 0;
}

.card-icon-left img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
}

.icon-placeholder {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    border-radius: 12px;
    filter: drop-shadow(0 4px 8px rgba(14, 165, 233, 0.2));
}

.card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-header-inline {
    margin-bottom: 0.25rem;
}

.card-header-inline h2 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.card-header-inline .card-subtitle {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin: 0;
    font-weight: 500;
}

.card-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0.25rem 0 0.75rem 0;
}

.download-btn-inline {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--purple-500) 100%);
    color: white;
    text-decoration: none;
    border-radius: 0.6rem;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
    align-self: flex-start;
    position: relative;
    overflow: hidden;
}

.download-btn-inline::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.download-btn-inline:hover::before {
    width: 300px;
    height: 300px;
}

.download-btn-inline:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.4);
}

/* ========== 卡片内容 ========== */
.card-body {
    padding: 1rem 1.25rem;
    flex-grow: 1;
}

.card-body p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: none;
}

.features-list {
    list-style: none;
    margin: 0;
}

.features-list li {
    padding: 0.4rem 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.features-list li:hover {
    color: var(--primary-600);
    transform: translateX(4px);
}

.features-list li::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2rem;
    height: 1.2rem;
    background: linear-gradient(135deg, var(--primary-500), var(--purple-500));
    color: white;
    font-weight: bold;
    border-radius: 50%;
    font-size: 0.65rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

/* ========== 卡片底部 ========== */
.card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background: var(--gray-50);
}

/* ========== 下载按钮 ========== */
.download-btn {
    display: inline-block;
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--purple-500) 100%);
    color: white;
    text-decoration: none;
    border-radius: 0.6rem;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
    position: relative;
    overflow: hidden;
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.download-btn:hover::before {
    width: 300px;
    height: 300px;
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.4);
}

.download-btn:active {
    transform: translateY(-1px);
}

/* 禁用按钮 */
.download-btn-disabled {
    background: linear-gradient(135deg, var(--gray-300) 0%, var(--gray-400) 100%);
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}

.download-btn-disabled:hover {
    transform: none;
    box-shadow: none;
}

.download-btn-disabled::before {
    display: none;
}

/* ========== 快速链接 ========== */
.quick-links {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 2.5rem;
    margin: 4rem 0;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.quick-links h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 800;
}

.quick-links-list {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.quick-link {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(168, 85, 247, 0.08) 100%);
    border: 2px solid var(--primary-200);
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    color: var(--primary-700);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.quick-link:hover {
    background: linear-gradient(135deg, var(--primary-500), var(--purple-500));
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ========== 页脚 ========== */
footer {
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0;
    margin-top: 5rem;
    color: var(--text-tertiary);
    text-align: center;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

/* ========== 动画 ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .products-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding-top: 6rem;
        padding-bottom: 2rem;
    }

    .nav-links {
        gap: 1.5rem;
        font-size: 0.9rem;
    }

    .downloads-grid {
        gap: 1.5rem;
    }

    .category-section {
        margin: 3rem 0;
    }

    .quick-links-list {
        flex-direction: column;
        align-items: center;
    }

    .quick-link {
        width: 100%;
        max-width: 240px;
    }

    .container {
        padding: 0 1.5rem;
    }

    .products-container {
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 2rem;
    }

    .category-title {
        font-size: 1.4rem;
    }

    .card-header {
        padding: 1.25rem 1.25rem 1rem;
    }

    .card-body {
        padding: 1rem 1.25rem;
    }

    .card-footer {
        padding: 1rem 1.25rem;
    }
}