/* 光追效果样式 */
.raytracing-background {
    background: transparent;
    position: relative;
}

/* 弹窗打开时隐藏光追效果，避免闪烁 */
body.modal-open .raytracing-enabled::before,
body.modal-open .raytracing-enabled::after {
    opacity: 0 !important;
    transition: opacity 0.4s ease;
}

/* 主光晕 - 使用 vw/vh 单位确保始终覆盖整个视口 */
.raytracing-enabled::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background:
        radial-gradient(ellipse 120vw 120vh at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(56, 189, 248, 0.03) 0%,
            rgba(14, 165, 233, 0.01) 60%,
            transparent 100%);
    z-index: 1;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

/* 核心光点 */
.raytracing-enabled::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background:
        radial-gradient(circle 150px at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(186, 230, 253, 0.05) 0%,
            rgba(56, 189, 248, 0.01) 70%,
            transparent 100%);
    z-index: 1;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

/* 光追画布样式 */
#raytracer-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* 文字波浪动效 */
.wave-container {
    display: inline;
    position: relative;
    white-space: pre-wrap;
}

.wave-char {
    display: inline-block;
    position: relative;
    transition: transform 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    transform-origin: center bottom;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 性能优化：减少重绘 */
.wave-container * {
    backface-visibility: hidden;
    perspective: 1000px;
}
