/* ========================================
   CHRISTMAS EFFECTS - Tuyết rơi & Trang trí
   Dùng chung cho tất cả các trang
   ======================================== */

/* Snow Container */
.xmas-snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.xmas-snow {
    position: absolute;
    top: -20px;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    -webkit-box-shadow: 0 0 5px rgba(255,255,255,0.9);
    box-shadow: 0 0 5px rgba(255,255,255,0.9);
    -webkit-animation: xmasSnowfall linear infinite;
    animation: xmasSnowfall linear infinite;
}

/* Phân bố tuyết đều */
.xmas-snow:nth-child(1) { left: 2%; width: 5px; height: 5px; -webkit-animation-duration: 10s; animation-duration: 10s; -webkit-animation-delay: 0s; animation-delay: 0s; }
.xmas-snow:nth-child(2) { left: 7%; width: 3px; height: 3px; -webkit-animation-duration: 14s; animation-duration: 14s; -webkit-animation-delay: 1s; animation-delay: 1s; }
.xmas-snow:nth-child(3) { left: 12%; width: 4px; height: 4px; -webkit-animation-duration: 11s; animation-duration: 11s; -webkit-animation-delay: 0.5s; animation-delay: 0.5s; }
.xmas-snow:nth-child(4) { left: 17%; width: 6px; height: 6px; -webkit-animation-duration: 9s; animation-duration: 9s; -webkit-animation-delay: 2s; animation-delay: 2s; }
.xmas-snow:nth-child(5) { left: 22%; width: 4px; height: 4px; -webkit-animation-duration: 12s; animation-duration: 12s; -webkit-animation-delay: 0.3s; animation-delay: 0.3s; }
.xmas-snow:nth-child(6) { left: 27%; width: 5px; height: 5px; -webkit-animation-duration: 10s; animation-duration: 10s; -webkit-animation-delay: 1.5s; animation-delay: 1.5s; }
.xmas-snow:nth-child(7) { left: 32%; width: 3px; height: 3px; -webkit-animation-duration: 13s; animation-duration: 13s; -webkit-animation-delay: 0.8s; animation-delay: 0.8s; }
.xmas-snow:nth-child(8) { left: 37%; width: 6px; height: 6px; -webkit-animation-duration: 8s; animation-duration: 8s; -webkit-animation-delay: 2.5s; animation-delay: 2.5s; }
.xmas-snow:nth-child(9) { left: 42%; width: 4px; height: 4px; -webkit-animation-duration: 11s; animation-duration: 11s; -webkit-animation-delay: 0.2s; animation-delay: 0.2s; }
.xmas-snow:nth-child(10) { left: 47%; width: 5px; height: 5px; -webkit-animation-duration: 10s; animation-duration: 10s; -webkit-animation-delay: 1.8s; animation-delay: 1.8s; }
.xmas-snow:nth-child(11) { left: 52%; width: 3px; height: 3px; -webkit-animation-duration: 14s; animation-duration: 14s; -webkit-animation-delay: 0.6s; animation-delay: 0.6s; }
.xmas-snow:nth-child(12) { left: 57%; width: 6px; height: 6px; -webkit-animation-duration: 9s; animation-duration: 9s; -webkit-animation-delay: 3s; animation-delay: 3s; }
.xmas-snow:nth-child(13) { left: 62%; width: 4px; height: 4px; -webkit-animation-duration: 12s; animation-duration: 12s; -webkit-animation-delay: 1.2s; animation-delay: 1.2s; }
.xmas-snow:nth-child(14) { left: 67%; width: 5px; height: 5px; -webkit-animation-duration: 10s; animation-duration: 10s; -webkit-animation-delay: 0.4s; animation-delay: 0.4s; }
.xmas-snow:nth-child(15) { left: 72%; width: 3px; height: 3px; -webkit-animation-duration: 13s; animation-duration: 13s; -webkit-animation-delay: 2.2s; animation-delay: 2.2s; }
.xmas-snow:nth-child(16) { left: 77%; width: 6px; height: 6px; -webkit-animation-duration: 8s; animation-duration: 8s; -webkit-animation-delay: 0.9s; animation-delay: 0.9s; }
.xmas-snow:nth-child(17) { left: 82%; width: 4px; height: 4px; -webkit-animation-duration: 11s; animation-duration: 11s; -webkit-animation-delay: 1.6s; animation-delay: 1.6s; }
.xmas-snow:nth-child(18) { left: 87%; width: 5px; height: 5px; -webkit-animation-duration: 10s; animation-duration: 10s; -webkit-animation-delay: 0.7s; animation-delay: 0.7s; }
.xmas-snow:nth-child(19) { left: 92%; width: 3px; height: 3px; -webkit-animation-duration: 14s; animation-duration: 14s; -webkit-animation-delay: 2.8s; animation-delay: 2.8s; }
.xmas-snow:nth-child(20) { left: 97%; width: 6px; height: 6px; -webkit-animation-duration: 9s; animation-duration: 9s; -webkit-animation-delay: 1.1s; animation-delay: 1.1s; }

/* Thêm tuyết */
.xmas-snow:nth-child(21) { left: 5%; width: 4px; height: 4px; -webkit-animation-duration: 12s; animation-duration: 12s; -webkit-animation-delay: 3.5s; animation-delay: 3.5s; }
.xmas-snow:nth-child(22) { left: 15%; width: 5px; height: 5px; -webkit-animation-duration: 10s; animation-duration: 10s; -webkit-animation-delay: 4s; animation-delay: 4s; }
.xmas-snow:nth-child(23) { left: 25%; width: 3px; height: 3px; -webkit-animation-duration: 13s; animation-duration: 13s; -webkit-animation-delay: 3.2s; animation-delay: 3.2s; }
.xmas-snow:nth-child(24) { left: 35%; width: 6px; height: 6px; -webkit-animation-duration: 8s; animation-duration: 8s; -webkit-animation-delay: 4.5s; animation-delay: 4.5s; }
.xmas-snow:nth-child(25) { left: 45%; width: 4px; height: 4px; -webkit-animation-duration: 11s; animation-duration: 11s; -webkit-animation-delay: 3.8s; animation-delay: 3.8s; }
.xmas-snow:nth-child(26) { left: 55%; width: 5px; height: 5px; -webkit-animation-duration: 10s; animation-duration: 10s; -webkit-animation-delay: 4.2s; animation-delay: 4.2s; }
.xmas-snow:nth-child(27) { left: 65%; width: 3px; height: 3px; -webkit-animation-duration: 14s; animation-duration: 14s; -webkit-animation-delay: 3.6s; animation-delay: 3.6s; }
.xmas-snow:nth-child(28) { left: 75%; width: 6px; height: 6px; -webkit-animation-duration: 9s; animation-duration: 9s; -webkit-animation-delay: 4.8s; animation-delay: 4.8s; }
.xmas-snow:nth-child(29) { left: 85%; width: 4px; height: 4px; -webkit-animation-duration: 12s; animation-duration: 12s; -webkit-animation-delay: 3.4s; animation-delay: 3.4s; }
.xmas-snow:nth-child(30) { left: 95%; width: 5px; height: 5px; -webkit-animation-duration: 10s; animation-duration: 10s; -webkit-animation-delay: 5s; animation-delay: 5s; }

@-webkit-keyframes xmasSnowfall {
    0% { 
        -webkit-transform: translateY(-20px) translateX(0);
        transform: translateY(-20px) translateX(0);
        opacity: 0; 
    }
    5% { opacity: 1; }
    50% {
        -webkit-transform: translateY(50vh) translateX(15px);
        transform: translateY(50vh) translateX(15px);
    }
    90% { opacity: 0.7; }
    100% { 
        -webkit-transform: translateY(100vh) translateX(-10px);
        transform: translateY(100vh) translateX(-10px);
        opacity: 0; 
    }
}

@keyframes xmasSnowfall {
    0% { 
        -webkit-transform: translateY(-20px) translateX(0);
        transform: translateY(-20px) translateX(0);
        opacity: 0; 
    }
    5% { opacity: 1; }
    50% {
        -webkit-transform: translateY(50vh) translateX(15px);
        transform: translateY(50vh) translateX(15px);
    }
    90% { opacity: 0.7; }
    100% { 
        -webkit-transform: translateY(100vh) translateX(-10px);
        transform: translateY(100vh) translateX(-10px);
        opacity: 0; 
    }
}

/* Christmas Lights - Dây đèn trang trí */
.xmas-lights {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    height: 30px;
    z-index: 999;
    pointer-events: none;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    gap: 25px;
    padding: 0 20px;
    overflow: hidden;
}

.xmas-light {
    width: 12px;
    height: 18px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    position: relative;
    -webkit-animation: lightGlow 1.5s ease-in-out infinite;
    animation: lightGlow 1.5s ease-in-out infinite;
}

.xmas-light::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    -webkit-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
    width: 4px;
    height: 6px;
    background: #333;
    border-radius: 2px 2px 0 0;
}

.xmas-light.red { background: #ff3333; -webkit-box-shadow: 0 0 10px #ff3333; box-shadow: 0 0 10px #ff3333; }
.xmas-light.green { background: #00cc44; -webkit-box-shadow: 0 0 10px #00cc44; box-shadow: 0 0 10px #00cc44; -webkit-animation-delay: 0.3s; animation-delay: 0.3s; }
.xmas-light.gold { background: #ffd700; -webkit-box-shadow: 0 0 10px #ffd700; box-shadow: 0 0 10px #ffd700; -webkit-animation-delay: 0.6s; animation-delay: 0.6s; }
.xmas-light.blue { background: #4fc3f7; -webkit-box-shadow: 0 0 10px #4fc3f7; box-shadow: 0 0 10px #4fc3f7; -webkit-animation-delay: 0.9s; animation-delay: 0.9s; }

@-webkit-keyframes lightGlow {
    0%, 100% { opacity: 1; -webkit-transform: scale(1); transform: scale(1); }
    50% { opacity: 0.5; -webkit-transform: scale(0.9); transform: scale(0.9); }
}

@keyframes lightGlow {
    0%, 100% { opacity: 1; -webkit-transform: scale(1); transform: scale(1); }
    50% { opacity: 0.5; -webkit-transform: scale(0.9); transform: scale(0.9); }
}

/* Christmas Corner Decorations */
.xmas-corner {
    position: fixed;
    z-index: 998;
    pointer-events: none;
}

.xmas-corner.top-left {
    top: 60px;
    left: 0;
    width: 100px;
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M0 0 Q50 20 100 0 L100 30 Q50 50 0 30 Z" fill="%23165b33"/><circle cx="20" cy="15" r="5" fill="%23ff3333"/><circle cx="50" cy="10" r="4" fill="%23ffd700"/><circle cx="80" cy="15" r="5" fill="%23ff3333"/></svg>') no-repeat;
    background-size: contain;
}

.xmas-corner.top-right {
    top: 60px;
    right: 0;
    width: 100px;
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M0 0 Q50 20 100 0 L100 30 Q50 50 0 30 Z" fill="%23165b33"/><circle cx="20" cy="15" r="5" fill="%23ff3333"/><circle cx="50" cy="10" r="4" fill="%23ffd700"/><circle cx="80" cy="15" r="5" fill="%23ff3333"/></svg>') no-repeat;
    background-size: contain;
    -webkit-transform: scaleX(-1);
    -ms-transform: scaleX(-1);
    transform: scaleX(-1);
}

/* Hide decorations on mobile */
@media screen and (max-width: 768px) {
    .xmas-lights {
        gap: 15px;
    }
    
    .xmas-light {
        width: 8px;
        height: 12px;
    }
    
    .xmas-corner {
        display: none;
    }
}

@media screen and (max-width: 480px) {
    .xmas-lights {
        display: none;
    }
}
