body,
html {
    margin: 0;
    padding: 0;
    background-color: #f4ecd8;
    font-family: "Helvetica Neue", Helvetica, Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Serif SC", STSong, serif;
    overflow-x: hidden;
}

/* ================= 导航栏基础样式 ================= */
.global-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 80px;
    background: rgba(244, 236, 216, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #d4c4b7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 50px;
    box-sizing: border-box;
    z-index: 9999;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    font-family: "Noto Serif SC", STSong, serif;
}

.nav-left {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 15px;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.02);
}

.nav-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.15));
}

.nav-brand {
    font-size: 1.4rem;
    font-weight: bold;
    color: #8b2b2b;
    letter-spacing: 3px;
}

.nav-right {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-item {
    text-decoration: none;
    color: #4a3b32;
    font-size: 1.05rem;
    font-weight: bold;
    letter-spacing: 2px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 8px 18px;
    border-radius: 6px;
}

.nav-item:hover {
    color: #f9f6ef;
    background-color: #a84b4b;
    transform: scale(1.05);
}

.nav-petal {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #ffcce5;
    border-radius: 10px 0 10px 0;
    pointer-events: none;
    z-index: 10;
}

/* ================= 高阶下拉菜单样式 ================= */
.dropdown {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.dropdown .nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-arrow {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-arrow {
    transform: rotate(225deg) translate(-2px, -2px);
}

.dropdown-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: rgba(250, 246, 235, 0.95);
    min-width: 260px;
    box-shadow: 0px 15px 35px rgba(0, 0, 0, 0.12);
    z-index: 999;
    border-radius: 8px;
    border: 1px solid #d4c4b7;
    backdrop-filter: blur(12px);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.dropdown:hover .dropdown-content {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.dropdown-content a {
    color: #4a3b32 !important;
    text-decoration: none !important;
    padding: 16px 20px;
    display: block;
    font-size: 0.95rem;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    border-bottom: 1px dashed rgba(212, 196, 183, 0.6);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: #8b2b2b;
    color: #f9f6ef !important;
    letter-spacing: 0.5px;
}

/* ================= 动画容器与 3D 园门 ================= */
.scroll-container {
    height: 700vh;
    width: 100vw;
}

.viewport {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1500px;
}

.gate-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100;
    display: flex;
    pointer-events: none;
    perspective: 1500px;
    transform-style: preserve-3d;
}

.gate {
    width: 50%;
    height: 100%;
    background-color: #3e2f25;
    display: flex;
    align-items: center;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
}

.gate-left {
    justify-content: flex-end;
    border-right: 2px solid #1a120e;
    transform-origin: left center;
}

.gate-right {
    justify-content: flex-start;
    border-left: 2px solid #1a120e;
    transform-origin: right center;
}

.door-ring {
    width: 60px;
    height: 60px;
    border: 6px solid #8b2b2b;
    border-radius: 50%;
    margin: 30px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3), inset 2px 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
}

.door-ring::after {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 30px;
    background-color: #8b2b2b;
    border-radius: 4px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

/* ================= 场景与互动特效 ================= */
.bg-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    z-index: 0;
}

#falling-flowers-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.petal {
    position: absolute;
    opacity: 0.8;
    animation: fall linear infinite;
    pointer-events: none;
}

@keyframes fall {
    0% {
        transform: translateY(-10vh) rotate(0deg) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(110vh) rotate(360deg) translateX(20vw);
        opacity: 0;
    }
}

.scene {
    position: absolute;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    will-change: transform, opacity, filter;
    transition: filter 0.3s ease;
    pointer-events: none;
}

.scene-img,
.text-box {
    pointer-events: auto;
}

.scene-interactive {
    cursor: pointer;
}

.scene-interactive .scene-img {
    transition: all 0.3s ease;
}

.scene-interactive:hover .scene-img {
    filter: drop-shadow(0 0 15px #ffb7c5) brightness(1.05) !important;
    transform: scale(1.03);
}

.intro-scene {
    max-width: 800px;
    text-align: center;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.intro-scene h1 {
    font-size: 3.5rem;
    color: #4a3b32;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.intro-scene h2 {
    font-size: 1.5rem;
    color: #6d594f;
    margin-bottom: 20px;
    font-weight: normal;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.intro-desc {
    background: rgba(244, 236, 216, 0.7);
    padding: 20px 35px;
    border-radius: 8px;
    border: 1px dashed #a4968d;
    margin-bottom: 25px;
    max-height: 35vh;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.intro-desc::-webkit-scrollbar {
    display: none;
}

.intro-desc p {
    color: #4a3b32;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    text-align: justify;
}

.intro-desc .en-desc {
    font-family: "Helvetica Neue", Helvetica, Arial, -apple-system, sans-serif;
    font-style: normal;
    color: #8b2b2b;
    text-align: center;
    margin-bottom: 0;
}

.stamp-box {
    border: 2px solid #8b2b2b;
    background: transparent;
    padding: 10px 35px;
    color: #8b2b2b;
    font-weight: bold;
    font-size: 1.2rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Noto Serif SC", STSong, serif;
    border-radius: 4px;
    pointer-events: auto;
    flex-shrink: 0;
}

.stamp-box:hover {
    background: #8b2b2b;
    color: #f9f6ef;
}

.scene-img {
    max-width: 55vw;
    max-height: 60vh;
    object-fit: contain;
    filter: drop-shadow(0px 15px 25px rgba(0, 0, 0, 0.15));
}

.text-box {
    margin-top: 20px;
    background: rgba(244, 236, 216, 0.95);
    padding: 15px 40px;
    border-radius: 4px;
    border: 1px solid #d4c4b7;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.text-box h3 {
    margin: 0;
    color: #4a3b32;
    font-size: 1.6rem;
    letter-spacing: 3px;
    font-family: "Noto Serif SC", STSong, serif;
}

/* ================= 动画结束后的长图文介绍 ================= */
.post-animation-content {
    position: absolute;
    top: 700vh;
    width: 100vw;
    background-color: #f4ecd8;
    z-index: 200;
    padding: 80px 0 0 0;
}

.info-section {
    max-width: 900px;
    margin: 0 auto 80px auto;
    padding: 0 40px;
}

.section-title {
    font-size: 2rem;
    color: #8b2b2b;
    border-bottom: 2px solid #d4c4b7;
    padding-bottom: 10px;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.info-section p {
    font-size: 1.15rem;
    color: #4a3b32;
    line-height: 1.8;
    margin-bottom: 20px;
    text-align: justify;
}

.goal-list {
    list-style: none;
    padding: 0;
}

.goal-list li {
    font-size: 1.15rem;
    color: #4a3b32;
    line-height: 1.8;
    margin-bottom: 15px;
    padding-left: 25px;
    position: relative;
}

.goal-list li::before {
    content: '▪';
    position: absolute;
    left: 0;
    color: #8b2b2b;
    font-size: 1.5rem;
    line-height: 1;
}

.science-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.science-card {
    background: rgba(250, 246, 235, 0.8);
    border: 1px solid #d4c4b7;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.science-card:nth-child(5) {
    grid-column: 1 / -1;
}

.science-card h4 {
    margin: 0 0 15px 0;
    color: #8b2b2b;
    font-size: 1.3rem;
}

.science-card p {
    margin: 0;
    font-size: 1rem;
}

/* 按钮组样式 */
.action-buttons-group {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.action-link-btn {
    display: inline-block;
    padding: 12px 35px;
    background-color: #8b2b2b;
    color: #f9f6ef;
    text-decoration: none;
    font-size: 1.2rem;
    border-radius: 4px;
    letter-spacing: 1px;
    transition: background-color 0.3s, transform 0.2s;
    font-family: "Noto Serif SC", STSong, serif;
}

.action-link-btn:hover {
    background-color: #a84b4b;
    transform: translateY(-2px);
    color: #f9f6ef;
}

.recommendation-btn {
    background-color: #3a6b4a;
}

.recommendation-btn:hover {
    background-color: #2f4f3a;
}

/* ================= 全局页脚 ================= */
.global-footer {
    background-color: #3e2f25;
    color: #d4c4b7;
    padding: 60px 50px 40px;
    text-align: center;
}

.global-footer h3 {
    color: #f9f6ef;
    font-size: 1.8rem;
    margin-bottom: 25px;
    letter-spacing: 3px;
    font-family: "Noto Serif SC", STSong, serif;
}

.global-footer p {
    max-width: 800px;
    margin: 0 auto 15px auto;
    line-height: 1.8;
    font-size: 1.1rem;
}

.footer-meta {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #5a4b41;
}

.footer-meta p {
    font-size: 0.85rem;
    color: #8a7a6f;
    line-height: 1.6;
}

/* ================= 全局导航栏移动端适配 ================= */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 10001;
    /* 确保按钮在最上层 */
}

.hamburger span {
    width: 28px;
    height: 3px;
    background-color: #8b2b2b;
    border-radius: 3px;
    transition: all 0.3s ease;
}

@media (max-width: 900px) {
    .global-nav {
        padding: 0 20px;
    }

    .hamburger {
        display: flex;
    }

    .nav-right {
        position: absolute;
        top: 80px;
        left: 0;
        width: 100vw;
        height: 0;
        overflow: hidden;
        flex-direction: column;
        background: rgba(250, 246, 235, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        gap: 0;
        transition: height 0.4s ease;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        align-items: center;
    }

    /* 展开后的菜单 */
    .nav-right.is-active {
        height: 360px;
        padding: 10px 0;
    }

    .nav-item {
        width: 100%;
        text-align: center;
        padding: 15px 0;
        border-radius: 0;
    }

    .dropdown {
        width: 100%;
        flex-direction: column;
        height: auto;
    }

    .dropdown .nav-item {
        justify-content: center;
    }

    /* 移动端下拉菜单改为点击展开，非悬浮 */
    .dropdown-content {
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        width: 100%;
        min-width: unset;
        box-shadow: none;
        border: none;
        background: rgba(139, 43, 43, 0.05);
        display: none;
        /* 默认隐藏 */
        opacity: 1;
        visibility: visible;
        border-radius: 0;
    }

    .dropdown-content.is-expanded {
        display: block;
    }

    .dropdown-content a {
        padding: 12px 20px;
        border-bottom: 1px solid rgba(212, 196, 183, 0.3);
    }

    /* 汉堡按钮变成叉号动画 */
    .hamburger.is-active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .hamburger.is-active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.is-active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}