/* --- TU CSS ORIGINAL --- */

body.mixmas-page {
    background-image: url('../assets/images/navidad/merry-mixmas-background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    z-index: 0;
}

body.mixmas-page .container,
body.mixmas-page main {
    background: transparent !important;
}

/* 🎄 TUS LUCES COMPLETAS RECUPERADAS 🎄 */
.lightrope {
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    position: absolute;
    z-index: 10;
    margin: -15px 0 0 0;
    padding: 0;
    pointer-events: none;
    width: 100%;
}

.lightrope li {
    position: relative;
    animation-fill-mode: both;
    animation-iteration-count: infinite;
    list-style: none;
    display: inline-block;
    width: 12px;
    height: 28px;
    margin: 20px;
    border-radius: 50%;
    background: rgba(0, 247, 165, 1);
    box-shadow: 0px 6px 24px 3px rgba(0, 247, 165, 1);
    animation-name: flash1;
    animation-duration: 2s;
}

.lightrope li:nth-child(2n+1) {
    background: rgba(0, 255, 255, 1);
    box-shadow: 0px 6px 24px 3px rgba(0, 255, 255, 0.5);
    animation-name: flash2;
    animation-duration: 0.4s;
}

.lightrope li:nth-child(4n+2) {
    background: rgba(247, 0, 148, 1);
    box-shadow: 0px 6px 24px 3px rgba(247, 0, 148, 1);
    animation-name: flash3;
    animation-duration: 1.1s;
}

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

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

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

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

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

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

@keyframes flash1 {

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

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

@keyframes flash2 {

    0%,
    100% {
        background: rgba(0, 255, 255, 1);
        box-shadow: 0px 4.66667px 24px 3px rgba(0, 255, 255, 1);
    }

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

@keyframes flash3 {

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

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

/* --- RESTO DE TU CSS ORIGINAL --- */

.top3-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.top-card-winner {
    width: 650px;
    position: relative;
    z-index: 3;
}

.top-card-winner .card-glass {
    border: 2px solid rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
}

.top-card-winner .video-thumb {
    filter: grayscale(0%) !important;
}

.top3-second-third {
    display: flex;
    justify-content: center;
    gap: 30px;
    width: 100%;
    max-width: 820px;
}

.top-card-second-third {
    width: 400px;
    position: relative;
}

.card-glass {
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.card-glass:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 26px rgba(255, 100, 100, 0.45);
    border-color: rgba(255, 180, 180, 0.4);
}

.card-glass::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.6), rgba(255, 255, 255, 0.4));
    -webkit-mask: linear-gradient(#ffffff 0 0) content-box, linear-gradient(#ffffff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: glowMoveNavidad 2s linear infinite;
}

@keyframes glowMoveNavidad {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

.video-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 12px;
    filter: grayscale(80%);
    transition: transform 0.35s ease-in-out, filter 0.35s ease-in-out;
}

.card-glass:hover .video-thumb {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.video-title-overlay,
.video-title-overlay-bottom {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 5px #fff, 0 0 10px #ff9fc4;
    background: rgba(0, 0, 0, 0.35);
    padding: 8px 12px;
    border-radius: 8px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.card-glass:hover .video-title-overlay,
.card-glass:hover .video-title-overlay-bottom {
    background: rgba(255, 91, 157, 0.6);
}

.like-btn .emoji-like {
    cursor: pointer;
    font-size: 1.8em;
    display: inline-block;
    transition: transform 0.2s ease;
}

.emoji-like:hover {
    animation: pop-shake 1.5s infinite;
}

@keyframes pop-shake {

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

    10% {
        transform: scale(1.4) rotate(-10deg);
    }

    25% {
        transform: scale(1.4) rotate(8deg);
    }

    50% {
        transform: scale(1.4) rotate(-6deg);
    }

    75% {
        transform: scale(1.4) rotate(6deg);
    }
}

.like-btn span[id^="likes-"] {
    font-weight: bold;
    font-size: 1.5em;
    color: #fff;
    text-decoration: underline;
    text-decoration-color: #00f0ff;
    margin-left: 0.3em;
}

.video-grid-card .card-glass {
    width: 100%;
    height: auto;
}

.video-grid-card .video-thumb {
    height: 180px;
    object-fit: cover;
    width: 100%;
}

.mixmas-title-container {
    padding: 60px 20px 40px;
}

.mixmas-title {
    font-family: 'Poppins', sans-serif;
    font-size: 3rem;
    color: #ff3c6a;
    text-shadow: 0 0 5px #fff, 0 0 10px #ff9fc4, 0 0 20px #ff0000, 0 0 30px #ffcc00;
    letter-spacing: 2px;
    font-weight: 800;
    display: inline-block;
    animation: merryMixmasGlow 2s ease-in-out infinite alternate;
}

@keyframes merryMixmasGlow {

    0%,
    50%,
    100% {
        transform: rotate(-1deg);
    }

    25%,
    75% {
        transform: rotate(1deg);
    }
}

.medalla {
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 3.2rem;
    z-index: 10;
    animation: medallaPulse 1.6s ease-in-out infinite;
}

@keyframes medallaPulse {

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

    50% {
        transform: scale(1.25);
        opacity: 1;
    }
}

.elementos-flotantes-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 9999;
}

.wrapper-tree,
.wrapper-santa {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 200px;
}

.wrapper-tree {
    left: 20px;
}

.wrapper-santa {
    right: 20px;
}

.tree-sticky-container,
.santa-sticky-container {
    position: sticky;
    top: calc(100vh - 250px);
}

.tree-video,
.santa-video {
    width: 100%;
    border-radius: 15px;
}

.global-snowflake {
    position: fixed;
    top: -10vh;
    background: white;
    border-radius: 50%;
    z-index: 1;
    animation: fallAnimation var(--d) linear infinite;
}

@keyframes fallAnimation {
    0% {
        transform: translate(0, 0);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    100% {
        transform: translate(var(--x), 110vh);
        opacity: 0;
    }
}

@media (max-width: 768px) {

    .top-card-winner,
    .top-card-second-third {
        width: 100% !important;
        max-width: 95vw;
        margin: 0 auto;
    }

    .top3-second-third {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .mixmas-title {
        font-size: 1.8rem;
    }

    .medalla {
        font-size: 2.2rem;
    }

    .container {
        padding-left: 10px;
        padding-right: 10px;
        overflow-x: hidden;
    }

    .video-grid-card .video-thumb {
        height: 120px;
    }
}

/* -------------------------------------------------- */
/* LÓGICA REVEAL PARA SCROLL                          */
/* -------------------------------------------------- */

.reveal {
    position: relative;
    transform: translateY(60px);
    opacity: 0;
    transition: all 1s ease;
}

.reveal.active {
    transform: translateY(0);
    opacity: 1;
}


/* -------------------------------------------------- */
/* ❄️ NIEVE AL FONDO (Z-INDEX: 1)                     */
/* -------------------------------------------------- */
.global-snowflake {
    position: fixed;
    top: -10vh;
    background: white;
    border-radius: 50%;
    opacity: 0.6;
    pointer-events: none;
    z-index: 1;
    /* Al fondo */
    filter: blur(0.5px);
    width: var(--s);
    height: var(--s);
    animation: fallAnimation var(--d) linear infinite;
}

@keyframes fallAnimation {
    0% {
        transform: translate(0, 0);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    100% {
        transform: translate(var(--x), 110vh);
        opacity: 0;
    }
}

body.mixmas-page {
    z-index: 0;
    overflow-x: hidden !important;
}

.top3-container,
.video-grid-card,
.mixmas-title-container {
    position: relative;
    z-index: 5;
    /* Mayor que el 1 de la nieve */
}