/* Новогодние украшения */
.new-year-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

/* Снежинки */
.snowflake {
    position: absolute;
    color: #fff;
    font-size: 1em;
    font-family: Arial, sans-serif;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.9), 0 0 20px rgba(135, 206, 250, 0.5);
    animation: fall linear infinite;
    opacity: 0.9;
    user-select: none;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
    }
}

/* Гирлянда сверху */
.garland {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, 
        #ff0000 0%, #ff7f00 14%, #ffff00 28%, 
        #00ff00 42%, #0000ff 57%, #4b0082 71%, 
        #9400d3 85%, #ff0000 100%);
    background-size: 200% 100%;
    animation: garland-move 8s linear infinite;
    opacity: 0.6;
    z-index: 9998;
    pointer-events: none;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.3);
}

@keyframes garland-move {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

/* Новогодние огоньки */
.sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 
        0 0 10px 2px rgba(255, 255, 255, 0.9),
        0 0 20px 4px rgba(255, 200, 0, 0.6),
        0 0 30px 6px rgba(255, 100, 0, 0.4);
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { 
        opacity: 0; 
        transform: scale(0) rotate(0deg); 
    }
    50% { 
        opacity: 1; 
        transform: scale(1.5) rotate(180deg); 
    }
}

/* Новогодний градиент для hero */
.new-year-hero {
    position: relative;
}

.new-year-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 0, 0, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 255, 0, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 0, 0.1) 0%, transparent 50%);
    animation: new-year-glow 4s ease-in-out infinite;
    z-index: 1;
}

.new-year-hero .hero-content,
.new-year-hero .hero-search-content {
    position: relative;
    z-index: 2;
}

@keyframes new-year-glow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Новогодние звездочки */
.star {
    position: absolute;
    color: rgba(255, 140, 0, 1);
    font-size: 1.2em;
    text-shadow: 0 0 10px rgba(255, 140, 0, 0.8);
    animation: twinkle 1.5s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Эффект конфетти */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ff0000;
    animation: confetti-fall 3s linear infinite;
}

.confetti:nth-child(odd) {
    background: #00ff00;
    animation-duration: 2.5s;
}

.confetti:nth-child(3n) {
    background: #0000ff;
    animation-duration: 3.5s;
}

.confetti:nth-child(4n) {
    background: #ffff00;
    animation-duration: 2s;
}

@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(720deg);
    }
}

/* New Year polish overrides */
:root {
    --holiday-red: #e04646;
    --holiday-green: #23c46b;
    --holiday-gold: rgba(255, 140, 0, 1);
    --holiday-ice: #bfe9ff;
    --holiday-night: #0b1217;
}

.new-year-hero {
    background:
        radial-gradient(900px 400px at 50% -10%, rgba(255, 140, 0, 0.22), transparent 60%),
        linear-gradient(160deg, #0b0f14 0%, #10151b 40%, #131a22 70%, #0b0f14 100%);
}

.new-year-hero .hero-gradient {
    background:
        radial-gradient(ellipse at 20% 30%, rgba(224, 70, 70, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 20%, rgba(35, 196, 107, 0.2) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 70%, rgba(255, 140, 0, 0.18) 0%, transparent 60%);
}

.new-year-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.25) 1px, transparent 1px);
    background-size: 140px 140px;
    opacity: 0.25;
    animation: snow-drift 16s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes snow-drift {
    from { background-position: 0 0; }
    to { background-position: 140px 280px; }
}

.new-year-hero .hero-title-main {
    background: linear-gradient(135deg, rgba(255, 140, 0, 1) 0%, #ff8a5b 55%, var(--holiday-green) 110%);
    -webkit-text-fill-color: transparent;
}

.new-year-hero .hero-title-sub {
    text-shadow: 0 6px 18px rgba(0, 0, 0, 0.4), 0 0 24px rgba(255, 140, 0, 0.2);
}

.new-year-hero .hero-dinosaur-animation::before {
    background: radial-gradient(circle, rgba(255, 140, 0, 0.35) 0%, transparent 70%);
}

.new-year-hero .hero-search-container {
    border-color: rgba(255, 140, 0, 0.35);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 140, 0, 0.2);
}

.new-year-hero .hero-search-wrapper:focus-within {
    box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.3), 0 0 45px rgba(255, 140, 0, 0.4);
}

.new-year-hero .hero-content {
    max-width: 920px;
    padding: 60px 24px 50px;
}

.new-year-hero .hero-search-content {
    max-width: 900px;
}

.section-title-underline {
    background: linear-gradient(90deg, rgba(255, 140, 0, 1) 0%, var(--holiday-red) 100%);
}

.section-title-icon {
    color: rgba(255, 140, 0, 1);
}

.section-more {
    color: rgba(255, 140, 0, 1);
    border-color: rgba(255, 140, 0, 0.4);
}

.garland {
    height: 36px;
    background: transparent;
    opacity: 0.85;
    box-shadow: none;
}

.garland::before {
    content: '';
    position: absolute;
    top: 18px;
    left: -5%;
    width: 110%;
    height: 3px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
    border-radius: 999px;
}

.garland::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, var(--holiday-red) 0, var(--holiday-red) 5px, rgba(224, 70, 70, 0) 7px),
        radial-gradient(circle, rgba(255, 140, 0, 1) 0, rgba(255, 140, 0, 1) 5px, rgba(255, 140, 0, 0) 7px),
        radial-gradient(circle, var(--holiday-green) 0, var(--holiday-green) 5px, rgba(35, 196, 107, 0) 7px),
        radial-gradient(circle, #6ecbff 0, #6ecbff 5px, rgba(110, 203, 255, 0) 7px);
    background-size: 120px 36px;
    background-position: 0 18px, 30px 18px, 60px 18px, 90px 18px;
    animation: garland-move 12s linear infinite;
    filter: drop-shadow(0 0 12px rgba(255, 140, 0, 0.6));
}

.snowflake {
    text-shadow: 0 0 12px rgba(191, 233, 255, 0.8), 0 0 22px rgba(255, 255, 255, 0.6);
    opacity: 0.85;
}

.sparkle {
    box-shadow:
        0 0 10px 2px rgba(255, 255, 255, 0.9),
        0 0 20px 4px rgba(255, 140, 0, 0.7),
        0 0 30px 6px rgba(255, 130, 90, 0.4);
}

@media (max-width: 600px) {
    .confetti {
        display: none;
    }

    .garland {
        height: 28px;
    }

    .garland::before {
        top: 14px;
    }

    .garland::after {
        background-size: 100px 28px;
        background-position: 0 14px, 25px 14px, 50px 14px, 75px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .snowflake,
    .star,
    .sparkle,
    .confetti,
    .garland,
    .new-year-hero::before,
    .new-year-hero::after {
        animation: none !important;
    }
}