/* ========== css/style.css ========== */
:root {
    --silver: #f9f0fa;
    --sky: #e0b0ff;
    --primary: #b583df;
    --secondary: #4a306d;
    --accent: #ffb3c6;
    --bg-light: #f9f0ff;
    --text-dark: #2d1b3c;
    --shadow: 0 15px 30px -10px rgba(90, 40, 120, 0.2);
    --font-sans: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: linear-gradient(145deg, #f7e6ff 0%, #ecd4ff 100%);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Floating opacities (many) */
.floater {
    position: fixed;
    background: rgba(200,150,255,0.2);
    border-radius: 60% 40% 70% 30%;
    filter: blur(25px);
    pointer-events: none;
    z-index: 0;
    animation: drift 20s infinite alternate ease-in-out;
}
.floater:nth-child(1) { width: 120px; height: 80px; top: 15%; left: 5%; animation-duration: 22s; }
.floater:nth-child(2) { width: 90px; height: 140px; top: 70%; left: 85%; background: rgba(42,157,143,0.15); animation-duration: 18s; }
.floater:nth-child(3) { width: 150px; height: 100px; top: 40%; left: 20%; animation-duration: 25s; }
.floater:nth-child(4) { width: 70px; height: 70px; top: 80%; left: 10%; background: rgba(231,111,81,0.1); animation-duration: 15s; }
.floater:nth-child(5) { width: 200px; height: 80px; top: 10%; left: 70%; animation-duration: 30s; }
.floater:nth-child(6) { width: 60px; height: 120px; top: 55%; left: 40%; animation-duration: 17s; }
.floater:nth-child(7) { width: 110px; height: 110px; top: 25%; left: 55%; background: rgba(135,206,235,0.25); animation-duration: 28s; }
.floater:nth-child(8) { width: 85px; height: 85px; top: 90%; left: 30%; animation-duration: 19s; }
.floater:nth-child(9) { width: 130px; height: 60px; top: 45%; left: 75%; background: rgba(42,157,143,0.2); animation-duration: 24s; }
.floater:nth-child(10) { width: 95px; height: 95px; top: 60%; left: 60%; animation-duration: 21s; }
.floater:nth-child(11) { width: 75px; height: 130px; top: 30%; left: 90%; animation-duration: 26s; }
.floater:nth-child(12) { width: 140px; height: 70px; top: 85%; left: 50%; animation-duration: 23s; }
@keyframes drift {
    0% { transform: translate(0,0) rotate(0deg) scale(1); }
    100% { transform: translate(30px, -20px) rotate(10deg) scale(1.1); }
}

/* Abstract blinking eyes (three) */
.bg-eye {
    position: fixed;
    width: 100px;
    height: 50px;
    border: 2px solid rgba(200, 150, 255, 0.3);
    border-radius: 60% 60% 40% 40%;
    z-index: 1;
    pointer-events: none;
    animation: blink 5s infinite;
}
.bg-eye::before, .bg-eye::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: rgba(200, 150, 255, 0.2);
    border-radius: 50%;
    top: 16px;
}
.bg-eye::before { left: 25px; }
.bg-eye::after { right: 25px; }
.left-eye { top: 12%; left: 3%; transform: rotate(-3deg); }
.right-eye { bottom: 15%; right: 2%; transform: rotate(4deg); width: 120px; height: 60px; }
.third-eye { top: 40%; left: 90%; width: 80px; height: 40px; animation-delay: 1s; }
@keyframes blink {
    0%, 95%, 100% { height: 50px; top: 12%; }
    97% { height: 10px; top: calc(12% + 20px); }
}
.right-eye.blink-custom { animation: blinkRight 5.5s infinite; }
@keyframes blinkRight {
    0%,95%,100% { height: 60px; bottom: 15%; }
    97% { height: 12px; bottom: calc(15% + 24px); }
}

/* Mouse glow */
#glow {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle at center, rgba(200, 150, 255, 0.2), transparent 70%);
    border-radius: 40%;
    pointer-events: none;
    z-index: 2;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s;
    opacity: 0;
}
body:hover #glow { opacity: 1; }

/* Navigation (same as before, but with minor improvements) */
.navbar {
    position: fixed; top: 0; width: 100%;
    background: rgba(255,255,255,0.7); backdrop-filter: blur(12px);
    box-shadow: 0 2px 15px rgba(0,0,0,0.03); z-index: 999;
    border-bottom: 1px solid var(--sky);
}
.nav-container {
    max-width: 1300px; margin: 0 auto; padding: 0.5rem 2rem;
    display: flex; justify-content: space-between; align-items: center;
}
.logo-area { display: flex; align-items: center; gap: 12px; }
.logo-icon { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.logo-text { font-weight: 600; font-size: 1.3rem; color: var(--secondary); margin-left: 8px; }
.nav-menu { display: flex; list-style: none; gap: 2rem; }
.nav-menu a { text-decoration: none; color: var(--text-dark); font-weight: 500; transition: color 0.2s; position: relative; }
.nav-menu a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0%; height: 2px; background: var(--primary); transition: 0.2s; }
.nav-menu a:hover::after, .nav-menu a.active::after { width: 100%; }
.nav-menu a.active { color: var(--primary); }
.nav-toggle { display: none; font-size: 1.5rem; cursor: pointer; color: var(--primary); }

/* Hero */
.hero {
    min-height: 100vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center;
    padding: 2rem; position: relative; z-index: 5;
}
.hero-slide { max-width: 1000px; margin: 0.5rem 0; }
.hero-title { font-size: clamp(2rem, 6vw, 3.8rem); font-weight: 700; line-height: 1.3; }
.gradient-text { background: linear-gradient(135deg, var(--secondary), var(--primary)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-subtitle { font-size: 1.2rem; color: #5a3e70; margin-top: 1.5rem; }
.hero-scroll { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); }
.hero-scroll span { display: block; width: 26px; height: 42px; border: 2px solid var(--secondary); border-radius: 30px; position: relative; }
.hero-scroll span::before { content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 4px; height: 8px; background: var(--secondary); border-radius: 2px; animation: scrollAnim 2s infinite; }
@keyframes scrollAnim { 0% { opacity: 1; transform: translate(-50%,0); } 80% { opacity: 0; transform: translate(-50%,15px); } 100% { opacity: 0; } }

/* 英雄区域相对定位，作为半屏背景的参考 */
.hero {
    position: relative;
    overflow: hidden; /* 确保移动时不会产生滚动条 */
}

/* 半屏背景公用样式（保持不变） */
.hero-bg-split {
    position: absolute;
    left: 0;
    width: 100%;
    height: 50%;
    background-image: url('../img/77.png'); /* 请替换为实际图片 */
    background-size: cover;
    background-repeat: no-repeat;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

/* 上半部分默认向上偏移100% */
.hero-bg-split.top {
    top: 0;
    background-position: top center;
    transform: translateY(-100%);
}

/* 下半部分默认向下偏移100% */
.hero-bg-split.bottom {
    bottom: 0;
    background-position: bottom center;
    transform: translateY(100%);
}

/* 状态1 和 状态2：两个半屏合并（移动到原位） */
.hero.state-1 .hero-bg-split.top,
.hero.state-2 .hero-bg-split.top {
    transform: translateY(0);
}
.hero.state-1 .hero-bg-split.bottom,
.hero.state-2 .hero-bg-split.bottom {
    transform: translateY(0);
}

/* 状态2：添加模糊层，标题变白 */
.hero.state-2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background-color: rgba(0, 0, 0, 0.2); /* 可选，增加对比度 */
    z-index: 2;
    pointer-events: none; /* 确保点击穿透 */
}

/* 状态2下所有标题文字变白 */
.hero.state-2 .hero-title,
.hero.state-2 .hero-subtitle,
.hero.state-2 .hero-scroll {
    color: white !important;
    position: relative;
    z-index: 3;
}

/* 状态2下覆盖原有的渐变文字 */
.hero.state-2 .gradient-text {
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    color: white;
}

/* 当触发合并时，两个半屏归位 */
.hero.merged .hero-bg-split.top {
    transform: translateY(0);
}
.hero.merged .hero-bg-split.bottom {
    transform: translateY(0);
}

/* 合并后，标题文字变白，背景模糊（通过伪元素或backdrop-filter） */
.hero.merged::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(8px); /* 背景模糊 */
    -webkit-backdrop-filter: blur(8px);
    background-color: rgba(0, 0, 0, 0.2); /* 可选：增加深色半透明层提高文字对比度 */
    z-index: 2;
    pointer-events: none; /* 确保点击仍能穿透 */
}

/* 标题文字变白，且提高层级 */
.hero.merged .hero-title,
.hero.merged .hero-subtitle,
.hero.merged .hero-scroll {
    color: white;
    position: relative;
    z-index: 3;
}

/* 原渐变文字覆盖为白色 */
.hero.merged .gradient-text {
    background: none;
    color: white;
    -webkit-background-clip: unset;
    background-clip: unset;
}

/* 确保导航等其他元素不受影响（导航固定在顶部，不会冲突） */

/* Section general */
.section { padding: 5rem 1.5rem; position: relative; z-index: 5; background: transparent; }
.bg-alt { background: rgba(224, 176, 255, 0.08); backdrop-filter: blur(2px); }
.container { max-width: 1200px; margin: 0 auto; }
.section-title { font-size: 2.2rem; margin-bottom: 2.5rem; display: flex; align-items: center; gap: 1rem; }
.title-number { font-size: 1.3rem; color: var(--primary); border: 2px solid var(--primary); border-radius: 60px; width: 50px; height: 50px; display: inline-flex; align-items: center; justify-content: center; }

/* Intro card */
.intro-card { background: rgba(255,255,255,0.5); backdrop-filter: blur(4px); padding: 2.5rem; border-radius: 40px; box-shadow: var(--shadow); border: 1px solid rgba(135,206,235,0.5); font-size: 1.05rem; }
.intro-card p { margin-bottom: 1rem; }

/* Design modules */
.module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 1.5rem; margin: 2rem 0; }
.module-card { background: white; padding: 1.8rem; border-radius: 30px; box-shadow: var(--shadow); border-bottom: 4px solid var(--sky); transition: 0.2s; }
.module-card:hover { transform: translateY(-5px); }
.module-card i { font-size: 2rem; color: var(--primary); margin-bottom: 1rem; }
.exosome-module { background: rgba(255,255,255,0.6); padding: 1.8rem; border-radius: 40px; margin-top: 2rem; display: flex; align-items: center; gap: 1.5rem; border: 1px dashed var(--primary); }

/* Circuit large figure */
.large-figure { margin: 2rem 0 3rem; }
.figure-placeholder.large { background: rgba(255,255,255,0.7); height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50px; font-size: 1.2rem; border: 2px dashed var(--primary); box-shadow: var(--shadow); }


/* Experimental design grid */
.exp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); gap: 2rem; }
.exp-col { background: rgba(255,255,255,0.6); padding: 2rem; border-radius: 32px; box-shadow: var(--shadow); border-left: 4px solid var(--sky); }
.exp-col h3 { color: var(--primary); margin-bottom: 0.8rem; }
.exp-figure { background: #cde3ec; padding: 2rem; border-radius: 50px; margin-top: 2rem; text-align: center; font-size: 1.2rem; }

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 2rem; }
.team-card { background: rgba(255,255,255,0.7); padding: 2.5rem 1rem; border-radius: 40px; text-align: center; border: 1px solid var(--sky); transition: 0.2s; }
.team-card:hover { background: white; }
.team-card i { font-size: 4rem; color: var(--primary); margin-bottom: 1rem; }

/* References */
.ref-list { columns: 2; list-style: none; background: rgba(255,255,255,0.5); padding: 2.5rem; border-radius: 50px; }
.ref-list li { margin-bottom: 1rem; padding-left: 1.5rem; position: relative; }
.ref-list li::before { content: '•'; color: var(--primary); font-size: 1.5rem; position: absolute; left: 0; top: -4px; }

/* Footer */
.footer { background: var(--secondary); color: white; text-align: center; padding: 2.5rem; margin-top: 3rem; }

/* Back to top */
#backToTop { position: fixed; bottom: 30px; right: 30px; width: 55px; height: 55px; border-radius: 50%; background: var(--primary); color: white; border: none; cursor: pointer; opacity: 0; transition: 0.3s; pointer-events: none; z-index: 99; box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
#backToTop.show { opacity: 1; pointer-events: all; }

/* Responsive */
@media (max-width: 768px) {
    .nav-menu { display: none; position: absolute; top: 70px; left: 0; width: 100%; background: white; flex-direction: column; padding: 2rem; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
    .nav-menu.active { display: flex; }
    .nav-toggle { display: block; }
    .gallery-with-eye { flex-direction: column; }
    .eye-track { height: 60px; width: 100%; flex-direction: row; }
    .track-line { width: 100%; height: 4px; }
    .track-eye { top: 50%; left: 40%; transform: translate(-50%, -50%); }
    .ref-list { columns: 1; }
}
/* 模块卡片内描述样式 */
.module-card h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary);  /* 深紫色标题 */
    margin: 0.5rem 0 1rem;
    letter-spacing: 0.5px;
    border-left: 4px solid var(--primary);
    padding-left: 0.8rem;
}

.module-desc p {
    margin: 0.6rem 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-dark);
}

.desc-label {
    font-weight: 600;
    color: var(--primary);      /* 粉紫色标签 */
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.3px;
    margin-right: 0.3rem;
    display: inline-block;
    background: rgba(181, 131, 223, 0.1); /* 浅紫背景 */
    padding: 0.1rem 0.5rem;
    border-radius: 12px;
}

/* 使卡片更炫酷：悬浮发光效果、渐变边框 */
.module-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(181, 131, 223, 0.3);
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px -5px rgba(90, 40, 120, 0.15);
    position: relative;
    overflow: hidden;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0.8;
}

.module-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 30px -8px rgba(120, 60, 160, 0.3);
    border-color: var(--primary);
}

/* 调整卡片内边距以适应更多文字 */
.module-card {
    padding: 1.8rem 1.5rem;
}

/* 图标颜色 */
.module-card i {
    font-size: 2.2rem;
    color: var(--primary);
    background: rgba(181, 131, 223, 0.1);
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    margin-bottom: 0.8rem;
}

/* 外泌体模块样式微调（如果存在） */
.exosome-module {
    background: rgba(255, 255, 255, 0.7);
    border: 1px dashed var(--primary);
}

/* 模态框背景 */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

/* 模态框内容（图片容器） */
.modal-content {
    margin: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 90%;
    height: 90%;
    max-width: 1200px;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
}

.modal-content img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(181, 131, 223, 0.4);
    border: 3px solid var(--primary);
}

/* 关闭按钮 */
.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: 0.3s;
    text-shadow: 0 0 10px var(--primary);
}

.modal-close:hover,
.modal-close:focus {
    color: var(--primary);
    text-decoration: none;
    transform: scale(1.2);
}

/* 淡入动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 让卡片有手型提示 */
.module-card {
    cursor: pointer;
}

/* loading 提示容器 */
.modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    gap: 1rem;
}

.modal-loading i {
    font-size: 3rem;
    color: var(--primary);  /* 使用主紫色 */
    filter: drop-shadow(0 0 10px var(--primary));
}

/* 调整模态框内容，使其内部元素居中 */
.modal-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 90%;
    height: 90%;
    max-width: 1200px;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
}

/* 图片样式保持不变，加载完成后显示 */
.modal-content img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(181, 131, 223, 0.4);
    border: 3px solid var(--primary);
}

/* 大图容器 */
.figure-container {
    text-align: center;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 40px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

/* 图片本身 */
.circuit-large-img {
    max-width: 100%;
    max-height: 400px;        /* 根据需要调整，正方形图片建议高度 */
    width: auto;
    height: auto;
    object-fit: contain;      /* 保持比例，不裁剪 */
    border-radius: 30px;
    border: 4px solid var(--primary);
    box-shadow: 0 10px 30px rgba(181, 131, 223, 0.3);
    cursor: pointer;           /* 提示可点击 */
    transition: transform 0.2s ease;
}

.circuit-large-img:hover {
    transform: scale(1.02);
}

/* 图片下方说明文字 */
.fig-caption {
    margin-top: 1rem;
    font-size: 1rem;
    color: var(--secondary);
    font-weight: 500;
}

/* 实验设计卡片翻转容器 */
.exp-col {
    perspective: 1500px;          /* 给父级透视，使翻转有3D感 */
    cursor: pointer;              /* 提示可点击 */
    /* 移除原有的背景、内边距等，这些将移到 .flip-card 内部 */
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}

.flip-card {
    position: relative;
    width: 100%;
    min-height: 320px;             /* 固定最小高度，可根据内容调整 */
    transition: transform 0.6s ease-in-out;
    transform-style: preserve-3d;  /* 启用3D模式 */
    border-radius: 32px;
    box-shadow: var(--shadow);
}

.flip-card.flipped {
    transform: scale(1.05) rotateY(180deg);  /* 放大并翻转180度 */
    z-index: 10;                   /* 确保翻转时位于上层 */
}

/* 正面和背面共用样式 */
.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    backface-visibility: hidden;   /* 隐藏背面 */
    border-radius: 32px;
    padding: 1.8rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid var(--primary);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow-y: auto;               /* 内容过多时可滚动 */
}

/* 正面样式 */
.flip-card-front {
    transform: rotateY(0deg);
}

.flip-card-front h3 {
    color: var(--secondary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    border-left: 4px solid var(--primary);
    padding-left: 0.8rem;
}

.flip-card-front p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-dark);
}

/* 背面样式 */
.flip-card-back {
    transform: rotateY(180deg);      /* 背面预先旋转180度，这样父容器旋转180度时它才可见 */
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem;                 /* 缩小内边距让图片更大 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.flip-card-back img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;             /* 保持比例，不裁剪 */
    border-radius: 24px;
    border: 2px solid var(--primary);
}

/* 小图容器 */
.small-figures {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

/* 卡片基础样式 */
.figure-card {
    width: 240px;
    background-color: #fff;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    box-shadow: var(--shadow);
    overflow-y: auto;
}

.figure-card:hover {
    transform: translateY(-8px);
}

/* 下方两个大框的容器 */
.small-figures {
    display: flex;
    gap: 2rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* 每个框占一半宽度，并继承大图样式 */
.small-figures .large-figure {
    flex: 1 1 calc(50% - 1rem);
    min-width: 280px; /* 防止太窄 */
}

/* 确保大图容器内的图片适应尺寸（与大图一致） */
.large-figure .figure-container {
    text-align: center;
    background: rgba(255,255,255,0.5);
    border-radius: 40px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    height: 100%; /* 使所有卡片等高 */
    display: flex;
    flex-direction: column;
}

.large-figure .circuit-large-img {
    max-width: 100%;
    max-height: 300px; /* 可根据需要调整，与大图协调 */
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 30px;
    border: 4px solid var(--primary);
    box-shadow: 0 10px 30px rgba(181,131,223,0.3);
    cursor: pointer;
    transition: transform 0.2s ease;
    margin-bottom: 1rem;
}

.large-figure .circuit-large-img:hover {
    transform: scale(1.02);
}

.large-figure .fig-caption {
    margin-top: 0.5rem;
    font-size: 1rem;
    color: var(--secondary);
    font-weight: 500;
}

/* 思维导图区域容器 */
.mindmap-section {
    margin-bottom: 3rem;
    text-align: center;
}

/* 思维导图图片容器（相对定位，用于放置装饰） */
.mindmap-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
    cursor: pointer;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 20px 40px -10px rgba(90, 40, 120, 0.4);
    transition: transform 0.3s ease;
}

.mindmap-container:hover {
    transform: scale(1.02);
}

/* 思维导图图片本身 */
.mindmap-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 40px;
    border: 4px solid var(--primary);
    box-shadow: 0 10px 30px rgba(181, 131, 223, 0.3);
}

/* ===== 紫藤花装饰通用样式 ===== */
.flower-cluster, .vine {
    position: absolute;
    pointer-events: none;  /* 点击穿透 */
    z-index: 2;
}

/* 每一朵花的样式 */
.flower {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #c77dff;        /* 浅紫色 */
    border-radius: 50%;
    box-shadow: 0 0 15px #b583df, 0 0 30px #d9b3ff;
    animation: glowPulse 2s infinite alternate;
}

/* 不同花朵大小变化 */
.flower:nth-child(odd) {
    width: 10px;
    height: 10px;
    background: #e0b0ff;
}
.flower:nth-child(3n) {
    width: 14px;
    height: 14px;
    background: #b583df;
}

/* 荧光脉冲动画 */
@keyframes glowPulse {
    0% { opacity: 0.6; box-shadow: 0 0 10px #b583df, 0 0 20px #d9b3ff; }
    100% { opacity: 1; box-shadow: 0 0 25px #b583df, 0 0 50px #ffb3c6; }
}

/* ---------- 各花簇的花朵位置 ---------- */
/* 左上角花簇 */
.flower-cluster.top-left {
    top: -15px;
    left: -15px;
    width: 60px;
    height: 60px;
}
.top-left .flower:nth-child(1) { top: 0; left: 10px; }
.top-left .flower:nth-child(2) { top: 20px; left: 0; }
.top-left .flower:nth-child(3) { top: 30px; left: 25px; }
.top-left .flower:nth-child(4) { top: 10px; left: 35px; }

/* 右上角花簇 */
.flower-cluster.top-right {
    top: -15px;
    right: -15px;
    width: 60px;
    height: 60px;
}
.top-right .flower:nth-child(1) { top: 0; right: 10px; }
.top-right .flower:nth-child(2) { top: 20px; right: 0; }
.top-right .flower:nth-child(3) { top: 30px; right: 25px; }
.top-right .flower:nth-child(4) { top: 10px; right: 35px; }

/* 左下角花簇 */
.flower-cluster.bottom-left {
    bottom: -15px;
    left: -15px;
    width: 60px;
    height: 60px;
}
.bottom-left .flower:nth-child(1) { bottom: 0; left: 10px; }
.bottom-left .flower:nth-child(2) { bottom: 20px; left: 0; }
.bottom-left .flower:nth-child(3) { bottom: 30px; left: 25px; }
.bottom-left .flower:nth-child(4) { bottom: 10px; left: 35px; }

/* 右下角花簇 */
.flower-cluster.bottom-right {
    bottom: -15px;
    right: -15px;
    width: 60px;
    height: 60px;
}
.bottom-right .flower:nth-child(1) { bottom: 0; right: 10px; }
.bottom-right .flower:nth-child(2) { bottom: 20px; right: 0; }
.bottom-right .flower:nth-child(3) { bottom: 30px; right: 25px; }
.bottom-right .flower:nth-child(4) { bottom: 10px; right: 35px; }

/* ---------- 藤蔓（花朵沿直线排列） ---------- */
.vine {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    pointer-events: none;
}

/* 左侧藤蔓 */
.left-vine {
    top: 10%;
    left: -20px;
    height: 80%;
    width: 30px;
}
.left-vine .flower {
    position: relative;  /* 取消绝对定位，用flex排列 */
    margin: 5px 0;
}

/* 右侧藤蔓 */
.right-vine {
    top: 10%;
    right: -20px;
    height: 80%;
    width: 30px;
}
.right-vine .flower {
    position: relative;
    margin: 5px 0;
}

/* 底部藤蔓（横向） */
.bottom-vine {
    bottom: -20px;
    left: 10%;
    width: 80%;
    height: 30px;
    flex-direction: row;
    justify-content: space-around;
}
.bottom-vine .flower {
    margin: 0 5px;
}

/* 为藤蔓中的花朵设置动画延迟，增加自然感 */
.left-vine .flower:nth-child(2) { animation-delay: 0.3s; }
.left-vine .flower:nth-child(3) { animation-delay: 0.6s; }
.left-vine .flower:nth-child(4) { animation-delay: 0.9s; }
.left-vine .flower:nth-child(5) { animation-delay: 1.2s; }

.right-vine .flower:nth-child(2) { animation-delay: 0.2s; }
.right-vine .flower:nth-child(3) { animation-delay: 0.5s; }
.right-vine .flower:nth-child(4) { animation-delay: 0.8s; }
.right-vine .flower:nth-child(5) { animation-delay: 1.1s; }

.bottom-vine .flower:nth-child(2) { animation-delay: 0.4s; }
.bottom-vine .flower:nth-child(3) { animation-delay: 0.7s; }
.bottom-vine .flower:nth-child(4) { animation-delay: 1.0s; }

/* ---------- 荧光小点（萤火虫）保持不变 ---------- */
.glow-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #ffd966;
    border-radius: 50%;
    box-shadow: 0 0 20px #ffd966, 0 0 40px #ffb3c6;
    animation: floatDot 4s infinite ease-in-out;
    pointer-events: none;
    z-index: 3;
}

.dot1 { top: 15%; left: 10%; animation-duration: 3.5s; }
.dot2 { top: 70%; left: 20%; animation-duration: 5s; }
.dot3 { top: 30%; right: 15%; animation-duration: 4.2s; }
.dot4 { bottom: 20%; right: 25%; animation-duration: 3.8s; }
.dot5 { top: 50%; left: 30%; animation-duration: 6s; }
.dot6 { bottom: 40%; right: 40%; animation-duration: 4.5s; }

@keyframes floatDot {
    0% { transform: translate(0, 0); opacity: 0.5; }
    50% { transform: translate(5px, -8px); opacity: 1; }
    100% { transform: translate(-3px, 5px); opacity: 0.5; }
}

/* 图片下方说明文字 */
.mindmap-caption {
    margin-top: 0.8rem;
    font-size: 1rem;
    color: var(--secondary);
    font-style: italic;
    letter-spacing: 0.5px;
}

/* 发光边框卡片 */
.glow-border .flip-card-front,
.glow-border .flip-card-back {
    border: 2px solid var(--primary);
    box-shadow: 0 0 15px var(--primary), 0 0 30px #b583df;
    animation: borderGlow 1.5s infinite alternate;
}

@keyframes borderGlow {
    from { box-shadow: 0 0 10px var(--primary), 0 0 20px #b583df; }
    to { box-shadow: 0 0 20px var(--primary), 0 0 40px #d9b3ff; }
}

/* 多图模态框样式 */
.gallery-content {
    max-width: 800px;
    width: 90%;
    background: rgba(255,255,255,0.9);
    border-radius: 40px;
    padding: 20px;
    box-shadow: 0 0 30px var(--primary);
}

.gallery-container {
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

#galleryImg {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 30px;
    border: 3px solid var(--primary);
    box-shadow: 0 10px 30px rgba(181,131,223,0.3);
}

.gallery-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 15px;
}

.gallery-controls button {
    background: var(--primary);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(181,131,223,0.4);
}

.gallery-controls button:hover {
    background: var(--secondary);
    transform: scale(1.1);
}

.gallery-counter {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--secondary);
}

.static-card {
    width: 100%;
    height: 100%;               /* 由父容器决定高度 */
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border-radius: 32px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    cursor: pointer;
    /* 可选：确保内边距不影响高度计算 */
    padding: 1.8rem;
}

.static-card h3 {
    flex-shrink: 0;             /* 标题不压缩，保持固定 */
    margin-bottom: 1rem;
    color: var(--secondary);
    font-size: 1.3rem;
    border-left: 4px solid var(--primary);
    padding-left: 0.8rem;
}

.static-card p {
    flex: 1;                    /* 让段落占据剩余空间 */
    overflow-y: auto;            /* 内容超出时显示滚动条 */
    margin: 0;                   /* 移除可能的外边距 */
    padding-right: 5px;          /* 留出滚动条空间（可选） */
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-dark);
}

/* 发光边框动画（可重用） */
.glow-border {
    border: 2px solid var(--primary);
    box-shadow: 0 0 15px var(--primary), 0 0 30px #b583df;
    animation: borderGlow 1.5s infinite alternate;
}

@keyframes borderGlow {
    from { box-shadow: 0 0 10px var(--primary), 0 0 20px #b583df; }
    to { box-shadow: 0 0 20px var(--primary), 0 0 40px #d9b3ff; }
}

/* 轮播区域 */
.carousel-section {
    padding: 2rem 0 4rem;
    background: transparent;
    position: relative;
    z-index: 5;
}

.carousel-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 40px;
    box-shadow: 0 20px 30px -10px rgba(90, 40, 120, 0.3);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    flex: 0 0 100%;
    cursor: pointer;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 40px;
    border: 4px solid var(--primary);
    box-shadow: 0 10px 30px rgba(181, 131, 223, 0.3);
    transition: transform 0.3s ease;
}

.carousel-slide:hover img {
    transform: scale(1.02);
}

/* 左右箭头 */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.carousel-arrow:hover {
    background: var(--primary);
    color: white;
}

.carousel-arrow.prev {
    left: 20px;
}

.carousel-arrow.next {
    right: 20px;
}

/* 小圆点指示器 */
.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.dot.active {
    background: var(--primary);
    transform: scale(1.2);
    border-color: white;
}

.dot:hover {
    background: var(--primary);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .carousel-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    .carousel-arrow.prev { left: 10px; }
    .carousel-arrow.next { right: 10px; }
}

/* 全局提示框 */
.global-hint {
    text-align: center;
    margin-top: 2.5rem;
    padding: 0.8rem 2rem;
    background: rgba(181, 131, 223, 0.1);
    backdrop-filter: blur(4px);
    border-radius: 50px;
    display: inline-block;
    width: auto;
    margin-left: auto;
    margin-right: auto;
    font-size: 1rem;
    color: var(--primary);
    border: 1px dashed var(--primary);
    box-shadow: 0 5px 15px rgba(181, 131, 223, 0.2);
    transition: 0.3s;
}

.global-hint i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.global-hint:hover {
    background: rgba(181, 131, 223, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(181, 131, 223, 0.3);
}