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

:root {
    --primary: #0d59f2;
    --primary-light: #dbeafe;
    --primary-dark: #1e3a8a;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --bg-light: #f5f6f8;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow: 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);
}

/* 暗色主题 */
[data-theme="dark"] {
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --bg-light: #0f172a;
    --bg-white: #1e293b;
    --border-color: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
        'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-light);
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Hero 区域 */
.hero {
    background: var(--primary);
    color: white;
    padding: 60px 0 40px;
    text-align: center;
    position: relative;
}

/* 主题切换按钮 */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(180deg);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    color: white;
}

.hero-subtitle {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.hero-description {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

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

.btn-large {
    padding: 18px 48px;
    font-size: 18px;
}

/* 演示区域 */
.demo-section {
    padding: 60px 0 80px;
    background: var(--bg-light);
}

.demo-hint {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.demo-hint::before {
    content: '👆';
    font-size: 18px;
}

.demo-content {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.phone-mock-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    gap: 24px;
}

/* 移动端图片轮播 */
.mobile-screenshots {
    display: none;
    max-width: 100%;
    position: relative;
}

.screenshot-carousel {
    position: relative;
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    cursor: grab;
    user-select: none;
}

.screenshot-carousel:active {
    cursor: grabbing;
}

.screenshot-image {
    width: 100%;
    display: block;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--primary);
    width: 24px;
    border-radius: 4px;
}

/* 屏幕指示器 */
.screen-indicators {
    display: flex;
    gap: 12px;
    align-items: center;
}

.screen-indicator {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    background: var(--bg-white);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    cursor: pointer;
}

.screen-indicator:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.screen-indicator.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 功能提示 */
.feature-hints {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 700px;
}

.hint-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-white);
    padding: 6px 12px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.hint-icon {
    font-size: 18px;
    color: var(--primary);
}

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

.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--text-primary);
}

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

.feature-card {
    background: var(--bg-white);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-align: left;
    transition: all 0.2s ease;
    display: flex;
    gap: 16px;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
}

.feature-icon-large {
    font-size: 36px;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: 12px;
}

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

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 14px;
}

.feature-info {
    flex: 1;
}

/* 输出格式区域 */
.output-format-section {
    padding: 60px 0;
    background: var(--bg-light);
}

.section-subtitle {
    text-align: center;
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    margin-top: -20px;
}

.format-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.format-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 24px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.format-card.highlight {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(13, 89, 242, 0.1);
}

.format-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.format-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.format-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.format-code {
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    overflow-x: auto;
}

[data-theme="dark"] .format-code {
    background: #0f172a;
}

.format-code code {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-primary);
    word-break: break-all;
}

.format-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.format-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.format-note {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border-color);
}

.format-note p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* CTA 区域 */
.cta-section {
    padding: 60px 0;
    background: var(--bg-white);
    text-align: center;
}

.cta-section h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.cta-section p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Footer */
.footer {
    background: #1e293b;
    color: white;
    padding: 48px 0 24px;
}

[data-theme="dark"] .footer {
    background: #0f172a;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 32px;
}

.footer-left h3 {
    font-size: 24px;
    margin-bottom: 8px;
    color: white;
}

.footer-left p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links {
    display: flex;
    gap: 48px;
}

.footer-column h4 {
    font-size: 16px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.9);
}

.footer-column a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom a {
    color: white;
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

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

    .theme-toggle {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-description {
        font-size: 14px;
    }

    .section-title {
        font-size: 24px;
        margin-bottom: 24px;
    }

    .demo-section {
        padding: 40px 0;
    }

    .features-section {
        padding: 40px 0;
    }

    .output-format-section {
        padding: 40px 0;
    }

    .format-cards {
        grid-template-columns: 1fr;
    }

    .cta-section {
        padding: 40px 0;
    }

    .cta-section h2 {
        font-size: 24px;
    }

    .demo-content {
        flex-direction: column;
    }

    /* 移动端隐藏手机模拟器，显示截图轮播 */
    .phone-mock-wrapper .phone-mock {
        display: none;
    }

    .phone-mock-wrapper .screen-indicators {
        display: none;
    }

    .phone-mock-wrapper .feature-hints {
        display: none;
    }

    .mobile-screenshots {
        display: block;
    }

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

    .feature-card {
        flex-direction: column;
        text-align: left;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-links {
        flex-direction: column;
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .screen-indicators {
        gap: 6px;
    }

    .screen-indicator {
        padding: 5px 10px;
        font-size: 11px;
    }

    .screen-indicator .iconify {
        display: none;
    }
}
