/* ==================== CSS 变量 ==================== */
:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --accent: #f093fb;
    --success: #48bb78;
    --warning: #ed8936;
    --error: #fc8181;
    
    --bg-primary: #f7fafc;
    --bg-secondary: #ffffff;
    --bg-dark: #1a202c;
    
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-light: #a0aec0;
    
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ==================== 导航栏 ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
}

.logo-icon {
    width: 28px;
    height: 28px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary);
}

/* ==================== 按钮 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

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

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    width: 100%;
}

/* ==================== 英雄区域 ==================== */
.hero {
    min-height: 100vh;
    padding: 120px 2rem 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 50px;
    color: var(--primary);
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.browser-mockup {
    width: 100%;
    max-width: 500px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.browser-header {
    background: var(--bg-dark);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.browser-dots {
    display: flex;
    gap: 0.5rem;
}

.browser-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #4a5568;
}

.browser-dots span:nth-child(1) { background: #fc8181; }
.browser-dots span:nth-child(2) { background: #f6e05e; }
.browser-dots span:nth-child(3) { background: #68d391; }

.browser-url {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    color: #a0aec0;
    font-size: 0.8rem;
}

.browser-content {
    padding: 1.5rem;
}

.mockup-hero {
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.mockup-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mockup-line {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
}

.mockup-line.long { width: 100%; }
.mockup-line.medium { width: 70%; }

.mockup-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.mockup-card {
    height: 50px;
    background: var(--border-color);
    border-radius: var(--radius-sm);
}

/* ==================== 功能区域 ==================== */
.features {
    padding: 80px 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

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

.feature-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ==================== 上传表单 ==================== */
.upload-section {
    padding: 80px 2rem;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.upload-container {
    max-width: 700px;
    margin: 0 auto;
}

.upload-form {
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.form-group input[type="text"] {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

/* 风格选择 */
.style-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.style-option {
    cursor: pointer;
}

.style-option input {
    display: none;
}

.style-card {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: var(--transition);
    text-align: center;
}

.style-option input:checked + .style-card {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
}

.style-preview {
    height: 60px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.style-info strong {
    display: block;
    margin-bottom: 0.25rem;
}

.style-info span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* 文件上传 */
.file-upload {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    overflow: hidden;
}

.file-upload:hover,
.file-upload.dragover {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.02);
}

.file-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-upload-content {
    padding: 3rem 2rem;
    text-align: center;
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: var(--primary);
    margin-bottom: 1rem;
}

.upload-text {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.upload-hint {
    font-size: 0.875rem;
    color: var(--text-light);
}

.file-info {
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-primary);
}

.file-icon {
    width: 40px;
    height: 40px;
    color: var(--primary);
}

.file-details {
    flex: 1;
}

.file-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
}

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

.remove-file {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-light);
    transition: var(--transition);
}

.remove-file:hover {
    color: var(--error);
}

.remove-file svg {
    width: 20px;
    height: 20px;
}

/* ==================== 如何使用 ==================== */
.how-it-works {
    padding: 80px 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.step-arrow {
    color: var(--border-color);
}

.step-arrow svg {
    width: 32px;
    height: 32px;
}

/* ==================== Modal ==================== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 100%;
    text-align: center;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--success) 0%, #38a169 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.success-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.modal-content h2 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.result-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.result-links .btn {
    flex: 1;
}

.result-info p {
    margin-bottom: 0.5rem;
}

.result-hint {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* ==================== Loading ==================== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== 页脚 ==================== */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 3rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-info p {
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-light);
    transition: var(--transition);
}

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

/* ==================== 响应式 ==================== */
@media (max-width: 968px) {
    .hero {
        flex-direction: column;
        padding-top: 100px;
    }

    .hero-content {
        text-align: center;
    }

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

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        width: 100%;
    }

    .steps {
        flex-direction: column;
    }

    .step-arrow {
        transform: rotate(90deg);
    }

    .style-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .nav-links {
        display: none;
    }

    .upload-form {
        padding: 2rem 1.5rem;
    }

    .result-links {
        flex-direction: column;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
}
