/* CSS变量定义 */
:root {
    /* 明亮主题 */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-muted: #86868b;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --card-bg: #ffffff;
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --footer-bg: #1d1d1f;
    --footer-text: #86868b;
}

[data-theme="dark"] {
    /* 暗黑主题 */
    --bg-primary: #000000;
    --bg-secondary: #1c1c1e;
    --bg-tertiary: #2c2c2e;
    --text-primary: #ffffff;
    --text-secondary: #ebebf5;
    --text-muted: #8e8e93;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --card-bg: #1c1c1e;
    --navbar-bg: rgba(0, 0, 0, 0.95);
    --footer-bg: #000000;
    --footer-text: #8e8e93;
}

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    -webkit-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 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #007AFF;
}

.nav-logo i {
    margin-right: 8px;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: #007AFF;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #007AFF;
    transition: width 0.3s ease;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

/* 语言切换按钮 */
.language-toggle {
    margin-right: 15px;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--border-color);
}

.lang-btn:hover {
    background: var(--bg-secondary);
    transform: scale(1.05);
}

.lang-text {
    font-weight: 500;
}

/* 主题切换按钮 */
.theme-toggle {
    margin-right: 20px;
}

.theme-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn:hover {
    background: var(--bg-secondary);
    transform: scale(1.1);
}

.theme-btn .fa-sun {
    display: none;
}

[data-theme="dark"] .theme-btn .fa-moon {
    display: none;
}

[data-theme="dark"] .theme-btn .fa-sun {
    display: block;
}

/* 主页横幅 */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-subtitle {
    display: block;
    font-size: 1.5rem;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 10px;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: #007AFF;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 122, 255, 0.3);
}

.btn-primary:hover {
    background: #0056CC;
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 122, 255, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

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

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-preview {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.3s ease;
}

.app-preview:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.app-screenshot {
    width: 100%;
    max-width: 400px;
    height: auto;
    display: block;
}

/* 功能特性 */
.features {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.section-header p {
    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: 40px;
}

.feature-card {
    background: var(--card-bg);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    color: white;
    font-size: 2rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 软件截图 */
.screenshots {
    padding: 100px 0;
    background: var(--bg-primary);
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.screenshot-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 40px var(--shadow-color);
    transition: all 0.3s ease;
}

.screenshot-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
}

.screenshot-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.screenshot-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 30px 20px 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.screenshot-item:hover .screenshot-overlay {
    transform: translateY(0);
}

.screenshot-overlay h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.screenshot-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 软件证书 */
.certificate {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.certificate-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.certificate-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.certificate-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

.certificate-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cert-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cert-label {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 100px;
}

.cert-value {
    color: #007AFF;
    font-weight: 500;
}

.certificate-image {
    display: flex;
    justify-content: center;
}

.cert-img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

/* 下载区域 */
.download {
    padding: 100px 0;
    background: var(--bg-primary);
}

.download-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.version-info h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.version-info p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.version-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.version-features li {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-primary);
}

.version-features i {
    color: #34C759;
    font-size: 1.1rem;
}

.download-actions {
    display: flex;
    justify-content: center;
}

.download-card {
    background: linear-gradient(135deg, #007AFF, #5856D6);
    color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 122, 255, 0.3);
    min-width: 300px;
}

.download-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.download-card h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.download-card p {
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn-download {
    background: white;
    color: #007AFF;
    width: 100%;
    justify-content: center;
    margin-bottom: 15px;
}

.btn-download:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

.file-size {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 页脚 */
.footer {
    background: var(--footer-bg);
    color: var(--text-primary);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #007AFF;
    margin-bottom: 20px;
}

.footer-logo i {
    margin-right: 8px;
    font-size: 1.8rem;
}

.footer-section p {
    color: var(--footer-text);
    line-height: 1.6;
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--footer-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #007AFF;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    text-align: center;
    color: var(--footer-text);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--navbar-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 10px 30px var(--shadow-color);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        margin: 10px 0;
    }
    
    .nav-menu a {
        padding: 10px 20px;
        display: block;
        width: 100%;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .screenshots-grid {
        grid-template-columns: 1fr;
    }
    
    .certificate-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .download-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .feature-card {
        padding: 30px 20px;
    }
    
    .download-card {
        padding: 30px 20px;
        min-width: 250px;
    }
}

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

.feature-card,
.screenshot-item,
.certificate-content,
.download-content {
    animation: fadeInUp 0.6s ease forwards;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: #007AFF;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056CC;
}

/* 响应式主题切换按钮 */
@media (max-width: 768px) {
    .theme-toggle {
        margin-right: 10px;
    }
    
    .theme-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .language-toggle {
        margin-right: 10px;
    }
    
    .lang-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    /* 移动端导航栏样式 */
    .nav-container {
        position: relative;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--navbar-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 10px 30px var(--shadow-color);
        z-index: 999;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        margin: 10px 0;
    }
    
    .nav-menu a {
        padding: 10px 20px;
        display: block;
        width: 100%;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
}

