/* 雨效果 - Rain Effect */
/* 使用方法：在HTML中添加 .rain-container 和 30个 .rain-line div */

.rain-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 10;
}

.rain-line {
    position: absolute;
    width: 1px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(174, 194, 224, 0.35) 50%,
        rgba(174, 194, 224, 0.7) 100%
    );
    animation: rain-fall linear infinite;
}

@keyframes rain-fall {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100vh);
    }
}

/* 前景雨 - 20条 */
.rain-line:nth-child(1) { left: 3%; height: 80px; animation-duration: 0.8s; animation-delay: 0s; opacity: 0.7; }
.rain-line:nth-child(2) { left: 7%; height: 120px; animation-duration: 1.0s; animation-delay: 0.2s; opacity: 0.6; }
.rain-line:nth-child(3) { left: 12%; height: 90px; animation-duration: 0.7s; animation-delay: 0.4s; opacity: 0.8; }
.rain-line:nth-child(4) { left: 18%; height: 110px; animation-duration: 0.9s; animation-delay: 0.1s; opacity: 0.65; }
.rain-line:nth-child(5) { left: 23%; height: 70px; animation-duration: 0.75s; animation-delay: 0.6s; opacity: 0.75; }
.rain-line:nth-child(6) { left: 28%; height: 100px; animation-duration: 0.85s; animation-delay: 0.3s; opacity: 0.6; }
.rain-line:nth-child(7) { left: 33%; height: 130px; animation-duration: 1.1s; animation-delay: 0.5s; opacity: 0.55; }
.rain-line:nth-child(8) { left: 38%; height: 85px; animation-duration: 0.7s; animation-delay: 0.15s; opacity: 0.8; }
.rain-line:nth-child(9) { left: 42%; height: 95px; animation-duration: 0.8s; animation-delay: 0.45s; opacity: 0.7; }
.rain-line:nth-child(10) { left: 47%; height: 115px; animation-duration: 0.95s; animation-delay: 0.25s; opacity: 0.65; }
.rain-line:nth-child(11) { left: 52%; height: 75px; animation-duration: 0.72s; animation-delay: 0.55s; opacity: 0.75; }
.rain-line:nth-child(12) { left: 57%; height: 105px; animation-duration: 0.88s; animation-delay: 0.1s; opacity: 0.6; }
.rain-line:nth-child(13) { left: 62%; height: 125px; animation-duration: 1.05s; animation-delay: 0.35s; opacity: 0.55; }
.rain-line:nth-child(14) { left: 67%; height: 88px; animation-duration: 0.78s; animation-delay: 0.5s; opacity: 0.72; }
.rain-line:nth-child(15) { left: 72%; height: 98px; animation-duration: 0.82s; animation-delay: 0.2s; opacity: 0.68; }
.rain-line:nth-child(16) { left: 77%; height: 118px; animation-duration: 0.98s; animation-delay: 0.4s; opacity: 0.62; }
.rain-line:nth-child(17) { left: 82%; height: 78px; animation-duration: 0.74s; animation-delay: 0.65s; opacity: 0.78; }
.rain-line:nth-child(18) { left: 87%; height: 108px; animation-duration: 0.92s; animation-delay: 0.15s; opacity: 0.63; }
.rain-line:nth-child(19) { left: 92%; height: 82px; animation-duration: 0.76s; animation-delay: 0.38s; opacity: 0.74; }
.rain-line:nth-child(20) { left: 96%; height: 102px; animation-duration: 0.86s; animation-delay: 0.58s; opacity: 0.66; }

/* 远景雨 - 10条，更慢更透明 */
.rain-line:nth-child(n+21) {
    width: 1px;
    opacity: 0.35;
}
.rain-line:nth-child(21) { left: 5%; height: 60px; animation-duration: 1.3s; animation-delay: 0.1s; }
.rain-line:nth-child(22) { left: 15%; height: 55px; animation-duration: 1.4s; animation-delay: 0.3s; }
.rain-line:nth-child(23) { left: 25%; height: 65px; animation-duration: 1.25s; animation-delay: 0.5s; }
.rain-line:nth-child(24) { left: 35%; height: 50px; animation-duration: 1.5s; animation-delay: 0.2s; }
.rain-line:nth-child(25) { left: 45%; height: 58px; animation-duration: 1.35s; animation-delay: 0.4s; }
.rain-line:nth-child(26) { left: 55%; height: 62px; animation-duration: 1.28s; animation-delay: 0.6s; }
.rain-line:nth-child(27) { left: 65%; height: 52px; animation-duration: 1.45s; animation-delay: 0.15s; }
.rain-line:nth-child(28) { left: 75%; height: 68px; animation-duration: 1.2s; animation-delay: 0.35s; }
.rain-line:nth-child(29) { left: 85%; height: 56px; animation-duration: 1.38s; animation-delay: 0.55s; }
.rain-line:nth-child(30) { left: 95%; height: 63px; animation-duration: 1.32s; animation-delay: 0.25s; }

/* 响应式 */
@media (max-width: 768px) {
    .rain-container {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }
    .rain-line:nth-child(n+16) {
        display: none;
    }
    .rain-line {
        height: 60px !important;
    }
}

@media (max-width: 480px) {
    .rain-container {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }
    .rain-line:nth-child(n+11) {
        display: none;
    }
    .rain-line {
        height: 50px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rain-line {
        animation: none;
        opacity: 0.1;
    }
}
