/**
 * 全站背景 — 所有模式均铺满视口（fixed 全屏层 + 主内容区透明）
 */

/* ========== 通用：全屏底 + 内容区透出背景 ========== */
html:has(body[class*="site-bg-"]),
html.dark-mode:has(body[class*="site-bg-"]) {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    min-height: 100%;
}

html:has(body[class*="site-bg-"]) body {
    min-height: 100vh;
    background-color: transparent !important;
    background-image: none !important;
}

body[class*="site-bg-"] .Whole,
body[class*="site-bg-"] .Content,
body[class*="site-bg-"] .content,
body[class*="site-bg-"] .main-content,
body[class*="site-bg-"] .page-content,
body[class*="site-bg-"] .toubu,
body[class*="site-bg-"] .TeacherHome {
    background: transparent !important;
    background-color: transparent !important;
}

body[class*="site-bg-"] > .Whole,
body[class*="site-bg-"] .Whole {
    position: relative;
    z-index: 1;
}

/* 去掉 hero-ambient-page 在 body::before 上的暗色渐变（index-hero.css），不作用于纯色/自定义层 */
body[class*="site-bg-animated"].hero-ambient-page::before,
body.dark-mode.hero-ambient-page:not(.site-bg-solid):not(.site-bg-custom)::before {
    display: none !important;
    content: none !important;
}

/* ========== 纯色：fixed 全屏色层（用 ::after，避免与 index-hero 的 body::before 冲突） ========== */
body.site-bg-solid {
    --site-bg-layer: #ffffff;
    --site-bg-dark-base: #111111;
    --site-bg-dark-tint: none;
}

body.site-bg-solid::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: var(--site-bg-layer);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
}

/* 明亮：浅色渐变 */
body.site-bg-solid-white { --site-bg-layer: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%); --site-bg-dark-tint: linear-gradient(165deg, rgba(148, 163, 184, 0.1) 0%, transparent 55%); }
body.site-bg-solid-orange { --site-bg-layer: linear-gradient(165deg, #fffbeb 0%, #ffedd5 28%, #fed7aa 62%, #fdba74 100%); --site-bg-dark-tint: linear-gradient(165deg, rgba(249, 115, 22, 0.24) 0%, rgba(234, 88, 12, 0.1) 42%, transparent 72%); }
body.site-bg-solid-blue { --site-bg-layer: linear-gradient(165deg, #eff6ff 0%, #dbeafe 40%, #93c5fd 100%); --site-bg-dark-tint: linear-gradient(165deg, rgba(59, 130, 246, 0.22) 0%, rgba(37, 99, 235, 0.08) 42%, transparent 72%); }
body.site-bg-solid-green { --site-bg-layer: linear-gradient(165deg, #ecfdf5 0%, #d1fae5 40%, #86efac 100%); --site-bg-dark-tint: linear-gradient(165deg, rgba(34, 197, 94, 0.2) 0%, rgba(22, 163, 74, 0.08) 42%, transparent 72%); }
body.site-bg-solid-purple { --site-bg-layer: linear-gradient(165deg, #faf5ff 0%, #ede9fe 40%, #c4b5fd 100%); --site-bg-dark-tint: linear-gradient(165deg, rgba(139, 92, 246, 0.22) 0%, rgba(124, 58, 237, 0.08) 42%, transparent 72%); }
body.site-bg-solid-pink { --site-bg-layer: linear-gradient(165deg, #fdf2f8 0%, #fce7f3 40%, #f9a8d4 100%); --site-bg-dark-tint: linear-gradient(165deg, rgba(236, 72, 153, 0.2) 0%, rgba(219, 39, 119, 0.08) 42%, transparent 72%); }
body.site-bg-solid-gray { --site-bg-layer: linear-gradient(165deg, #f9fafb 0%, #f3f4f6 40%, #d1d5db 100%); --site-bg-dark-tint: linear-gradient(165deg, rgba(148, 163, 184, 0.12) 0%, transparent 50%); }
body.site-bg-solid-cream { --site-bg-layer: linear-gradient(165deg, #fffbeb 0%, #fef3c7 40%, #fde68a 100%); --site-bg-dark-tint: linear-gradient(165deg, rgba(251, 191, 36, 0.18) 0%, rgba(245, 158, 11, 0.07) 42%, transparent 72%); }

/*
 * 暗黑：全站暗黑画布（--dm-page-bg / --dm-page-bg-gradient）为底 + 所选主题色淡 tint
 * 例：暖橙 → #111 深灰底 + 轻微橙晕
 */
html.dark-mode body.dark-mode.site-bg-solid::after {
    background:
        var(--site-bg-dark-tint),
        var(--dm-page-bg-gradient),
        var(--dm-page-bg, var(--site-bg-dark-base, #111111)) !important;
}

/* 明亮模式才用浅色层（避免盖住暗黑底） */
html:not(.dark-mode) body.site-bg-solid.hero-ambient-page::after,
body.site-bg-solid.hero-ambient-page:not(.dark-mode)::after {
    display: block !important;
    content: "" !important;
    background: var(--site-bg-layer) !important;
}

body.site-bg-solid .hero-ambient,
body.site-bg-solid .hero-ambient__wave-wrap {
    display: none !important;
}

/* Hero 区块底色透明，让全屏纯色贯穿导航下/Hero/列表 */
body.site-bg-solid .index-hero-section,
body.site-bg-solid .index-hero-section--home,
body.site-bg-solid .index-hero-section--teachers,
body.site-bg-solid .index-hero-section--samples,
body.site-bg-solid .index-hero-section--apply {
    background: transparent !important;
    box-shadow: none !important;
}

body.site-bg-solid .index-hero-section::before,
body.site-bg-solid .index-hero-section::after {
    display: none !important;
}

/* ========== 自定义图片：fixed 全屏图（::after，同样避开 body::before 冲突） ========== */
body.site-bg-custom::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: var(--site-bg-image, none);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body.dark-mode.site-bg-custom.hero-ambient-page::after {
    display: block !important;
    content: "" !important;
}

html.dark-mode body.dark-mode.site-bg-custom::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    display: block !important;
    background:
        var(--dm-page-bg-gradient),
        var(--dm-page-bg, #111111);
    opacity: 0.88;
}

body.site-bg-custom .hero-ambient,
body.site-bg-custom .hero-ambient__wave-wrap {
    display: none !important;
}

body.site-bg-custom .index-hero-section,
body.site-bg-custom .index-hero-section--home,
body.site-bg-custom .index-hero-section--teachers,
body.site-bg-custom .index-hero-section--samples,
body.site-bg-custom .index-hero-section--apply {
    background: transparent !important;
    box-shadow: none !important;
}

/*
 * 🎨 流动动画：极简洁净底 + 极轻飘动（底部波浪不动）
 * 近白渐变 + 单层淡云，动效幅度极小
 */
@keyframes siteBgCloudFloat {
    0%, 100% { transform: translate3d(-0.5%, 0, 0); }
    50%      { transform: translate3d(0.5%, -0.6%, 0); }
}

body[class*="site-bg-animated"].hero-ambient-page::after {
    content: "";
    position: fixed;
    inset: -4%;
    z-index: 0;
    pointer-events: none;
    will-change: transform;
    backface-visibility: hidden;
    background:
        radial-gradient(ellipse 85% 55% at 50% 28%, var(--site-cloud-a, rgba(255, 255, 255, 0.45)) 0%, transparent 62%),
        linear-gradient(
            180deg,
            var(--site-page-bg-a, #fafafa) 0%,
            var(--site-page-bg-b, #f7f7f7) 38%,
            var(--site-page-bg-c, #ffffff) 100%
        );
    animation: siteBgCloudFloat 72s ease-in-out infinite alternate;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 68%, rgba(0, 0, 0, 0.25) 82%, transparent 92%);
    mask-image: linear-gradient(180deg, #000 0%, #000 68%, rgba(0, 0, 0, 0.25) 82%, transparent 92%);
}

html.dark-mode body.dark-mode[class*="site-bg-animated"].hero-ambient-page::after {
    background:
        radial-gradient(ellipse 85% 55% at 50% 26%, var(--site-cloud-a, rgba(255, 255, 255, 0.035)) 0%, transparent 62%),
        linear-gradient(
            180deg,
            var(--site-page-bg-a, #111111) 0%,
            var(--site-page-bg-b, #0d0d0d) 45%,
            var(--site-page-bg-c, #0a0a0a) 100%
        );
}

html.dark-mode body.dark-mode.site-bg-animated-aurora.hero-ambient-page::after {
    background:
        radial-gradient(ellipse 120% 80% at 18% 18%, rgba(124, 255, 103, 0.14) 0%, transparent 52%),
        radial-gradient(ellipse 100% 70% at 72% 24%, rgba(180, 151, 207, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 90% 65% at 48% 78%, rgba(82, 39, 255, 0.18) 0%, transparent 55%),
        linear-gradient(
            180deg,
            var(--site-page-bg-a, #111111) 0%,
            var(--site-page-bg-b, #0d0d0d) 45%,
            var(--site-page-bg-c, #0a0a0a) 100%
        );
}

body.site-bg-animated-aurora.hero-ambient-page {
    --site-page-bg-a: #fafafa;
    --site-page-bg-b: #f7f7f7;
    --site-page-bg-c: #ffffff;
    --site-cloud-a: rgba(255, 255, 255, 0.42);
}

html.dark-mode body.dark-mode.site-bg-animated-aurora.hero-ambient-page {
    --site-page-bg-a: #111111;
    --site-page-bg-b: #0d0d0d;
    --site-page-bg-c: #0a0a0a;
    --site-cloud-a: rgba(124, 255, 103, 0.08);
}

html.dark-mode body.dark-mode.site-bg-animated-aurora .index-hero-section {
    --hero-orb-a: rgba(124, 255, 103, 0.12);
    --hero-orb-b: rgba(180, 151, 207, 0.1);
    --hero-orb-c: rgba(82, 39, 255, 0.14);
    --hero-bg-a: #111111;
    --hero-bg-b: #0d0d0d;
    --hero-mesh-a: rgba(124, 255, 103, 0.06);
    --hero-mesh-b: rgba(180, 151, 207, 0.05);
    --hero-mesh-c: rgba(82, 39, 255, 0.07);
}

body.site-bg-animated-aurora .index-hero-section {
    --hero-orb-a: rgba(229, 229, 229, 0.09);
    --hero-orb-b: rgba(245, 245, 245, 0.07);
    --hero-orb-c: rgba(250, 250, 250, 0.05);
    --hero-bg-a: #fafafa;
    --hero-bg-b: #f7f7f7;
    --hero-mesh-a: rgba(0, 0, 0, 0.02);
    --hero-mesh-b: rgba(0, 0, 0, 0.015);
    --hero-mesh-c: rgba(255, 255, 255, 0.03);
}

body.site-bg-animated-aurora.site-bg-anim-style-calm .hero-ambient__orb {
    filter: blur(100px) saturate(1) !important;
    opacity: 0.82;
}

/* 🌥️ 默认流动背景：极轻飘动（无 anim_style 时兜底） */
body[class*="site-bg-animated"]:not([class*="site-bg-anim-style-"]).hero-ambient-page .hero-ambient__orb {
    animation: siteBgOrbCalm 64s ease-in-out infinite !important;
    filter: blur(100px) saturate(1);
    opacity: 0.85;
}

body[class*="site-bg-animated"]:not([class*="site-bg-anim-style-"]).hero-ambient-page .hero-ambient__orb--b {
    animation-delay: -17.33s !important;
}

body[class*="site-bg-animated"]:not([class*="site-bg-anim-style-"]).hero-ambient-page .hero-ambient__orb--c {
    animation-delay: -34.66s !important;
}

body.site-bg-animated-sunset .index-hero-section {
    --hero-orb-a: rgba(249, 115, 22, 0.36);
    --hero-orb-b: rgba(244, 114, 182, 0.28);
    --hero-orb-c: rgba(251, 146, 60, 0.26);
    --hero-bg-a: #fff7ed;
    --hero-bg-b: #fdf4ff;
    --hero-mesh-a: rgba(249, 115, 22, 0.14);
    --hero-mesh-b: rgba(244, 114, 182, 0.11);
    --hero-mesh-c: rgba(251, 146, 60, 0.12);
}

body.site-bg-animated-ocean .index-hero-section {
    --hero-orb-a: rgba(14, 165, 233, 0.34);
    --hero-orb-b: rgba(45, 212, 191, 0.28);
    --hero-orb-c: rgba(99, 102, 241, 0.24);
    --hero-bg-a: #ecfeff;
    --hero-bg-b: #eff6ff;
    --hero-mesh-a: rgba(14, 165, 233, 0.14);
    --hero-mesh-b: rgba(45, 212, 191, 0.12);
    --hero-mesh-c: rgba(99, 102, 241, 0.11);
}

body.site-bg-animated-forest .index-hero-section {
    --hero-orb-a: rgba(34, 197, 94, 0.32);
    --hero-orb-b: rgba(16, 185, 129, 0.26);
    --hero-orb-c: rgba(132, 204, 22, 0.22);
    --hero-bg-a: #ecfdf5;
    --hero-bg-b: #f0fdf4;
    --hero-mesh-a: rgba(34, 197, 94, 0.13);
    --hero-mesh-b: rgba(16, 185, 129, 0.11);
    --hero-mesh-c: rgba(132, 204, 22, 0.1);
}

body.site-bg-animated-dream .index-hero-section {
    --hero-orb-a: rgba(139, 92, 246, 0.38);
    --hero-orb-b: rgba(167, 139, 250, 0.3);
    --hero-orb-c: rgba(192, 132, 252, 0.26);
    --hero-bg-a: #f5f3ff;
    --hero-bg-b: #faf5ff;
    --hero-mesh-a: rgba(139, 92, 246, 0.16);
    --hero-mesh-b: rgba(167, 139, 250, 0.13);
    --hero-mesh-c: rgba(192, 132, 252, 0.11);
}

body.site-bg-animated-candy .index-hero-section {
    --hero-orb-a: rgba(236, 72, 153, 0.32);
    --hero-orb-b: rgba(59, 130, 246, 0.28);
    --hero-orb-c: rgba(250, 204, 21, 0.26);
    --hero-bg-a: #fdf4ff;
    --hero-bg-b: #eff6ff;
    --hero-mesh-a: rgba(236, 72, 153, 0.12);
    --hero-mesh-b: rgba(59, 130, 246, 0.11);
    --hero-mesh-c: rgba(250, 204, 21, 0.1);
}

body.site-bg-animated-midnight .index-hero-section {
    --hero-orb-a: rgba(30, 58, 138, 0.38);
    --hero-orb-b: rgba(79, 70, 229, 0.32);
    --hero-orb-c: rgba(14, 165, 233, 0.26);
    --hero-bg-a: #eef2ff;
    --hero-bg-b: #e0e7ff;
    --hero-mesh-a: rgba(30, 58, 138, 0.14);
    --hero-mesh-b: rgba(79, 70, 229, 0.12);
    --hero-mesh-c: rgba(14, 165, 233, 0.1);
}

body.site-bg-animated-rose .index-hero-section {
    --hero-orb-a: rgba(225, 29, 72, 0.34);
    --hero-orb-b: rgba(244, 114, 182, 0.3);
    --hero-orb-c: rgba(251, 191, 36, 0.24);
    --hero-bg-a: #fff1f2;
    --hero-bg-b: #fdf2f8;
    --hero-mesh-a: rgba(225, 29, 72, 0.13);
    --hero-mesh-b: rgba(244, 114, 182, 0.11);
    --hero-mesh-c: rgba(251, 191, 36, 0.09);
}

body.site-bg-animated-mint .index-hero-section {
    --hero-orb-a: rgba(20, 184, 166, 0.34);
    --hero-orb-b: rgba(52, 211, 153, 0.28);
    --hero-orb-c: rgba(134, 239, 172, 0.24);
    --hero-bg-a: #ecfdf5;
    --hero-bg-b: #f0fdfa;
    --hero-mesh-a: rgba(20, 184, 166, 0.13);
    --hero-mesh-b: rgba(52, 211, 153, 0.11);
    --hero-mesh-c: rgba(134, 239, 172, 0.1);
}

body.site-bg-animated-lava .index-hero-section {
    --hero-orb-a: rgba(220, 38, 38, 0.36);
    --hero-orb-b: rgba(234, 88, 12, 0.32);
    --hero-orb-c: rgba(251, 146, 60, 0.26);
    --hero-bg-a: #fef2f2;
    --hero-bg-b: #fff7ed;
    --hero-mesh-a: rgba(220, 38, 38, 0.14);
    --hero-mesh-b: rgba(234, 88, 12, 0.12);
    --hero-mesh-c: rgba(251, 146, 60, 0.1);
}

body.site-bg-animated-gold .index-hero-section {
    --hero-orb-a: rgba(217, 119, 6, 0.36);
    --hero-orb-b: rgba(245, 158, 11, 0.3);
    --hero-orb-c: rgba(251, 191, 36, 0.26);
    --hero-bg-a: #fffbeb;
    --hero-bg-b: #fef3c7;
    --hero-mesh-a: rgba(217, 119, 6, 0.14);
    --hero-mesh-b: rgba(245, 158, 11, 0.12);
    --hero-mesh-c: rgba(251, 191, 36, 0.1);
}

body.site-bg-animated-ice .index-hero-section {
    --hero-orb-a: rgba(56, 189, 248, 0.34);
    --hero-orb-b: rgba(186, 230, 253, 0.32);
    --hero-orb-c: rgba(224, 242, 254, 0.28);
    --hero-bg-a: #f0f9ff;
    --hero-bg-b: #ffffff;
    --hero-mesh-a: rgba(56, 189, 248, 0.12);
    --hero-mesh-b: rgba(186, 230, 253, 0.11);
    --hero-mesh-c: rgba(224, 242, 254, 0.1);
}

/* 动效样式配色 */
body.site-bg-animated-calm .index-hero-section {
    --hero-orb-a: rgba(148, 163, 184, 0.28);
    --hero-orb-b: rgba(196, 181, 253, 0.22);
    --hero-orb-c: rgba(186, 230, 253, 0.2);
    --hero-bg-a: #f8fafc;
    --hero-bg-b: #f1f5f9;
    --hero-mesh-a: rgba(148, 163, 184, 0.1);
    --hero-mesh-b: rgba(196, 181, 253, 0.08);
    --hero-mesh-c: rgba(186, 230, 253, 0.07);
}

body.site-bg-animated-pulse .index-hero-section {
    --hero-orb-a: rgba(251, 113, 133, 0.36);
    --hero-orb-b: rgba(253, 164, 175, 0.3);
    --hero-orb-c: rgba(254, 215, 170, 0.26);
    --hero-bg-a: #fff1f2;
    --hero-bg-b: #fff7ed;
    --hero-mesh-a: rgba(251, 113, 133, 0.13);
    --hero-mesh-b: rgba(253, 164, 175, 0.11);
    --hero-mesh-c: rgba(254, 215, 170, 0.09);
}

body.site-bg-animated-drift .index-hero-section {
    --hero-orb-a: rgba(96, 165, 250, 0.32);
    --hero-orb-b: rgba(147, 197, 253, 0.28);
    --hero-orb-c: rgba(191, 219, 254, 0.24);
    --hero-bg-a: #eff6ff;
    --hero-bg-b: #f0f9ff;
    --hero-mesh-a: rgba(96, 165, 250, 0.12);
    --hero-mesh-b: rgba(147, 197, 253, 0.1);
    --hero-mesh-c: rgba(191, 219, 254, 0.08);
}

body.site-bg-animated-fast .index-hero-section {
    --hero-orb-a: rgba(168, 85, 247, 0.38);
    --hero-orb-b: rgba(236, 72, 153, 0.32);
    --hero-orb-c: rgba(59, 130, 246, 0.28);
    --hero-bg-a: #faf5ff;
    --hero-bg-b: #fdf4ff;
    --hero-mesh-a: rgba(168, 85, 247, 0.14);
    --hero-mesh-b: rgba(236, 72, 153, 0.12);
    --hero-mesh-c: rgba(59, 130, 246, 0.1);
}

body.site-bg-animated-glow .index-hero-section {
    --hero-orb-a: rgba(251, 191, 36, 0.34);
    --hero-orb-b: rgba(251, 146, 60, 0.3);
    --hero-orb-c: rgba(254, 240, 138, 0.26);
    --hero-bg-a: #fffbeb;
    --hero-bg-b: #fff7ed;
    --hero-mesh-a: rgba(251, 191, 36, 0.13);
    --hero-mesh-b: rgba(251, 146, 60, 0.11);
    --hero-mesh-c: rgba(254, 240, 138, 0.09);
}

body.site-bg-animated-float .index-hero-section {
    --hero-orb-a: rgba(125, 211, 252, 0.34);
    --hero-orb-b: rgba(186, 230, 253, 0.3);
    --hero-orb-c: rgba(224, 242, 254, 0.26);
    --hero-bg-a: #f0f9ff;
    --hero-bg-b: #ecfeff;
    --hero-mesh-a: rgba(125, 211, 252, 0.12);
    --hero-mesh-b: rgba(186, 230, 253, 0.1);
    --hero-mesh-c: rgba(224, 242, 254, 0.08);
}

body.site-bg-animated-swirl .index-hero-section {
    --hero-orb-a: rgba(192, 132, 252, 0.36);
    --hero-orb-b: rgba(129, 140, 248, 0.3);
    --hero-orb-c: rgba(244, 114, 182, 0.26);
    --hero-bg-a: #faf5ff;
    --hero-bg-b: #eef2ff;
    --hero-mesh-a: rgba(192, 132, 252, 0.13);
    --hero-mesh-b: rgba(129, 140, 248, 0.11);
    --hero-mesh-c: rgba(244, 114, 182, 0.09);
}

/*
 * 柔光动效样式：仅作用于 .hero-ambient__orb 与 mesh 渐变层
 * 底部波浪 (.hero-ambient__wave-wrap) 保持 index-hero.css 默认，不做任何覆盖
 */
@keyframes siteBgOrbPulse {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50%      { transform: translate3d(0, 2%, 0) scale(1.14); }
}

@keyframes siteBgOrbDrift {
    0%   { transform: translate3d(-6%, 0, 0) scale(1); }
    50%  { transform: translate3d(6%, -2%, 0) scale(1.04); }
    100% { transform: translate3d(-6%, 0, 0) scale(1); }
}

@keyframes siteBgOrbCalm {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    33%  { transform: translate3d(1.2%, 2%, 0) scale(1.02); }
    66%  { transform: translate3d(-1%, 3%, 0) scale(1.03); }
    100% { transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes siteBgOrbGlow {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 0.82;
        filter: blur(80px) saturate(1.1);
    }
    50% {
        transform: translate3d(0, 1%, 0) scale(1.1);
        opacity: 1;
        filter: blur(92px) saturate(1.28);
    }
}

@keyframes siteBgOrbFloat {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50%      { transform: translate3d(0, -5%, 0) scale(1.06); }
}

@keyframes siteBgOrbSwirl {
    0%   { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
    25%  { transform: translate3d(2%, -2%, 0) rotate(90deg) scale(1.04); }
    50%  { transform: translate3d(0, -3%, 0) rotate(180deg) scale(1.06); }
    75%  { transform: translate3d(-2%, -1%, 0) rotate(270deg) scale(1.04); }
    100% { transform: translate3d(0, 0, 0) rotate(360deg) scale(1); }
}

@keyframes siteBgMeshCalm {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 1; }
    50%      { transform: translate3d(0.6%, 1%, 0) scale(1.015); opacity: 0.92; }
}

@keyframes siteBgMeshPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.04); opacity: 0.88; }
}

@keyframes siteBgMeshDrift {
    0%, 100% { transform: translate3d(-2%, 0, 0) scale(1); }
    50%      { transform: translate3d(2%, 0, 0) scale(1.02); }
}

/* 静缓：慢速柔光 */
body.site-bg-anim-style-calm .hero-ambient__orb {
    animation: siteBgOrbCalm 52s ease-in-out infinite !important;
    filter: blur(90px) saturate(1.05);
}

body.site-bg-anim-style-calm .index-hero-section::before {
    animation: siteBgMeshCalm 52s ease-in-out infinite !important;
}

/* 呼吸脉动 */
body.site-bg-anim-style-pulse .hero-ambient__orb {
    animation: siteBgOrbPulse 6s ease-in-out infinite !important;
}

body.site-bg-anim-style-pulse .hero-ambient__orb--b { animation-delay: -2s !important; }
body.site-bg-anim-style-pulse .hero-ambient__orb--c { animation-delay: -4s !important; }

body.site-bg-anim-style-pulse .index-hero-section::before {
    animation: siteBgMeshPulse 6s ease-in-out infinite !important;
}

/* 横向漂移 */
body.site-bg-anim-style-drift .hero-ambient__orb {
    animation: siteBgOrbDrift 22s ease-in-out infinite !important;
}

body.site-bg-anim-style-drift .hero-ambient__orb--b { animation-delay: -7.33s !important; }
body.site-bg-anim-style-drift .hero-ambient__orb--c { animation-delay: -14.66s !important; }

body.site-bg-anim-style-drift .index-hero-section::before {
    animation: siteBgMeshDrift 22s ease-in-out infinite !important;
}

/* 快速流动（仅柔光球） */
body.site-bg-anim-style-fast .hero-ambient__orb {
    animation: heroOrbFlow 14s linear infinite !important;
}

body.site-bg-anim-style-fast .hero-ambient__orb--b { animation-delay: -4.67s !important; }
body.site-bg-anim-style-fast .hero-ambient__orb--c { animation-delay: -9.33s !important; }

/* 光晕明暗 */
body.site-bg-anim-style-glow .hero-ambient__orb {
    animation: siteBgOrbGlow 7s ease-in-out infinite !important;
}

body.site-bg-anim-style-glow .hero-ambient__orb--b { animation-delay: -2.33s !important; }
body.site-bg-anim-style-glow .hero-ambient__orb--c { animation-delay: -4.66s !important; }

body.site-bg-anim-style-glow .index-hero-section::before {
    animation: siteBgMeshPulse 7s ease-in-out infinite !important;
}

/* 轻柔上浮 */
body.site-bg-anim-style-float .hero-ambient__orb {
    animation: siteBgOrbFloat 10s ease-in-out infinite !important;
}

body.site-bg-anim-style-float .hero-ambient__orb--b { animation-delay: -3.33s !important; }
body.site-bg-anim-style-float .hero-ambient__orb--c { animation-delay: -6.66s !important; }

body.site-bg-anim-style-float .index-hero-section::before {
    animation: siteBgMeshCalm 10s ease-in-out infinite !important;
}

/* 旋涡流转 */
body.site-bg-anim-style-swirl .hero-ambient__orb {
    animation: siteBgOrbSwirl 36s linear infinite !important;
    transform-origin: 50% 50%;
}

body.site-bg-anim-style-swirl .hero-ambient__orb--b {
    animation-delay: -12s !important;
    transform-origin: 40% 60%;
}

body.site-bg-anim-style-swirl .hero-ambient__orb--c {
    animation-delay: -24s !important;
    transform-origin: 60% 40%;
}

@media (prefers-reduced-motion: reduce) {
    body[class*="site-bg-anim-style-"] .hero-ambient__orb,
    body[class*="site-bg-anim-style-"] .index-hero-section::before,
    body[class*="site-bg-animated"]:not([class*="site-bg-anim-style-"]).hero-ambient-page .hero-ambient__orb,
    body[class*="site-bg-animated"].hero-ambient-page::after {
        animation: none !important;
    }

    body[class*="site-bg-animated"].hero-ambient-page::after {
        inset: 0;
        transform: none !important;
    }
}

/* 流动动画：Hero 区块不铺实色白底，让 fixed 柔光球贯穿全屏 */
body[class*="site-bg-animated"] .index-hero-section,
body[class*="site-bg-animated"] .index-hero-section--home,
body[class*="site-bg-animated"] .index-hero-section--teachers,
body[class*="site-bg-animated"] .index-hero-section--samples,
body[class*="site-bg-animated"] .index-hero-section--apply {
    background: transparent !important;
    box-shadow: none !important;
}

/* ========== 纯色/自定义 + 暗黑：顶栏导航（index-hero 亮色规则在其后加载会覆盖，此处再压一层） ========== */
html.dark-mode body.dark-mode.site-bg-solid.hero-ambient-page .main-nav:not(.active) .nav-link,
html.dark-mode body.dark-mode.site-bg-custom.hero-ambient-page .main-nav:not(.active) .nav-link {
    color: rgba(255, 255, 255, 0.92) !important;
}

html.dark-mode body.dark-mode.site-bg-solid.hero-ambient-page .main-nav:not(.active) .nav-link:hover,
html.dark-mode body.dark-mode.site-bg-custom.hero-ambient-page .main-nav:not(.active) .nav-link:hover {
    color: #86efac !important;
}

html.dark-mode body.dark-mode.site-bg-solid.hero-ambient-page .main-nav:not(.active) .nav-link.active,
html.dark-mode body.dark-mode.site-bg-custom.hero-ambient-page .main-nav:not(.active) .nav-link.active {
    color: #ffffff !important;
}

html.dark-mode body.dark-mode.site-bg-solid.hero-ambient-page:not(.nav-scrolled) .main-nav:not(.active) .nav-link,
html.dark-mode body.dark-mode.site-bg-custom.hero-ambient-page:not(.nav-scrolled) .main-nav:not(.active) .nav-link {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65) !important;
}

html.dark-mode body.dark-mode.site-bg-solid.hero-ambient-page.nav-scrolled .nav,
html.dark-mode body.dark-mode.site-bg-custom.hero-ambient-page.nav-scrolled .nav {
    background: #111111 !important;
    background-color: #111111 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055) !important;
    box-shadow: none !important;
}

html.dark-mode body.dark-mode.site-bg-solid.hero-ambient-page .nav .nav-logo img,
html.dark-mode body.dark-mode.site-bg-custom.hero-ambient-page .nav .nav-logo img {
    filter: none !important;
    mix-blend-mode: normal !important;
    opacity: 1;
}

html.dark-mode body.dark-mode.site-bg-solid.hero-ambient-page .nav .user-links a,
html.dark-mode body.dark-mode.site-bg-solid.hero-ambient-page .nav #login-btn,
html.dark-mode body.dark-mode.site-bg-custom.hero-ambient-page .nav .user-links a,
html.dark-mode body.dark-mode.site-bg-custom.hero-ambient-page .nav #login-btn {
    color: rgba(255, 255, 255, 0.92) !important;
}

html.dark-mode body.dark-mode.site-bg-solid.hero-ambient-page .nav .menu-toggle span,
html.dark-mode body.dark-mode.site-bg-custom.hero-ambient-page .nav .menu-toggle span {
    background-color: #ffffff !important;
}
