/* Christmas Theme Styles */

/* Preloader */
#christmas-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0a0a0a;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loader-content {
    text-align: center;
    position: relative;
}

.tree-icon {
    font-size: 4rem;
    color: #25D366;
    animation: tree-bounce 2s infinite ease-in-out;
    filter: drop-shadow(0 0 10px rgba(37, 211, 102, 0.5));
}

.loader-text {
    margin-top: 20px;
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    color: white;
    letter-spacing: 2px;
}

.loader-dots::after {
    content: '.';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes tree-bounce {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-10px) scale(1.1);
    }
}

@keyframes dots {

    0%,
    20% {
        content: '.';
    }

    40% {
        content: '..';
    }

    60% {
        content: '...';
    }

    80%,
    100% {
        content: '';
    }
}

/* Snow Animation */
.snowflake {
    color: #fff;
    font-size: 1em;
    font-family: Arial, sans-serif;
    text-shadow: 0 0 5px #000;
    position: fixed;
    top: -10%;
    z-index: 9998;
    /* Behind loader but above content */
    user-select: none;
    cursor: default;
    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;
    opacity: 0.8;
    pointer-events: none;
}

@keyframes snowflakes-fall {
    0% {
        top: -10%;
    }

    100% {
        top: 100%;
    }
}

@keyframes snowflakes-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(80px);
    }
}

/* Randomize snowflakes */
.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;
}

.snowflake:nth-of-type(10) {
    left: 25%;
    animation-delay: 2s, 0s;
}

.snowflake:nth-of-type(11) {
    left: 65%;
    animation-delay: 4s, 2.5s;
}

/* Christmas Accents */
.christmas-text-gradient {
    background: linear-gradient(to right, #ffffff, #e62239, #25D366);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.christmas-card-border {
    border-color: rgba(230, 34, 57, 0.5);
    box-shadow: 0 0 15px rgba(37, 211, 102, 0.1);
}

.christmas-card-border:hover {
    border-color: #25D366;
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.3);
}

.christmas-badge {
    background: linear-gradient(135deg, #e62239 0%, #b91c2e 100%);
    border: 1px solid #fff;
}

/* Christmas Lights */
.christmas-lights {
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    position: absolute;
    z-index: 1;
    margin: -15px 0 0 0;
    padding: 0;
    pointer-events: none;
    width: 100%;
}

.christmas-lights li {
    position: relative;
    animation-fill-mode: both;
    animation-iteration-count: infinite;
    list-style: none;
    margin: 0;
    padding: 0;
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 20px;
    display: inline-block;
    background: #00f7a5;
    box-shadow: 0px 4.66667px 24px 3px #00f7a5;
    animation-name: flash-1;
    animation-duration: 2s;
}

.christmas-lights li:nth-child(2n+1) {
    background: #ff0000;
    box-shadow: 0px 4.66667px 24px 3px #ff0000;
    animation-name: flash-2;
    animation-duration: 0.4s;
}

.christmas-lights li:nth-child(4n+2) {
    background: #f70094;
    box-shadow: 0px 4.66667px 24px 3px #f70094;
    animation-name: flash-3;
    animation-duration: 1.1s;
}

.christmas-lights li:nth-child(odd) {
    animation-duration: 1.8s;
}

.christmas-lights li:nth-child(3n+1) {
    animation-duration: 1.4s;
}

.christmas-lights li:before {
    content: "";
    position: absolute;
    background: #222;
    width: 10px;
    height: 9.33333px;
    border-radius: 3px;
    top: -4.66667px;
    left: 1px;
}

.christmas-lights li:after {
    content: "";
    top: -14px;
    left: 9px;
    position: absolute;
    width: 52px;
    height: 18.66667px;
    border-bottom: solid #222 2px;
    border-radius: 50%;
}

.christmas-lights li:last-child:after {
    content: none;
}

.christmas-lights li:first-child {
    margin-left: -40px;
}

@keyframes flash-1 {

    0%,
    100% {
        background: #00f7a5;
        box-shadow: 0px 4.66667px 24px 3px #00f7a5;
    }

    50% {
        background: rgba(0, 247, 165, 0.4);
        box-shadow: 0px 4.66667px 24px 3px rgba(0, 247, 165, 0.2);
    }
}

@keyframes flash-2 {

    0%,
    100% {
        background: #ff0000;
        box-shadow: 0px 4.66667px 24px 3px #ff0000;
    }

    50% {
        background: rgba(255, 0, 0, 0.4);
        box-shadow: 0px 4.66667px 24px 3px rgba(255, 0, 0, 0.2);
    }
}

@keyframes flash-3 {

    0%,
    100% {
        background: #f70094;
        box-shadow: 0px 4.66667px 24px 3px #f70094;
    }

    50% {
        background: rgba(247, 0, 148, 0.4);
        box-shadow: 0px 4.66667px 24px 3px rgba(247, 0, 148, 0.2);
    }
}

/* Snow on Cards */
.snow-capped {
    position: relative;
    overflow: visible !important;
    /* Allow snow to hang off */
}

.snow-capped::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -2px;
    right: -2px;
    height: 20px;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMjAiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPjxwYXRoIGQ9Ik0wIDIwIFYgMTAgQyAxMCAxMCAxNSAwIDI1IDAgQyAzNSAwIDQwIDEwIDUwIDEwIEMgNjAgMTAgNjUgMCA3NSAwIEMgODUgMCA5MCAxMCAxMDAgMTAgViAyMCBaIiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAuOSIvPjwvc3ZnPg==');
    background-size: 50% 100%;
    z-index: 25;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1));
    border-radius: 15px 15px 0 0;
    pointer-events: none;
}

/* Frosted Glass Effect */
.frosted-ice {
    position: relative;
}

.frosted-ice::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: 20;
    box-shadow: inset 0 0 20px rgba(200, 230, 255, 0.1);
}

/* Magic Cursor */
.magic-cursor {
    width: 20px;
    height: 20px;
    border: 1px solid white;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s;
    mix-blend-mode: difference;
}

.cursor-sparkle {
    position: fixed;
    width: 4px;
    height: 4px;
    background: #FFD700;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    animation: sparkle-fade 1s forwards;
}

@keyframes sparkle-fade {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(0);
        opacity: 0;
        top: -20px;
    }
}

/* Gift Box */
.gift-box-container {
    position: fixed;
    bottom: 100px;
    left: 30px;
    z-index: 50;
    cursor: pointer;
    animation: float-gift 3s ease-in-out infinite;
}

.gift-box {
    font-size: 3rem;
    color: #e62239;
    filter: drop-shadow(0 0 10px rgba(230, 34, 57, 0.5));
    transition: transform 0.3s;
}

.gift-box:hover {
    transform: scale(1.1) rotate(10deg);
}

.gift-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(10, 10, 10, 0.95);
    border: 2px solid #e62239;
    padding: 2rem;
    border-radius: 1rem;
    z-index: 100;
    text-align: center;
    box-shadow: 0 0 50px rgba(230, 34, 57, 0.3);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 90%;
    width: 400px;
}

.gift-modal.active {
    transform: translate(-50%, -50%) scale(1);
}

.gift-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.gift-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

@keyframes float-gift {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}



/* Grinch Mode */
body.grinch-mode {
    background-color: #051a05 !important;
}

body.grinch-mode .text-storck-red {
    color: #32CD32 !important;
}

body.grinch-mode .bg-storck-red {
    background-color: #32CD32 !important;
}

body.grinch-mode .border-storck-red {
    border-color: #32CD32 !important;
}

body.grinch-mode .snowflake {
    color: #32CD32 !important;
    /* Toxic rain? */
    animation-duration: 2s !important;
    /* Fast rain */
}

/* Speed Test Modal */
.speed-test-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: #1a1a1a;
    border: 2px solid #fff;
    padding: 2rem;
    border-radius: 1rem;
    z-index: 100;
    text-align: center;
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.2);
    transition: transform 0.3s;
    width: 350px;
}

.speed-test-modal.active {
    transform: translate(-50%, -50%) scale(1);
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #333;
    border-radius: 5px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #25D366;
    width: 0%;
    transition: width 0.1s;
}