/* ===== 吉卜力风格设计系统 ===== */
:root {
    /* 吉卜力经典配色 */
    --sky-blue: #87CEEB;
    --sky-light: #B8E0F0;
    --grass-green: #7CB342;
    --grass-dark: #558B2F;
    --earth-brown: #8D6E63;
    --sunset-orange: #FF8A65;
    --warm-yellow: #FFD54F;
    --cream: #FFF8E1;
    --soft-white: #FFFEF7;
    --deep-green: #2E7D32;
    --text-dark: #3E2723;
    --text-muted: #795548;
    
    /* 功能色 */
    --primary: #5D9CEC;
    --primary-dark: #4A89DC;
    --success: #7CB342;
    --warning: #FFB74D;
    
    /* 阴影 */
    --shadow-soft: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-card: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-hover: 0 12px 40px rgba(0,0,0,0.15);
    
    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

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

html {
    scroll-behavior: smooth;
}

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

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

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 254, 247, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
    padding: 16px 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'ZCOOL KuaiLe', 'Noto Sans SC', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--deep-green);
}

.logo-icon {
    font-size: 28px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

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

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

/* ===== Hero 区域 ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 80px;
    background: linear-gradient(180deg, var(--sky-light) 0%, var(--sky-blue) 50%, #E8F5E9 100%);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* 云朵动画 */
.cloud {
    position: absolute;
    background: white;
    border-radius: 50px;
    opacity: 0.9;
    animation: float 20s infinite ease-in-out;
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 50%;
}

.cloud-1 {
    width: 120px;
    height: 40px;
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.cloud-1::before {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 15px;
}

.cloud-1::after {
    width: 35px;
    height: 35px;
    top: -15px;
    right: 15px;
}

.cloud-2 {
    width: 100px;
    height: 35px;
    top: 25%;
    right: 15%;
    animation-delay: -5s;
    animation-duration: 25s;
}

.cloud-2::before {
    width: 40px;
    height: 40px;
    top: -20px;
    left: 12px;
}

.cloud-2::after {
    width: 30px;
    height: 30px;
    top: -12px;
    right: 12px;
}

.cloud-3 {
    width: 80px;
    height: 30px;
    top: 10%;
    left: 50%;
    animation-delay: -10s;
    animation-duration: 22s;
}

.cloud-3::before {
    width: 35px;
    height: 35px;
    top: -18px;
    left: 10px;
}

.cloud-3::after {
    width: 25px;
    height: 25px;
    top: -10px;
    right: 10px;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-20px) translateX(10px); }
    50% { transform: translateY(0) translateX(20px); }
    75% { transform: translateY(20px) translateX(10px); }
}

/* 草地 */
.grass {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(180deg, transparent 0%, var(--grass-green) 30%, var(--grass-dark) 100%);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    transform: scaleX(1.2);
}

.grass::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 10%;
    width: 40px;
    height: 40px;
    background: var(--grass-green);
    border-radius: 50%;
}

.grass::after {
    content: '';
    position: absolute;
    top: -15px;
    right: 15%;
    width: 30px;
    height: 30px;
    background: var(--grass-green);
    border-radius: 50%;
}

/* Hero 内容 */
.hero-content {
    text-align: center;
    position: relative;
    z-index: 10;
    padding: 40px 20px;
}

.hero-title {
    font-family: 'ZCOOL KuaiLe', 'Noto Sans SC', sans-serif;
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 24px;
}

.title-line {
    display: block;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.title-highlight {
    display: block;
    background: linear-gradient(135deg, var(--deep-green), var(--grass-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.2em;
}

.hero-subtitle {
    font-size: clamp(16px, 2.5vw, 20px);
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

/* 龙猫装饰 */
.totoro {
    position: absolute;
    bottom: 100px;
    right: 10%;
    width: 80px;
    height: 80px;
    background: #757575;
    border-radius: 50% 50% 45% 45%;
    opacity: 0.1;
    animation: bounce 3s infinite ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(93, 156, 236, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(93, 156, 236, 0.5);
}

.btn-hero {
    padding: 18px 48px;
    font-size: 18px;
    border-radius: var(--radius-xl);
}

.btn-generate {
    width: 100%;
    max-width: 400px;
    padding: 18px;
    font-size: 18px;
    background: linear-gradient(135deg, var(--success), var(--grass-dark));
    color: white;
    box-shadow: 0 4px 20px rgba(124, 179, 66, 0.4);
    margin: 24px auto 0;
    display: flex;
}

.btn-generate:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(124, 179, 66, 0.5);
}

.btn-generate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-download {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 14px 32px;
}

.btn-secondary {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid var(--text-muted);
    padding: 12px 30px;
}

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

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== 广告位 ===== */
.ad-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px;
    text-align: center;
}

.ad-banner {
    min-height: 90px;
    background: var(--cream);
    border-top: 1px solid #E0E0E0;
    border-bottom: 1px solid #E0E0E0;
}

.ad-rect {
    min-height: 250px;
    max-width: 336px;
    margin: 40px auto;
    background: var(--cream);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== 生成器区域 ===== */
.generator-section {
    padding: 100px 0;
    background: linear-gradient(180deg, #E8F5E9 0%, var(--soft-white) 100%);
}

.section-title {
    font-family: 'ZCOOL KuaiLe', 'Noto Sans SC', sans-serif;
    font-size: 36px;
    text-align: center;
    margin-bottom: 48px;
    color: var(--text-dark);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--success));
    margin: 16px auto 0;
    border-radius: 2px;
}

.generator-card {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    padding: 48px;
    text-align: center;
}

/* 上传区域 */
.upload-area {
    border: 3px dashed #C8E6C9;
    border-radius: var(--radius-lg);
    padding: 40px;
    background: #FAFAFA;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--success);
    background: #F1F8E9;
}

.upload-placeholder {
    pointer-events: none;
}

.upload-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.upload-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 14px;
    color: var(--text-muted);
}

.preview-container {
    position: relative;
    width: 100%;
}

#previewImage {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

.btn-change {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-change:hover {
    background: rgba(0,0,0,0.8);
}

/* 风格选择 */
.style-section {
    margin: 32px 0;
}

.style-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.style-options {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.style-btn {
    flex: 1;
    min-width: 140px;
    padding: 16px;
    border: 2px solid #E0E0E0;
    border-radius: var(--radius-md);
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.style-btn.active {
    border-color: var(--success);
    background: #F1F8E9;
}

.style-name {
    font-weight: 600;
    color: var(--text-dark);
}

.style-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* 结果区域 */
.result-area {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 2px dashed #E0E0E0;
}

.result-title {
    font-size: 24px;
    margin-bottom: 24px;
    color: var(--text-dark);
}

.result-image-container {
    margin-bottom: 24px;
}

#resultImage {
    max-width: 100%;
    max-height: 400px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.result-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== 特色区域 ===== */
.features-section {
    padding: 100px 0;
    background: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.feature-card {
    text-align: center;
    padding: 40px 24px;
    border-radius: var(--radius-lg);
    background: var(--cream);
    transition: all 0.3s;
}

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

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-dark);
}

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

/* ===== 支持区域 ===== */
.support-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #E3F2FD, #F3E5F5);
}

.support-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-radius: var(--radius-xl);
    padding: 48px;
    box-shadow: var(--shadow-card);
    max-width: 800px;
    margin: 0 auto;
}

.support-content h2 {
    font-family: 'ZCOOL KuaiLe', sans-serif;
    font-size: 28px;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.support-content p {
    color: var(--text-muted);
}

.kofi-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #FF5E5B;
    color: white;
    padding: 16px 32px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 94, 91, 0.4);
}

.kofi-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 94, 91, 0.5);
}

.kofi-btn img {
    width: 24px;
    height: 24px;
}

/* ===== FAQ 区域 ===== */
.faq-section {
    padding: 100px 0;
    background: var(--soft-white);
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.faq-question {
    width: 100%;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.faq-toggle {
    font-size: 24px;
    color: var(--primary);
    transition: transform 0.3s;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer p {
    padding: 0 24px 24px;
    color: var(--text-muted);
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

/* ===== 页脚 ===== */
.footer {
    background: #37474F;
    color: white;
    padding: 48px 0 24px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.footer .logo-text {
    color: white;
}

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

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links 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.5);
    font-size: 14px;
}

/* ===== 回到顶部 ===== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    box-shadow: var(--shadow-card);
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .nav-links {
        gap: 16px;
        font-size: 14px;
    }
    
    .hero {
        min-height: 80vh;
    }
    
    .generator-card {
        padding: 24px;
        margin: 0 16px;
    }
    
    .style-options {
        flex-direction: column;
    }
    
    .style-btn {
        min-width: 100%;
    }
    
    .support-card {
        flex-direction: column;
        gap: 24px;
        text-align: center;
        padding: 32px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 16px;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .btn-download,
    .btn-secondary {
        width: 100%;
    }
    
    .totoro {
        display: none;
    }
}
