/* 全局样式 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

:root {
    --primary-color: #2D4A59;
    --secondary-color: #8A5A44;
    --accent-color: #D9B775;
    --light-color: #F2E9E4;
    --dark-color: #1A2A33;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background-color: #f8f8f8;
    color: #333;
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Serif SC', serif;
    color: #333;
}

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

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

/* 导航栏样式 */
.nav {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
}

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

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

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

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

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

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

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px;
    transition: all 0.3s ease;
}

/* 页脚样式 */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 50px 0;
    margin-top: 50px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-container > div:first-child {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    justify-self: center;
}

.footer-logo {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center !important;
}

.footer-container > div:first-child {
    text-align: center !important;
}

.footer-container > div:first-child p {
    text-align: center !important;
    color: #ccc !important;
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    color: white;
    font-size: 20px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-color);
}

.newsletter input {
    padding: 10px;
    border: none;
    border-radius: 5px 0 0 5px;
    width: 70%;
}

.newsletter button {
    padding: 10px;
    background-color: var(--accent-color);
    color: var(--dark-color);
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.newsletter button:hover {
    background-color: #c5a05f;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #ccc;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--dark-color);
    box-shadow: 0 6px 16px rgba(45, 74, 89, 0.3);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #6d4535;
    box-shadow: 0 6px 16px rgba(138, 90, 68, 0.3);
}

.btn-accent {
    background-color: var(--accent-color);
    color: var(--dark-color);
}

.btn-accent:hover {
    background-color: #c5a05f;
    box-shadow: 0 6px 16px rgba(217, 183, 117, 0.4);
}

.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../image/IMG_20260313_182922.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.hero-content h1 {
    font-size: 50px;
    margin-bottom: 20px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    align-self: center;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    max-width: 800px;
    align-self: center;
    transform: translateX(10px);
}

.hero-content h1 {
    font-size: 50px;
    margin-bottom: 20px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    max-width: 800px;
}

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

/* 部分标题样式 */
.section-title {
    text-align: center;
    margin: 50px 0;
    position: relative;
}

.section-title h2 {
    font-size: 36px;
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 0;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
}

.section-title > p {
    text-align: center !important;
    margin-top: 15px;
    margin-bottom: 0;
    color: #666 !important;
    font-size: 16px;
    padding: 0 20px;
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 20px;
    margin-bottom: 10px;
}

.card-text {
    color: #666;
    margin-bottom: 15px;
}

/* 三列网格布局 */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* 两列网格布局 */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

/* 四列网格布局 */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* 工艺流程卡片样式 */
.process-card {
    text-align: center;
    padding: 30px;
}

.process-icon {
    width: 80px;
    height: 80px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 30px;
}

.process-card:nth-child(2) .process-icon {
    background-color: var(--secondary-color);
}

.process-card:nth-child(3) .process-icon {
    background-color: var(--accent-color);
    color: var(--dark-color);
}

/* 历史时间线样式 */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 50px auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -12px;
    background-color: white;
    border: 4px solid var(--accent-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-left {
    left: 0;
}

.timeline-right {
    left: 50%;
}

.timeline-left::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    right: 30px;
    border: medium solid white;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent white;
}

.timeline-right::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    left: 30px;
    border: medium solid white;
    border-width: 10px 10px 10px 0;
    border-color: transparent white transparent transparent;
}

.timeline-right::after {
    left: -13px;
}

.timeline-content {
    padding: 30px 40px;
    background-color: white;
    position: relative;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.timeline-content h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.timeline-content p {
    color: #666;
    font-size: 15px;
    line-height: 1.8;
}

/* 产品卡片样式 */
.product-card {
    margin-bottom: 30px;
}

.product-img {
    height: 250px;
}

.product-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.product-price {
    font-weight: bold;
    color: var(--secondary-color);
    font-size: 18px;
}

/* AI生成器样式 */
.ai-generator {
    background-color: #f0f4f8;
    border-radius: 15px;
    padding: 40px;
    margin: 50px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* 步骤指示器 */
.steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ddd;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(217, 183, 117, 0.3);
}

.step.completed .step-number {
    background-color: var(--primary-color);
}

.step-label {
    font-size: 12px;
    color: #999;
    font-weight: 500;
    transition: color 0.3s ease;
}

.step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.step-line {
    flex: 1;
    height: 2px;
    background-color: #ddd;
    margin: 0 15px;
    min-width: 50px;
}

/* 步骤徽章 */
.step-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    margin-right: 15px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(217, 183, 117, 0.4);
}

/* 模板选项样式 */
.template-option {
    position: relative;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    overflow: hidden;
    cursor: pointer;
    border-radius: 16px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.template-option:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
}

.template-option.active {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(217, 183, 117, 0.2), 0 12px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.template-option:active {
    transform: translateY(-2px) scale(0.99);
}

.template-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(217, 183, 117, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.template-option.active .template-overlay {
    opacity: 1;
}

.template-overlay i {
    color: white;
    font-size: 32px;
}

/* 模式覆盖层 */
.pattern-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(217, 183, 117, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pattern-option.active .pattern-overlay {
    opacity: 1;
}

.pattern-overlay i {
    color: white;
    font-size: 24px;
}

.generator-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

.color-options,
.pattern-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.color-option,
.pattern-option {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    position: relative;
}

.color-option:hover,
.pattern-option:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.color-option.active,
.pattern-option.active {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(217, 183, 117, 0.3);
}

.color-option.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.pattern-option {
    border-radius: 10px;
    overflow: hidden;
    width: 80px;
    height: 80px;
    border: 3px solid transparent;
}

.pattern-option:hover {
    transform: scale(1.1);
}

.pattern-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-preview {
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.result-img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 图片预览区域样式 */
#image-preview {
    transition: all 0.3s ease;
    background-color: #fafafa;
    background-image: linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
                      linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
                      linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

#image-preview:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(45, 74, 89, 0.15);
}

#image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

/* 加载动画样式 */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 响应式设计 */
@media screen and (max-width: 992px) {
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .generator-form {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0;
        height: 92vh;
        top: 8vh;
        background-color: white;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links li {
        opacity: 0;
        margin: 20px 0;
    }
    
    .burger {
        display: block;
    }
    
    .nav-active {
        transform: translateX(0%);
    }
    
    @keyframes navLinkFade {
        from {
            opacity: 0;
            transform: translateX(50px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
    
    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .toggle .line2 {
        opacity: 0;
    }
    
    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    .hero-content h1 {
        font-size: 40px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item::before {
        left: 60px;
        border: medium solid white;
        border-width: 10px 10px 10px 0;
        border-color: transparent white transparent transparent;
    }
    
    .timeline-left::after, .timeline-right::after {
        left: 18px;
    }
    
    .timeline-right {
        left: 0%;
    }
}

@media screen and (max-width: 576px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
    }
    
    .hero-content h1 {
        font-size: 30px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
}

/* 确保文字可见的样式 */
.timeline-content h4, 
.timeline-content p,
.process-card h4, 
.process-card p,
.card-title,
.card-text,
.section-title h2,
.section-title p,
.ai-generator h3,
.ai-generator h4,
.ai-generator p,
.result-preview h4,
.result-preview p {
    color: #333 !important;
    text-shadow: none !important;
}

/* 滚动动画 */
.fade-in {
    opacity: 1;
}

/* 渐进增强：仅当 JS 正常运行时才做淡入动画 */
html.js-anim .fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

html.js-anim .fade-in.active {
    opacity: 1;
    transform: translateY(0);
}
/* ===== 数据大屏 ===== */
.stats-band {
    background: linear-gradient(135deg, #16324F 0%, #1E3A5F 55%, #2D5A7A 100%);
    padding: 60px 0;
    margin-top: 0;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    text-align: center;
}
.stat-num {
    font-size: 42px;
    font-weight: 700;
    color: #E8C87A;
    letter-spacing: 1px;
    line-height: 1.2;
}
.stat-label {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
}
@media (max-width: 768px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-num { font-size: 32px; }
}

/* ===== 导航防挤：769-992px 提前启用汉堡菜单 ===== */
@keyframes navLinkFade {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}
@media screen and (max-width: 992px) {
    .nav-links {
        position: absolute;
        right: 0;
        height: 92vh;
        top: 8vh;
        background-color: white;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }
    .nav-links li {
        opacity: 0;
        margin: 16px 0;
    }
    .burger {
        display: block;
    }
    .nav-active {
        transform: translateX(0%);
    }
    .toggle .line1 { transform: rotate(-45deg) translate(-5px, 6px); }
    .toggle .line2 { opacity: 0; }
    .toggle .line3 { transform: rotate(45deg) translate(-5px, -6px); }
}
