/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #DA7F60;
    --primary-gradient: linear-gradient(135deg, #DA7F60 0%, #E8A8A6 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --border-light: #e2e8f0;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: SimSun, serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: #FAF9F5;
    overflow-x: hidden;
}

body.lang-en {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body.lang-zh,
body.lang-zh-TW {
    font-family: SimSun, serif;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.gradient-text {
    color: #000000;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 16px;
}

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

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

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

.btn-secondary:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    transition: var(--transition);
}

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

.nav-logo h1 {
    font-size: 24px;
    font-weight: 400;
    color: #000000;
    margin: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

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

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.language-selector {
    display: flex;
    gap: 8px;
}

.lang-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.lang-btn.active,
.lang-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: transparent;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: #FAF9F5;
    padding-top: 70px;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 120px;
    align-items: flex-start;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 400;
    font-family: SimSun, serif;
    color: #000000;
    line-height: 1.1;
    margin-bottom: 62.4px;
}

/* Desktop-only alignment adjustment */
@media (min-width: 769px) {
    .hero {
        padding-top: 200px; /* 桌面端顶部间距调整为200px */
    }
    
    .hero-content h1 {
        margin-bottom: 100px; /* 中文的对齐值 */
    }
    
    .hero-content h1.en {
        margin-bottom: 110px; /* 英文的对齐值 */
    }
    
    .phone-mockup {
        transform: scale(1.1); /* 桌面端图片放大1.1倍 */
    }
}

.hero-content h1.en {
    font-size: 2.8rem;
}

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

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

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

.phone-mockup {
    width: 324.8px;
    height: 649.6px;
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    position: relative;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--bg-white);
    border-radius: 30px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-preview {
    padding: 40px;
}

.bazi-chart {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 200px;
}

.chart-element {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 18px;
    box-shadow: var(--shadow-soft);
    animation: float 3s ease-in-out infinite;
}

.chart-element:nth-child(2) {
    animation-delay: 0.5s;
}

.chart-element:nth-child(3) {
    animation-delay: 1s;
}

.chart-element:nth-child(4) {
    animation-delay: 1.5s;
}

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

/* Features Section */
.features {
    padding: 100px 0;
    background: var(--bg-white);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

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

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

.feature-card {
    background: var(--bg-white);
    padding: 40px 32px;
    border-radius: var(--border-radius-lg);
    text-align: center;
    border: 1px solid var(--border-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: translateX(-100%);
    transition: var(--transition);
}

.feature-card:hover::before {
    transform: translateX(0);
}

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

.feature-icon {
    margin-bottom: 24px;
}

.icon-circle {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 600;
    box-shadow: var(--shadow-soft);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

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

/* About Section */
.about {
    padding: 100px 0;
    background: var(--bg-light);
}

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

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 24px;
}

.about-text p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.7;
}

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label {
    color: var(--text-light);
    font-weight: 500;
}

.about-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.traditional-elements {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.element-circle {
    width: 100px;
    height: 100px;
    background: var(--secondary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 600;
    box-shadow: var(--shadow-medium);
    animation: pulse 2s ease-in-out infinite;
}

.element-circle:nth-child(2) {
    animation-delay: 0.5s;
}

.element-circle:nth-child(3) {
    animation-delay: 1s;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}


/* CTA Section */
.cta {
    padding: 80px 0;
    background: var(--primary-gradient);
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 1.25rem;
    margin-bottom: 32px;
    opacity: 0.9;
}

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

.cta .btn-primary:hover {
    transform: translateY(-2px);
}

/* Gallery Section */
.gallery {
    min-height: 100vh;
    padding: 80px 0;
    background: var(--bg-white);
    display: flex;
    align-items: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 60px;
    width: 100%;
}

.gallery-item {
    text-align: center;
    background: transparent;
    padding: 0;
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-image {
    width: 100%;
    max-width: 350px;
    height: auto;
    border-radius: var(--border-radius);
}

/* Footer */
.footer {
    background: var(--bg-white);
    color: var(--text-primary);
    padding: 60px 0 20px;
    border-top: 1px solid var(--border-light);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    margin-bottom: 40px;
    justify-items: center;
}

.footer-logo h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.footer-logo p {
    opacity: 0.8;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-section h4 {
    margin-bottom: 16px;
    font-size: 1.125rem;
}

.footer-section a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 8px;
    transition: var(--transition);
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    body {
        font-family: SimSun, serif;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-white);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 40px;
        transition: var(--transition);
        box-shadow: var(--shadow-medium);
        font-family: SimSun, serif;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: none;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
        padding: 0;
        max-width: none;
        grid-template-areas: 
            "visual"
            "content";
    }
    
    .hero-content {
        grid-area: content;
    }
    
    .hero-visual {
        grid-area: visual;
        margin-top: -100px;
    }

    .hero-content {
        padding: 0 20px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
        font-family: SimSun, serif !important; /* 移动端使用宋体 */
        line-height: 1.6 !important; /* 行间距调整为1.6 */
        margin-bottom: 62.4px !important; /* 确保移动端使用原始间距 */
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-visual {
        position: relative;
        width: 100vw;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        padding: 0 20px;
        box-sizing: border-box;
    }

    .phone-mockup {
        width: 100% !important;
        height: auto !important;
        margin: 0;
        padding: 0;
        max-width: none !important;
        min-width: auto !important;
    }
    
    .phone-mockup img {
        width: 100% !important;
        height: auto !important;
        border-radius: 10px !important;
        border: none !important;
        max-width: none !important;
        display: block !important;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .about-stats {
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .cta-content h2 {
        font-size: 2rem;
    }

    .about-text h2 {
        font-size: 2rem;
    }
}

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

    .nav-container {
        padding: 0 16px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

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

    .about-stats {
        flex-direction: column;
        gap: 20px;
    }

    .phone-mockup {
        width: 200px;
        height: 400px;
    }

    .bazi-chart {
        max-width: 160px;
    }

    .chart-element {
        width: 50px;
        height: 50px;
        font-size: 16px;
    }
    
    .gallery {
        padding: 80px 20px;
    }
    
    .gallery-item {
        margin: 0;
    }
    
    .gallery-image {
        width: 100%;
        max-width: none;
        margin: 0;
    }
}