/* Новогодние анимации и эффекты */

/* Снежинки в модальном окне */
.modal-snow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.modal-snowflake {
    position: absolute;
    color: white;
    font-size: 0.8em;
    opacity: 0.6;
    animation: modalSnowfall 4s linear infinite;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

@keyframes modalSnowfall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(600px) rotate(360deg);
        opacity: 0;
    }
}

/* Страница успешного оформления заказа */
.order-success-page {
    min-height: 100vh;
    width: 100%;
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    position: fixed;
    inset: 0;
    overflow-y: auto;
    z-index: 9999;
    box-sizing: border-box;
}

.order-success-glow {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 50% 15%, rgba(var(--primary-rgb, 147, 51, 234), 0.2) 0%, transparent 42%),
        radial-gradient(circle at 85% 85%, rgba(var(--primary-light-rgb, 192, 132, 252), 0.08) 0%, transparent 35%);
    pointer-events: none;
}

.order-success-content {
    background: var(--surface);
    border-radius: 20px;
    padding: 20px 18px 18px;
    width: min(100%, 440px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 2;
    color: var(--text);
    animation: contentFadeIn 0.35s ease-out;
    border: 1px solid var(--border);
    box-sizing: border-box;
}

.order-success-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--primary-light-rgb, 192, 132, 252), 0.7), transparent);
}

.success-header-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.success-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(var(--primary-rgb, 147, 51, 234), 0.15);
    border: 1px solid rgba(var(--primary-rgb, 147, 51, 234), 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(var(--primary-rgb, 147, 51, 234), 0.25);
}

.success-check-icon {
    width: 26px;
    height: 26px;
    color: var(--primary-light);
}

.success-icon {
    display: none;
}

@keyframes celebrationBackground {
    0%, 100% {
        background: linear-gradient(135deg, 
            var(--primary) 0%, 
            var(--primary-dark) 20%, 
            var(--primary-light) 40%,
            var(--primary-ultra-light) 80%,
            var(--primary-ultra-light) 100%);
    }
    50% {
        background: linear-gradient(135deg, 
            var(--primary-dark) 0%, 
            var(--primary-light) 20%, 
            var(--primary-ultra-light) 40%,
            var(--primary-ultra-light) 80%,
            var(--primary) 100%);
    }
}

.newyear-celebration::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(var(--primary-light-rgb, 192, 132, 252), 0.25) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(var(--primary-light-rgb, 192, 132, 252), 0.1) 0%, transparent 60%);
    animation: celebrationGlow 8s ease-in-out infinite;
    z-index: 1;
}

.newyear-celebration::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.03) 2px,
            rgba(255, 255, 255, 0.03) 4px
        );
    pointer-events: none;
    z-index: 1;
}

@keyframes celebrationGlow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes contentFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes iconBounce {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.15) rotate(-5deg);
    }
    50% {
        transform: scale(1.2) rotate(5deg);
    }
    75% {
        transform: scale(1.15) rotate(-3deg);
    }
}


/* Огоньки */
.fireworks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.firework {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    animation: fireworkExplode 2s ease-out infinite;
}

@keyframes fireworkExplode {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(20);
        opacity: 0;
    }
}

.firework:nth-child(1) {
    top: 20%;
    left: 20%;
    background: #ffeb3b;
    animation-delay: 0s;
}

.firework:nth-child(2) {
    top: 30%;
    right: 20%;
    background: #f44336;
    animation-delay: 0.5s;
}

.firework:nth-child(3) {
    bottom: 30%;
    left: 30%;
    background: #2196f3;
    animation-delay: 1s;
}

.firework:nth-child(4) {
    bottom: 20%;
    right: 30%;
    background: #4caf50;
    animation-delay: 1.5s;
}

.firework:nth-child(5) {
    top: 50%;
    left: 50%;
    background: #ff9800;
    animation-delay: 0.3s;
}

/* Звезды */
.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: starTwinkle 2s ease-in-out infinite;
}

@keyframes starTwinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

.success-title {
    font-size: 22px;
    font-weight: 800;
    margin: 0;
    color: var(--text);
    letter-spacing: -0.2px;
    line-height: 1.15;
    text-align: left;
}

.success-subtitle,
.success-message {
    display: none;
}

.success-reward-promo {
    width: 100%;
    margin: 0 0 16px;
    padding: 14px;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, rgba(var(--primary-rgb, 147, 51, 234), 0.1) 100%);
    border: 1px solid rgba(var(--primary-rgb, 147, 51, 234), 0.22);
    text-align: left;
    box-sizing: border-box;
}

.success-reward-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.success-reward-badge {
    font-size: 12px;
    font-weight: 700;
    color: #ffd966;
}

.success-reward-discount {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary-light);
}

.success-reward-code {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px dashed rgba(var(--primary-rgb, 147, 51, 234), 0.4);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--primary-light);
    text-align: center;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.success-reward-copy {
    width: 100%;
    padding: 11px 14px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 8px;
}

.success-reward-meta {
    margin: 0 0 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.success-reward-note {
    margin: 0;
    font-size: 11px;
    line-height: 1.45;
    color: var(--text-secondary);
}

.success-reward-lead,
.success-reward-code-row,
.success-reward-rules {
    display: none;
}

.success-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.success-continue-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: 1px solid rgba(var(--primary-rgb, 147, 51, 234), 0.5);
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 22px rgba(var(--primary-rgb, 147, 51, 234), 0.35);
    transition: all 0.25s;
}

.success-continue-btn:active {
    transform: scale(0.98);
}

.success-secondary-btn {
    width: 100%;
    padding: 13px 20px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
}

.success-secondary-btn:active {
    transform: scale(0.98);
    border-color: var(--primary);
    color: var(--primary-light);
}

/* Дополнительные снежинки на странице поздравления */
.celebration-snowflake {
    position: absolute;
    color: white;
    font-size: 1.2em;
    opacity: 0.7;
    animation: celebrationSnowfall 8s linear infinite;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    pointer-events: none;
}

@keyframes celebrationSnowfall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Анимация для карточек товаров */
.product-card {
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        rgba(255, 193, 7, 0.3) 0%,
        rgba(33, 150, 243, 0.3) 25%,
        rgba(76, 175, 80, 0.3) 50%,
        rgba(156, 39, 176, 0.3) 75%,
        rgba(255, 193, 7, 0.3) 100%);
    background-size: 400% 400%;
    border-radius: 18px;
    z-index: -1;
    opacity: 0;
    animation: cardGlow 3s ease-in-out infinite;
    transition: opacity 0.3s;
}

.product-card:hover::before {
    opacity: 1;
}

@keyframes cardGlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Анимация для кнопок */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

/* Новогодние иконки на навигации - отключены */

/* ============================================
   ДОПОЛНИТЕЛЬНЫЕ НОВОГОДНИЕ ЭФФЕКТЫ
   ============================================ */

/* Современные рамки для карточек товаров */
.product-card {
    position: relative;
    overflow: visible;
}

.product-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, 
        var(--primary) 0%,
        var(--primary-light) 25%,
        var(--primary-light) 50%,
        var(--primary-light) 75%,
        var(--primary) 100%);
    background-size: 400% 400%;
    border-radius: 18px;
    z-index: -1;
    opacity: 0;
    animation: cardBorderGlow 4s ease-in-out infinite;
    transition: opacity 0.3s;
}

.product-card:hover::before {
    opacity: 0.4;
}

@keyframes cardBorderGlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* 6. Улучшенные фоновые эффекты - звезды */
.stars-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.star-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: starTwinkleBg 3s ease-in-out infinite;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
}

@keyframes starTwinkleBg {
    0%, 100% {
        opacity: 0.2;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

/* Эффект инея по краям */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0%, transparent 2%, transparent 98%, rgba(255, 255, 255, 0.1) 100%),
        linear-gradient(0deg, rgba(255, 255, 255, 0.1) 0%, transparent 2%, transparent 98%, rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
}

/* Header эффекты - убраны новогодние элементы */
.header {
    position: relative;
    overflow: hidden;
}

.header h1 {
    position: relative;
    z-index: 2;
}

/* 4. Анимированные новогодние иконки в навигации - отключены */

/* 8. Кнопки в новогоднем стиле */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, var(--primary) 100%);
    background-size: 200% 200%;
    animation: buttonGradient 3s ease infinite;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb, 147, 51, 234), 0.4), 0 0 20px rgba(var(--primary-rgb, 147, 51, 234), 0.3);
}

@keyframes buttonGradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(var(--primary-rgb, 147, 51, 234), 0.6), 0 0 30px rgba(var(--primary-light-rgb, 192, 132, 252), 0.4);
    transform: translateY(-2px);
}

/* Эффект конфетти при клике на кнопку */
@keyframes confetti {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* 9. Новогодние модальные окна */
.modal {
    position: relative;
}

.modal::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(45deg, 
        var(--newyear-gold) 0%,
        var(--newyear-red) 25%,
        var(--primary) 50%,
        var(--newyear-green) 75%,
        var(--newyear-gold) 100%);
    background-size: 400% 400%;
    border-radius: 20px;
    z-index: -1;
    opacity: 0.3;
    animation: modalBorderGlow 4s ease-in-out infinite;
}

@keyframes modalBorderGlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.modal-content {
    position: relative;
    z-index: 1;
}

/* Снег в модальных окнах */
.modal-snow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
    border-radius: 16px;
}

/* 10. Специальные новогодние баннеры */
.newyear-banner-enhanced {
    position: relative;
    overflow: hidden;
}

.newyear-banner-enhanced::before {
    content: '🎄✨🎁❄';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    font-size: 20px;
    text-align: center;
    opacity: 0.3;
    animation: bannerEmojiFloat 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes bannerEmojiFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(10px);
    }
}

/* 11. Новогодние переходы между страницами */
@keyframes pageTransitionIn {
    from {
        opacity: 0;
        transform: scale(0.95);
        filter: blur(5px);
    }
    to {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

.content {
    animation: pageTransitionIn 0.4s ease-out;
}

/* Эффект конфетти при переходе */
@keyframes confettiExplosion {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(720deg);
        opacity: 0;
    }
}

/* Счетчик до Нового года - удален */

/* Эффект взрыва при добавлении в корзину */
@keyframes cartExplosion {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.5) rotate(180deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(2) rotate(360deg);
        opacity: 0;
    }
}

/* Улучшенные снежинки с параллакс эффектом */
.snowflake {
    will-change: transform;
}

.snowflake:nth-child(3n) {
    animation-duration: 20s;
}

.snowflake:nth-child(3n+1) {
    animation-duration: 25s;
}

.snowflake:nth-child(3n+2) {
    animation-duration: 15s;
}

/* Новогодние элементы header удалены */

