/* ========================================
   Christmas Snow Effect
   ======================================== */

/* Snowflake container */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background-image: 
        radial-gradient(4px 4px at 100px 50px, #fff, transparent),
        radial-gradient(6px 6px at 200px 150px, #fff, transparent),
        radial-gradient(3px 3px at 300px 250px, #fff, transparent),
        radial-gradient(4px 4px at 400px 350px, #fff, transparent),
        radial-gradient(6px 6px at 500px 100px, #fff, transparent),
        radial-gradient(3px 3px at 50px 200px, #fff, transparent),
        radial-gradient(4px 4px at 150px 300px, #fff, transparent),
        radial-gradient(6px 6px at 250px 400px, #fff, transparent),
        radial-gradient(3px 3px at 350px 500px, #fff, transparent),
        radial-gradient(4px 4px at 450px 50px, #fff, transparent);
    background-size: 550px 650px;
    animation: snowfall 20s linear infinite;
    opacity: 0.8;
}

/* Second layer of snow */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    background-image: 
        radial-gradient(3px 3px at 120px 80px, #fff, transparent),
        radial-gradient(5px 5px at 220px 180px, #fff, transparent),
        radial-gradient(4px 4px at 320px 280px, #fff, transparent),
        radial-gradient(3px 3px at 420px 380px, #fff, transparent),
        radial-gradient(5px 5px at 520px 130px, #fff, transparent),
        radial-gradient(4px 4px at 70px 230px, #fff, transparent),
        radial-gradient(3px 3px at 170px 330px, #fff, transparent),
        radial-gradient(5px 5px at 270px 430px, #fff, transparent),
        radial-gradient(4px 4px at 370px 530px, #fff, transparent),
        radial-gradient(3px 3px at 470px 80px, #fff, transparent);
    background-size: 600px 700px;
    animation: snowfall 15s linear infinite;
    opacity: 0.6;
}

/* Snowfall animation */
@keyframes snowfall {
    0% {
        background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
    }
    100% {
        background-position: 
            50px 650px,
            100px 700px,
            -50px 650px,
            150px 700px,
            -100px 650px,
            200px 700px,
            -150px 650px,
            250px 700px,
            -200px 650px,
            300px 700px;
    }
}

/* Snowflake elements (alternative method using divs - requires JavaScript) */
.snowflake {
    position: fixed;
    top: -10px;
    z-index: 9999;
    color: #fff;
    font-size: 1em;
    font-family: Arial, sans-serif;
    text-shadow: 0 0 5px #000;
    pointer-events: none;
    animation-name: snowflakes-fall, snowflakes-shake;
    animation-duration: 10s, 3s;
    animation-timing-function: linear, ease-in-out;
    animation-iteration-count: infinite, infinite;
    animation-play-state: running, running;
}

.snowflake:nth-of-type(0) {
    left: 1%;
    animation-delay: 0s, 0s;
}

.snowflake:nth-of-type(1) {
    left: 10%;
    animation-delay: 1s, 1s;
}

.snowflake:nth-of-type(2) {
    left: 20%;
    animation-delay: 6s, 0.5s;
}

.snowflake:nth-of-type(3) {
    left: 30%;
    animation-delay: 4s, 2s;
}

.snowflake:nth-of-type(4) {
    left: 40%;
    animation-delay: 2s, 2s;
}

.snowflake:nth-of-type(5) {
    left: 50%;
    animation-delay: 8s, 3s;
}

.snowflake:nth-of-type(6) {
    left: 60%;
    animation-delay: 6s, 2s;
}

.snowflake:nth-of-type(7) {
    left: 70%;
    animation-delay: 2.5s, 1s;
}

.snowflake:nth-of-type(8) {
    left: 80%;
    animation-delay: 1s, 0s;
}

.snowflake:nth-of-type(9) {
    left: 90%;
    animation-delay: 3s, 1.5s;
}

/* Falling animation */
@keyframes snowflakes-fall {
    0% {
        top: -10%;
    }
    100% {
        top: 100%;
    }
}

/* Shake animation */
@keyframes snowflakes-shake {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(80px);
    }
}

/* Optimize snow effect on mobile */
@media (max-width: 768px) {
    body::before,
    body::after {
        opacity: 0.5;
        animation-duration: 15s, 12s;
    }
}

/* ========================================
   Christmas Cat - Bottom Right Corner
   ======================================== */

.christmas-cat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9997;
    animation: catBounce 3s ease-in-out infinite;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.christmas-cat-container:hover {
    transform: scale(1.1);
}

.cat-message {
    position: absolute;
    bottom: 100%;
    right: 0;
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    color: #fff;
    padding: 15px 20px;
    border-radius: 20px;
    margin-bottom: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    font-family: 'Mulish', sans-serif;
    font-weight: 600;
    font-size: 14px;
    opacity: 0;
    animation: messageSlideIn 1s ease forwards 0.5s;
    text-align: center;
}

.cat-message::before {
    /* content: "🎄"; */
    margin-right: 8px;
    font-size: 16px;
}

/* .cat-message::after {
    content: "";
    position: absolute;
    bottom: -10px;
    right: 30px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #764ba2;
} */

.cat-image {
    width: 120px;
    height: 120px;
    /* background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: visible;
}

.cat-image::before {
    content: "🎅";
    position: absolute;
    top: -15px;
    right: -10px;
    font-size: 30px;
    animation: hatWiggle 2s ease-in-out infinite;
}

.cat-logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
    animation: catWave 2s ease-in-out infinite;
    display: inline-block;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

/* Sparkles around cat */
.sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #ffd700;
    border-radius: 50%;
    animation: sparkleAnimation 2s ease-in-out infinite;
}

.sparkle:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.sparkle:nth-child(2) {
    top: 20%;
    right: 15%;
    animation-delay: 0.5s;
}

.sparkle:nth-child(3) {
    bottom: 30%;
    left: 5%;
    animation-delay: 1s;
}

.sparkle:nth-child(4) {
    bottom: 15%;
    right: 10%;
    animation-delay: 1.5s;
}

/* Animations */
@keyframes catBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes catWave {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

@keyframes hatWiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-15deg);
    }
    75% {
        transform: rotate(15deg);
    }
}

@keyframes sparkleAnimation {
    0%, 100% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

/* Responsive - hide on small mobile */
@media (max-width: 480px) {
    .christmas-cat-container {
        bottom: 10px;
        right: 10px;
        transform: scale(0.8);
    }
    
    .cat-image {
        width: 80px;
        height: 80px;
        font-size: 40px;
    }
    
    .cat-logo {
        width: 60px;
        height: 60px;
    }
    
    .cat-message {
        font-size: 11px;
        padding: 10px 12px;
        white-space: normal;
        max-width: 150px;
    }
}

@media (max-width: 360px) {
    .christmas-cat-container {
        display: none;
    }
}
