/* 历史版本页面样式 */
.history-hero {
    padding: 6rem 0 4rem;
    text-align: center;
}

.history-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.history-hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* 版本列表 */
.versions-section {
    padding: 4rem 0;
}

.versions-list {
    max-width: 1000px;
    margin: 3rem auto 0;
}

.version-item {
    margin-bottom: 2rem;
    position: relative;
}

.version-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 2.5rem;
    top: 5rem;
    bottom: -2rem;
    width: 2px;
    background: linear-gradient(to bottom,
            rgba(99, 102, 241, 0.2),
            rgba(99, 102, 241, 0.05));
}

.version-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.version-header:hover {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.2);
}

.version-item.active .version-header {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
}

.version-bullet {
    width: 1.5rem;
    height: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.version-bullet.latest {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.1);
}

.version-info {
    flex: 1;
}

.version-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.version-title h3 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--text-primary);
}

.version-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: white;
}

.version-date {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.version-toggle {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    border: none;
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.version-toggle:hover {
    background: rgba(99, 102, 241, 0.2);
}

.version-toggle i {
    transition: transform 0.3s ease;
}

.version-item.active .version-toggle i {
    transform: rotate(180deg);
}

/* 版本内容 - 修复关键：默认隐藏 */
.version-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0;
    margin: 0;
    transition: all 0.3s ease;
    visibility: hidden;
    pointer-events: none;
}

.version-item.active .version-content {
    max-height: 5000px;
    opacity: 1;
    padding: 0 2rem 2rem;
    margin-top: 1rem;
    visibility: visible;
    pointer-events: auto;
}

/* 加载占位符 */
.loading-placeholder {
    padding: 3rem;
    text-align: center;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-content i {
    font-size: 2rem;
    color: var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.loading-content span {
    color: var(--text-secondary);
}

/* 更新日志 */
.changelog-section {
    margin-bottom: 2rem;
}

.changelog-section h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.changelog-section h4 i {
    color: var(--primary);
}

.changelog-list {
    list-style: none;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.changelog-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.changelog-list li:last-child {
    border-bottom: none;
}

.changelog-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* 下载链接 */
.downloads-section h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.downloads-section h4 i {
    color: var(--primary);
}

.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.download-platform {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition-fast);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.download-platform:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.1);
}

.platform-icon-small {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.platform-info-small h5 {
    font-size: 0.875rem;
    margin: 0;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.platform-info-small p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
}

.download-link {
    margin-left: auto;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(99, 102, 241, 0.1);
    transition: var(--transition-fast);
}

.download-link:hover {
    color: white;
    background: rgba(99, 102, 241, 0.8);
}

/* 加载更多 */
.load-more-container {
    text-align: center;
    margin-top: 3rem;
}

.load-more-btn {
    min-width: 200px;
    padding: 1rem 2rem;
    font-size: 1rem;
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    opacity: 0.5;
}

.aspect-ratio-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    cursor: zoom-in;
    transition: transform 0.3s ease;
    transform-origin: center center;
    /* 缩放中心点 */
}

/* 响应式设计 */
@media (max-width: 768px) {
    .history-hero {
        padding: 4rem 0 2rem;
    }

    .history-hero h1 {
        font-size: 2.5rem;
    }

    .version-header {
        flex-wrap: wrap;
        padding: 1rem;
    }

    .version-item.active .version-content {
        padding: 0 1rem 1rem;
    }

    .downloads-grid {
        grid-template-columns: 1fr;
    }

    .changelog-list {
        padding: 1rem;
    }

    .changelog-list li {
        padding-left: 1rem;
        font-size: 0.9rem;
    }
}

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

    .history-hero p {
        font-size: 1rem;
    }

    .version-title {
        flex-wrap: wrap;
    }

    .download-platform {
        flex-wrap: wrap;
    }

    .download-link {
        margin-left: 0;
        margin-top: 0.5rem;
        width: 100%;
        justify-content: center;
    }
}