/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS 变量 - 主题颜色 */
:root {
    /* 浅色主题 */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --accent-hover: #2563eb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-strong: rgba(0, 0, 0, 0.25);
}

/* 深色主题 */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #475569;
    --accent-primary: #60a5fa;
    --accent-secondary: #a78bfa;
    --accent-hover: #3b82f6;
    --success-color: #34d399;
    --warning-color: #fbbf24;
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-medium: rgba(0, 0, 0, 0.4);
    --shadow-strong: rgba(0, 0, 0, 0.6);
}

/* 基础样式 */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-primary);
}

.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
    transform: scale(1.05);
}

.theme-icon {
    font-size: 1.2rem;
}

/* 语言选择器 */
.language-selector {
    position: relative;
    display: inline-block;
}

.language-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.language-toggle:hover {
    background: var(--bg-tertiary);
    transform: scale(1.02);
}

.language-icon {
    font-size: 1rem;
}

.language-text {
    font-weight: 500;
}

.language-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.language-toggle.active .language-arrow {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 30px var(--shadow-medium);
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 0.9rem;
}

.language-option:hover {
    background: var(--bg-secondary);
}

.language-option:first-child {
    border-radius: 8px 8px 0 0;
}

.language-option:last-child {
    border-radius: 0 0 8px 8px;
}

.language-option.active {
    background: var(--accent-primary);
    color: white;
}

.lang-flag {
    font-size: 1rem;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Hero 区域 */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    margin-bottom: 1.5rem;
}

.title-main {
    display: block;
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.title-sub {
    display: block;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 4px 20px var(--shadow-medium);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--shadow-strong);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo {
    position: relative;
    padding: 3rem;
    background: var(--bg-secondary);
    border-radius: 50%;
    box-shadow: 0 20px 60px var(--shadow-medium);
    animation: float 3s ease-in-out infinite;
}

.hero-logo-img {
    width: 120px;
    height: 120px;
    border-radius: 20px;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* 功能特性 */
.features {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px var(--shadow-light);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px var(--shadow-medium);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* 软件截图 */
.screenshots {
    padding: 80px 0;
    background: var(--bg-primary);
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* 针对5个截图的特殊布局优化 */
@media (min-width: 1200px) {
    .screenshots-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .screenshots-grid .screenshot-item:nth-child(4),
    .screenshots-grid .screenshot-item:nth-child(5) {
        grid-column: span 1;
    }
    
    /* 让最后两个截图居中 */
    .screenshots-grid .screenshot-item:nth-child(4) {
        margin-left: auto;
        margin-right: 1rem;
    }
    
    .screenshots-grid .screenshot-item:nth-child(5) {
        margin-left: 1rem;
        margin-right: auto;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .screenshots-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.screenshot-placeholder {
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 3rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screenshot-placeholder:hover {
    border-color: var(--accent-primary);
    background: var(--bg-tertiary);
}

.placeholder-content {
    color: var(--text-secondary);
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.placeholder-content p {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.placeholder-content small {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* 实际截图样式 */
.screenshot-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px var(--shadow-medium);
    transition: all 0.3s ease;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
}

.screenshot-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 50px var(--shadow-strong);
}

.screenshot-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.screenshot-item:hover .screenshot-img {
    transform: scale(1.02);
}

.screenshot-caption {
    padding: 1.5rem;
    text-align: center;
}

.screenshot-caption h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.screenshot-caption p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* 下载区域 */
.download {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.download-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.download-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px var(--shadow-light);
    transition: all 0.3s ease;
}

.download-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px var(--shadow-medium);
}

.download-platform {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.platform-icon {
    font-size: 2.5rem;
}

.download-platform h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.platform-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.download-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.version-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.version {
    font-weight: 600;
    color: var(--accent-primary);
}

.size {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.btn-download {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
}

.download-note {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
}

.download-note p {
    margin-bottom: 0.5rem;
}

.link {
    color: var(--accent-primary);
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

/* 更新日志区域 */
.changelog {
    padding: 80px 0;
    background: var(--bg-primary);
}

.changelog-container {
    max-width: 800px;
    margin: 0 auto;
}

.changelog-loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.loading-spinner-large {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.changelog-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.changelog-item {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px var(--shadow-light);
    transition: all 0.3s ease;
}

.changelog-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--shadow-medium);
}

.changelog-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.changelog-title::before {
    content: "📝";
    font-size: 1.25rem;
}

.changelog-content {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
}

.changelog-error {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.changelog-error .error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.changelog-error h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.loading-spinner {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* 下载错误状态 */
.download-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-top: 2rem;
}

.download-error .error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.download-error p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.btn-download.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* 页脚 */
.footer {
    background: var(--bg-tertiary);
    padding: 3rem 0 1rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.footer-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.footer-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.footer-section h4 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .language-selector {
        margin-top: 1rem;
        width: 100%;
    }
    
    .language-toggle {
        width: 100%;
        justify-content: space-between;
    }
    
    .language-dropdown {
        left: 0;
        right: 0;
        width: 100%;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .title-main {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .download-cards {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .feature-card,
    .download-card {
        padding: 1.5rem;
    }
}