/* 全局布局和动画 */
:root {
    --transition-speed: 0.8s;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    font-family: "PingFang SC", sans-serif;
    color: #fff;
}

/* 背景容器 */
#bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity var(--transition-speed) ease-in-out;
}

.bg-layer.active {
    opacity: 1;
}

/* 页面布局 */
main {
    position: relative;
    z-index: 1;
}

section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.revenue-scrolly-container,
.parallel-chart-section {
    display: block;
}

.content-wrapper {
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* 滚动揭示动画 */
/* 1. 容器状态：仅作为触发器，不负责具体动画 */
.reveal {
    /* 这里的样式留空或保持默认即可 */
}

/* 2. 子元素初始状态：隐藏、下沉、缩小 */
/* 我们直接控制 content-wrapper 里面的每一个直接子元素 (h1, p, div...) */
.reveal>* {
    opacity: 0;
    /* 向下位移 60px，增加沉重感 */
    /* 缩小到 0.9，制造纵深感 */
    transform: translateY(60px) scale(0.9);

    /* 告诉浏览器提前准备渲染，防止滚动卡顿 */

    will-change: opacity, transform;

    /* 使用弹性贝塞尔曲线：让动画带有"冲过头再弹回来"的感觉 */

    transition:
        opacity 0.6s ease-out,
        transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 3. 激活状态：回到原位 */
/* 当 JS 给父级加上 .visible 类时，所有子元素归位 */
.reveal.visible>* {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* --- 关键点：错峰动画 (Staggering) --- */
/* 让子元素一个接一个地出来，而不是一窝蜂挤出来 */

/* 第1个元素 (通常是标题) - 几乎立即出现 */
.reveal.visible>*:nth-child(1) {
    transition-delay: 0.05s;
}

/* 第2个元素 (通常是副标题) - 延迟一下 */
.reveal.visible>*:nth-child(2) {
    transition-delay: 0.15s;
}

/* 第3个元素 (通常是图表或统计栏) - 再延迟 */
.reveal.visible>*:nth-child(3) {
    transition-delay: 0.25s;
}

/* 第4个及以后的元素 - 延迟更久 */
.reveal.visible>*:nth-child(n+4) {
    transition-delay: 0.35s;
}

/* --- 通用类名定义 (只给默认值，具体由各页面CSS覆盖) --- */
.main-title,
.section-title {
    margin-bottom: 1rem;
    font-weight: bold;
}

/* #intro-flower-section {
    min-height: 40vh;
    padding: 60px 20px;
     适当调整上下内边距 */


#intro-flower-section .section-title {
    font-size: clamp(3.2rem, 4.2vw, 4rem);
    margin-bottom: 1.5rem;
    /* 五彩缤纷但低饱和度的渐变色 */
    background: linear-gradient(120deg, #ff0821, #f1a651, #f9f93e, #baffc9, #bae1ff, #ba3ef9);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

#intro-flower-section {
    min-height: 100vh;
    padding-bottom: 40px;
}

#intro-flower-section .description {
    font-size: 1.2rem;
    line-height: 1.8;
    max-width: 800px;
    color: #ffffff;
}

.fixed-watermark {
    position: fixed;
    /* 固定定位，不随滚动条移动 */
    top: 20px;
    /* 距离顶部距离 */
    right: 20px;
    /* 距离右侧距离 */
    z-index: 9999;
    /* 确保在所有层级之上 */

    /* 样式美化 */
    color: rgba(255, 255, 255, 0.991);
    /* 白色半透明，不遮挡视线 */
    font-family: "Microsoft YaHei", sans-serif;
    font-size: 25px;
    letter-spacing: 1px;
    pointer-events: none;
    /* 穿透点击，不影响页面交互 */

    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    overflow: hidden;
}

/* 锁定整个页面的滚动 */
body.loading-locked {
    overflow: hidden !important;
    height: 100vh;
}

.loader-content {
    display: flex;
    flex-direction: column;
    /* 纵向排列子元素 */
    align-items: center;
    /* 水平居中 */
    justify-content: center;
    /* 垂直居中 */
    text-align: center;
}

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0b0e14;
    /* 深色背景符合游戏主题 */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    /* 必须高于水印的 9999 */
    transition: opacity 0.8s ease;
    pointer-events: all;
    /* 拦截所有点击 */
}

/* 简单的加载动画 */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top: 5px solid #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.loader-text {
    color: #fff;
    font-family: "PingFang SC", sans-serif;
    letter-spacing: 2px;
}

#flower-section {
    min-height: 100vh;
    padding-top: 0;
    /* 减少顶部留白 */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#flower-section .content-wrapper {
    position: relative;
    width: 100%;
    height: 95vh;
    /* 页面大一点 */
    max-width: 1600px;
    /* 宽度也增加 */
    margin: 0 auto;
    padding: 0 20px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#flower-section .fullscreen-iframe {
    width: 100%;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    background: transparent;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: block;
}

.flower-controls {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 30;
    pointer-events: none;
    /* 让中间区域不挡鼠标 */
}

.control-btn {
    pointer-events: auto;
    /* 恢复按钮点击 */
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn svg {
    width: 32px;
    height: 32px;
    stroke-width: 2.5;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.control-btn:active {
    transform: translateY(0);
}