/* ===== Christmas Theme for Friendoza ===== */
/* Новогоднее оформление страницы авторизации */

/* Праздничные цвета */
:root {
    --christmas-red: #d42426;
    --christmas-green: #165b33;
    --christmas-gold: #ffd700;
    --christmas-white: #ffffff;
    --christmas-snow: #f0f8ff;
}

/* ===== Снежинки падающие ===== */
@keyframes snowfall {
    0% {
        transform: translateY(-10vh) translateX(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) translateX(100px) rotate(360deg);
        opacity: 0.3;
    }
}

@keyframes snowfall-left {
    0% {
        transform: translateY(-10vh) translateX(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) translateX(-100px) rotate(-360deg);
        opacity: 0.3;
    }
}

.snowflake {
    position: fixed;
    top: -10vh;
    z-index: 1;
    color: var(--christmas-white);
    font-size: 1em;
    pointer-events: none;
    animation: snowfall linear infinite;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

/* Создаём 20 снежинок с разными параметрами */
.snowflake:nth-child(1) { left: 10%; animation-duration: 10s; animation-delay: 0s; font-size: 1.2em; }
.snowflake:nth-child(2) { left: 20%; animation-duration: 12s; animation-delay: 1s; font-size: 0.9em; animation-name: snowfall-left; }
.snowflake:nth-child(3) { left: 30%; animation-duration: 8s; animation-delay: 2s; font-size: 1.5em; }
.snowflake:nth-child(4) { left: 40%; animation-duration: 15s; animation-delay: 0.5s; font-size: 1em; animation-name: snowfall-left; }
.snowflake:nth-child(5) { left: 50%; animation-duration: 11s; animation-delay: 1.5s; font-size: 1.3em; }
.snowflake:nth-child(6) { left: 60%; animation-duration: 9s; animation-delay: 2.5s; font-size: 0.8em; animation-name: snowfall-left; }
.snowflake:nth-child(7) { left: 70%; animation-duration: 13s; animation-delay: 0.8s; font-size: 1.1em; }
.snowflake:nth-child(8) { left: 80%; animation-duration: 14s; animation-delay: 1.8s; font-size: 1.4em; animation-name: snowfall-left; }
.snowflake:nth-child(9) { left: 90%; animation-duration: 10s; animation-delay: 2.2s; font-size: 1em; }
.snowflake:nth-child(10) { left: 5%; animation-duration: 12s; animation-delay: 3s; font-size: 1.2em; animation-name: snowfall-left; }
.snowflake:nth-child(11) { left: 15%; animation-duration: 11s; animation-delay: 0.3s; font-size: 0.9em; }
.snowflake:nth-child(12) { left: 25%; animation-duration: 13s; animation-delay: 1.2s; font-size: 1.3em; animation-name: snowfall-left; }
.snowflake:nth-child(13) { left: 35%; animation-duration: 9s; animation-delay: 2.8s; font-size: 1em; }
.snowflake:nth-child(14) { left: 45%; animation-duration: 14s; animation-delay: 0.7s; font-size: 1.1em; animation-name: snowfall-left; }
.snowflake:nth-child(15) { left: 55%; animation-duration: 10s; animation-delay: 1.9s; font-size: 1.4em; }
.snowflake:nth-child(16) { left: 65%; animation-duration: 12s; animation-delay: 2.6s; font-size: 0.8em; animation-name: snowfall-left; }
.snowflake:nth-child(17) { left: 75%; animation-duration: 8s; animation-delay: 0.4s; font-size: 1.2em; }
.snowflake:nth-child(18) { left: 85%; animation-duration: 15s; animation-delay: 1.4s; font-size: 1em; animation-name: snowfall-left; }
.snowflake:nth-child(19) { left: 95%; animation-duration: 11s; animation-delay: 2.4s; font-size: 1.3em; }
.snowflake:nth-child(20) { left: 12%; animation-duration: 13s; animation-delay: 3.2s; font-size: 0.9em; animation-name: snowfall-left; }

/* ===== Гирлянда сверху ===== */
@keyframes lights {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.christmas-lights {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    z-index: 10;
    pointer-events: none;
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding-top: 10px;
}

.light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: relative;
    animation: lights 2s infinite;
    box-shadow: 0 0 10px currentColor;
}

.light::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    width: 1px;
    height: 10px;
    background: rgba(255, 255, 255, 0.3);
}

.light:nth-child(3n+1) {
    background: var(--christmas-red);
    color: var(--christmas-red);
    animation-delay: 0s;
}

.light:nth-child(3n+2) {
    background: var(--christmas-gold);
    color: var(--christmas-gold);
    animation-delay: 0.7s;
}

.light:nth-child(3n+3) {
    background: var(--christmas-green);
    color: var(--christmas-green);
    animation-delay: 1.4s;
}

/* ===== Рождественский фон ===== */
#authScreen.christmas-theme {
    background: linear-gradient(135deg, 
        #165b33 0%, 
        #1e7e34 25%, 
        #0ea5e9 50%, 
        #1e7e34 75%, 
        #165b33 100%
    );
    position: relative;
    overflow: hidden;
}

/* Сугробы снизу */
#authScreen.christmas-theme::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.3));
    border-radius: 100% 100% 0 0;
    pointer-events: none;
}

/* ===== Праздничная карточка входа ===== */
.auth-container.christmas-theme {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(240, 248, 255, 0.98) 100%
    );
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 215, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(255, 215, 0, 0.2);
    position: relative;
}

/* Золотая рамка с украшениями */
.auth-container.christmas-theme::before {
    content: '🎄';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 30px;
    background: white;
    padding: 5px 15px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ===== Праздничные кнопки ===== */
.christmas-theme .btn-primary {
    background: linear-gradient(135deg, var(--christmas-red) 0%, #a01618 100%);
    box-shadow: 
        0 4px 15px rgba(212, 36, 38, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(160, 22, 24, 0.5);
    position: relative;
    overflow: hidden;
}

.christmas-theme .btn-primary::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.christmas-theme .btn-primary:hover {
    background: linear-gradient(135deg, #a01618 0%, var(--christmas-red) 100%);
    box-shadow: 
        0 6px 20px rgba(212, 36, 38, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.christmas-theme .btn-secondary {
    background: linear-gradient(135deg, var(--christmas-green) 0%, #0f3d20 100%);
    color: white;
    box-shadow: 
        0 4px 15px rgba(22, 91, 51, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(15, 61, 32, 0.5);
}

.christmas-theme .btn-secondary:hover {
    background: linear-gradient(135deg, #0f3d20 0%, var(--christmas-green) 100%);
}

/* ===== Праздничные акценты ===== */
.christmas-theme .auth-switch a {
    color: var(--christmas-red);
    font-weight: 700;
}

.christmas-theme .auth-switch a:hover {
    background-color: rgba(212, 36, 38, 0.1);
    text-decoration: none;
}

.christmas-theme .brand-name {
    background: linear-gradient(135deg, 
        var(--christmas-red) 0%, 
        var(--christmas-gold) 50%, 
        var(--christmas-green) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.christmas-theme .brand-slogan {
    color: var(--christmas-green);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* ===== Золотые звёздочки по углам ===== */
@keyframes twinkle {
    0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
    50% { opacity: 0.5; transform: scale(1.2) rotate(180deg); }
}

.christmas-star {
    position: absolute;
    color: var(--christmas-gold);
    font-size: 20px;
    animation: twinkle 2s infinite;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    pointer-events: none;
}

.christmas-star.top-left { top: 20px; left: 20px; animation-delay: 0s; }
.christmas-star.top-right { top: 20px; right: 20px; animation-delay: 0.5s; }
.christmas-star.bottom-left { bottom: 20px; left: 20px; animation-delay: 1s; }
.christmas-star.bottom-right { bottom: 20px; right: 20px; animation-delay: 1.5s; }

/* ===== Праздничные иконки в полях ===== */
.christmas-theme .form-group label::before {
    content: '🎁 ';
    margin-right: 4px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .christmas-lights {
        height: 60px;
    }
    
    .light {
        width: 10px;
        height: 10px;
    }
    
    .snowflake {
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .christmas-lights {
        height: 50px;
        padding-top: 5px;
    }
    
    .light {
        width: 8px;
        height: 8px;
    }
    
    .snowflake {
        font-size: 0.6em;
    }
    
    .auth-container.christmas-theme::before {
        font-size: 24px;
        top: -12px;
        padding: 4px 12px;
    }
    
    .christmas-star {
        font-size: 16px;
    }
}

/* ===== Toggle для включения/выключения темы ===== */
.christmas-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: linear-gradient(135deg, var(--christmas-red), var(--christmas-green));
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.christmas-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.christmas-toggle:active {
    transform: scale(0.95);
}

/* ===== Праздничное сообщение ===== */
.christmas-message {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95), 
        rgba(255, 215, 0, 0.2)
    );
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-weight: 600;
    color: var(--christmas-red);
    z-index: 100;
    animation: slideDown 0.5s ease;
    border: 2px solid rgba(255, 215, 0, 0.5);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.christmas-message::before {
    content: '🎅 ';
}

.christmas-message::after {
    content: ' 🎄';
}
