/* effects.css - фоновые эффекты: частицы, тёмная атмосфера и SVG-декор. Перенесено без изменений геометрии и таймингов. */

/* Эффекты */
.effect-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 900;
    overflow: hidden;
}

.effect-particle {
    position: absolute;
    top: -10vh;
    animation: particle-fall var(--fall-duration) linear infinite;
    opacity: var(--particle-opacity);
}

.effect-particle.snow {
    width: var(--particle-size);
    height: var(--particle-size);
    background: radial-gradient(circle, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.6) 60%, rgba(255,255,255,0) 100%);
    border-radius: 50%;
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.4));
}

.effect-particle.sakura {
    width: calc(var(--particle-size) * 1.4);
    height: var(--particle-size);
    background: radial-gradient(circle at 35% 30%, #fff, #f9a8d4 55%, #f472b6 100%);
    border-radius: 50% 50% 60% 60%;
    transform: rotate(var(--spin));
    filter: drop-shadow(0 2px 4px rgba(255, 153, 204, 0.35));
    animation: particle-fall var(--fall-duration) linear infinite,
               sakura-drift var(--drift-duration) ease-in-out infinite;
}

.effect-particle.stars {
    width: var(--particle-size);
    height: var(--particle-size);
    background: radial-gradient(circle, #ffffff 0%, #dbeafe 50%, rgba(255,255,255,0) 100%);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    filter: drop-shadow(0 0 6px rgba(191, 219, 254, 0.6));
}

.effect-particle.confetti {
    width: calc(var(--particle-size) * 0.6);
    height: calc(var(--particle-size) * 1.4);
    border-radius: 4px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.effect-particle.bubbles {
    width: calc(var(--particle-size) * 1.2);
    height: calc(var(--particle-size) * 1.2);
    border-radius: 50%;
    border: 2px solid rgba(147, 197, 253, 0.6);
    background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.8), rgba(191,219,254,0.2) 60%, rgba(59,130,246,0.1));
}

.effect-particle.rain {
    width: 2px;
    height: calc(var(--particle-size) * 2.2);
    background: linear-gradient(180deg, rgba(147,197,253,0) 0%, rgba(96,165,250,0.8) 60%, rgba(59,130,246,0.9) 100%);
    border-radius: 999px;
    filter: drop-shadow(0 0 4px rgba(59,130,246,0.35));
    animation: rain-fall var(--fall-duration) linear infinite;
    transform: rotate(-18deg);
}

.effect-particle.leaves {
    width: calc(var(--particle-size) * 1.4);
    height: calc(var(--particle-size) * 1.1);
    border-radius: 60% 40% 60% 40%;
    background: radial-gradient(circle at 30% 30%, #fde68a, #f59e0b 60%, #b45309 100%);
    transform: rotate(var(--spin));
    filter: drop-shadow(0 2px 4px rgba(180, 83, 9, 0.35));
}

.effect-particle.fireflies {
    width: calc(var(--particle-size) * 0.6);
    height: calc(var(--particle-size) * 0.6);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(253, 224, 71, 1) 0%, rgba(250, 204, 21, 0.6) 60%, rgba(250, 204, 21, 0) 100%);
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.7);
    animation: firefly-float var(--fall-duration) ease-in-out infinite,
               firefly-pulse 2.2s ease-in-out infinite;
}

.effect-particle.embers {
    width: var(--particle-size);
    height: var(--particle-size);
    border-radius: 50%;
    background: radial-gradient(circle, #f97316 0%, #ef4444 60%, rgba(239,68,68,0) 100%);
    filter: drop-shadow(0 0 8px rgba(239,68,68,0.5));
}

.effect-particle.hearts {
    width: calc(var(--particle-size) * 1.1);
    height: calc(var(--particle-size) * 1.1);
    background: linear-gradient(135deg, #fb7185, #f43f5e);
    transform: rotate(45deg);
    position: relative;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(244, 63, 94, 0.35);
}

.effect-particle.hearts::before,
.effect-particle.hearts::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: 50%;
}

.effect-particle.hearts::before {
    top: -50%;
    left: 0;
}

.effect-particle.hearts::after {
    left: -50%;
    top: 0;
}

.effect-particle.comets {
    width: calc(var(--particle-size) * 1.2);
    height: calc(var(--particle-size) * 0.4);
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(191,219,254,0.9), rgba(255,255,255,1));
    border-radius: 999px;
    filter: drop-shadow(0 0 8px rgba(191,219,254,0.8));
}

.effect-particle.diamonds {
    width: var(--particle-size);
    height: var(--particle-size);
    background: linear-gradient(135deg, #e0e7ff, #93c5fd);
    transform: rotate(45deg);
    border-radius: 6px;
    box-shadow: 0 0 8px rgba(147, 197, 253, 0.45);
}

.effect-particle.ribbons {
    width: calc(var(--particle-size) * 0.5);
    height: calc(var(--particle-size) * 2);
    background: linear-gradient(180deg, #f472b6, #c084fc);
    border-radius: 999px;
    filter: drop-shadow(0 2px 4px rgba(192, 132, 252, 0.4));
}

.effect-particle.triangles {
    width: var(--particle-size);
    height: var(--particle-size);
    background: linear-gradient(135deg, #22d3ee, #38bdf8);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    filter: drop-shadow(0 2px 4px rgba(56, 189, 248, 0.4));
}

.effect-particle.squares {
    width: var(--particle-size);
    height: var(--particle-size);
    background: linear-gradient(135deg, #34d399, #a7f3d0);
    border-radius: 6px;
    filter: drop-shadow(0 2px 4px rgba(16, 185, 129, 0.35));
}

@keyframes firefly-pulse {
    0% { transform: scale(0.8); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.8); opacity: 0.6; }
}

@keyframes firefly-float {
    0% { transform: translate3d(0, 0, 0); opacity: 0.6; }
    25% { transform: translate3d(30px, -20px, 0); opacity: 0.9; }
    50% { transform: translate3d(-20px, 20px, 0); opacity: 0.7; }
    75% { transform: translate3d(15px, -10px, 0); opacity: 1; }
    100% { transform: translate3d(0, 0, 0); opacity: 0.6; }
}

@keyframes rain-fall {
    0% { transform: translate3d(0, -10vh, 0) rotate(-18deg); }
    100% { transform: translate3d(40px, 110vh, 0) rotate(-18deg); }
}

@keyframes particle-fall {
    0% {
        transform: translate3d(0, -10vh, 0) rotate(0deg);
    }
    100% {
        transform: translate3d(var(--drift), 110vh, 0) rotate(360deg);
    }
}

@keyframes sakura-drift {
    0% { margin-left: 0; }
    50% { margin-left: 24px; }
    100% { margin-left: 0; }
}


body[data-theme="dark"]::before {
    content: '';
    position: fixed;
    inset: 0;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body[data-theme="dark"]::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 64px 64px;
    opacity: 0.35;
}

#dark-stars-container {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.dark-star {
    position: absolute;
    width: var(--star-size, 2px);
    height: var(--star-size, 2px);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0));
    border-radius: 50%;
    opacity: 0;
    animation: dark-star-twinkle var(--star-duration, 4s) ease-in-out infinite;
}

@keyframes dark-star-twinkle {
    0%, 100% { opacity: 0.1; transform: scale(0.9); }
    50% { opacity: 0.8; transform: scale(1.2); }
}


/* SVG-декор для фона */
.svg-bg-decor {
    position: fixed;
    z-index: 0;
    pointer-events: none;
    user-select: none;
}
.svg-bg-decor.left {
    left: 0; top: 0;
    width: 440px; height: 320px;
}
.svg-bg-decor.right {
    right: 0; bottom: 0;
    width: 100vw; height: 120px;
    min-width: 100%;
    z-index: 1;
}
.footer, .container {
    position: relative;
    z-index: 2;
}

@media (max-width: 900px) {
    .svg-bg-decor { display: none !important; }
}


body[data-theme="dark"] .svg-bg-decor {
    opacity: 0.12;
    filter: grayscale(1) brightness(0.7);
}

