/* CSS变量定义 - 支持主题切换 */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #f59e0b;
    --accent-color: #10b981;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-card: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --gradient-primary: linear-gradient(135deg, #2563eb, #1d4ed8);
    --gradient-secondary: linear-gradient(135deg, #f59e0b, #d97706);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* 暗色主题 */
[data-theme="dark"] {
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-card: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --border-color: #374151;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

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

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

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

/* 主题切换按钮 */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-hover);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
}

.moon-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: none;
}

[data-theme="dark"] .moon-icon {
    display: block;
}

/* 头部样式 */
.header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    box-shadow: var(--shadow);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    color: var(--primary-color);
    object-fit: contain;
}

.logo h1 {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
}

.version {
    background: var(--gradient-primary);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

/* 主要内容区域 */
.main {
    padding: 60px 0;
}

/* 英雄区域 */
.hero {
    padding: 80px 0;
    background: var(--bg-secondary);
}

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

.hero-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
}

.download-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--gradient-primary);
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    border: none;
    cursor: pointer;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.download-btn svg {
    width: 24px;
    height: 24px;
}

.download-info {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

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

.app-mockup {
    width: 100%;
    max-width: 400px;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.2));
}

.hero-main-image {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.hero-main-image:hover {
    transform: scale(1.05);
}

.phone-frame {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 20px;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow);
}

.phone-screen {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
}

.app-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    margin: 0 auto 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.app-content {
    margin-top: 20px;
}

.content-line {
    height: 12px;
    background: var(--text-secondary);
    border-radius: 6px;
    margin: 10px 0;
    opacity: 0.3;
}

.content-line.short {
    width: 60%;
    margin-left: auto;
    margin-right: auto;
}

.content-line.medium {
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

/* 功能特性区域 */
.features {
    padding: 80px 0;
    background: var(--bg-primary);
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 60px;
    color: var(--text-primary);
}

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

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

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    color: var(--primary-color);
}

.feature-card h4 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--text-primary);
}

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

/* 页脚样式 */
.footer {
    background: var(--bg-secondary);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-color);
}

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

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

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

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

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

.footer-section a:hover {
    color: var(--primary-color);
}

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

.footer-bottom p {
    margin-bottom: 10px;
}

.icp-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.icp-info a:hover {
    text-decoration: underline;
}

.police-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.police-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.police-info a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
}

.police-info a:hover {
    color: var(--primary-color);
}

.company-info {
    margin: 15px 0;
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.company-info p {
    margin: 5px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-description {
        font-size: 16px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .download-info {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }
    
    .download-btn {
        padding: 12px 30px;
        font-size: 16px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .feature-card {
        padding: 20px;
    }
}

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

.feature-card {
    animation: fadeInUp 0.6s ease forwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }

/* 安全提示样式 */
.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-card);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    border: 1px solid var(--primary-color);
    margin-top: 10px;
}

.security-badge svg {
    width: 14px;
    height: 14px;
}

/* 性能优化样式 */
* {
    will-change: auto;
}

img {
    content-visibility: auto;
}

/* 动画性能优化 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
        will-change: opacity, transform;
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* DDoS防护样式 */
body.blocked {
    overflow: hidden;
    pointer-events: none;
}

.security-shield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 999999;
    display: none;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 18px;
    text-align: center;
}

.security-shield.active {
    display: flex;
}

/* 资源加载优化 */
.hero-main-image {
    loading: lazy;
    decoding: async;
}

/* 减少重排重绘 */
.download-btn,
.theme-toggle,
.feature-card {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* 网络请求优化 */
@media (prefers-reduced-data: reduce) {
    .hero-main-image {
        display: none;
    }
    
    .feature-icon {
        filter: grayscale(100%);
    }
}