/* Estilos para el Lobby de Loterias */

.loteria-page {
    position: relative;
    width: 100%;
    margin: 0px;
    padding-top: 6px !important;
    max-width: 100%;
}
html {
    overflow-x: hidden;
}
.loteria-hero {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 0rem auto;
    padding: 0;
    width: 100%;
    max-width: 100%;
    border: 1px solid #e4decf;
    background:
        radial-gradient(
            circle at top right,
            rgba(255, 193, 7, 0.12),
            transparent 22%
        ),
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.04),
            rgba(255, 255, 255, 0.02)
        );
    box-shadow: 0 0 8px 0px #0000000a inset;
    padding: 4px;
    border-radius: 15px;
}
#main-content {
    display: flex;
    justify-content: center;
}
.loteria-copy {
    max-width: 44rem;
    text-align: center;
}

.loteria-copy h1 {
    margin: 0;
    font-family: "Bebas Neue", sans-serif;
    color: #fff3c4;
    font-size: clamp(3.1rem, 6vw, 4.6rem);
    font-weight: 400;
    line-height: 0.9;
    letter-spacing: 0.06em;
    text-shadow:
        0 2px 0 rgba(0, 0, 0, 0.28),
        0 0 20px rgba(255, 193, 7, 0.14);
    background: linear-gradient(180deg, #fff8d8 0%, #ffffff 58%, #ffffff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.loteria-copy p {
    margin: 0.7rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1rem;
    line-height: 1.6;
}

.loteria-selector {
    width: 100%;
    padding: 0;
    border-radius: 0;
}

.loteria-selector-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    color: #ffffff;
}

.loteria-selector-head span {
    font-size: 0.98rem;
    font-weight: 800;
}

.loteria-selector-head small {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.8rem;
}

.loteria-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.loteria-btn {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 150px;
    height: 50px;
    padding: 0.3rem 0.6rem;
    border-radius: 14px;
    text-align: center;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
    cursor: pointer;
    opacity: 0.65;
}

.loteria-btn:hover,
.loteria-btn.is-active {
    opacity: 1;
    transform: translateY(-3px);
}

/* Triple de Oro (ID 1) - Gold theme */
.loteria-btn[data-game-id="1"] {
    background: rgba(255, 255, 255, 0.85);
    border: 1.5px solid rgba(255, 171, 1, 0.25);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.loteria-btn[data-game-id="1"]:hover,
.loteria-btn[data-game-id="1"].is-active {
    background: linear-gradient(135deg, #ffffff 0%, #fffbf2 100%);
    border-color: #ff9800;
    box-shadow:
        0 10px 25px rgba(255, 152, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.loteria-btn[data-game-id="1"].is-active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 12%;
    right: 12%;
    height: 4px;
    background: #ff9800;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 -2px 10px rgba(255, 152, 0, 0.7);
}

/* Foca Millonaria (ID 3) - Blue/Teal theme */
.loteria-btn[data-game-id="3"] {
    background: rgba(255, 255, 255, 0.85);
    border: 1.5px solid rgba(0, 194, 255, 0.25);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.loteria-btn[data-game-id="3"]:hover,
.loteria-btn[data-game-id="3"].is-active {
    background: linear-gradient(135deg, #ffffff 0%, #f0faff 100%);
    border-color: #00b0ff;
    box-shadow:
        0 10px 25px rgba(0, 176, 255, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.loteria-btn[data-game-id="3"].is-active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 12%;
    right: 12%;
    height: 4px;
    background: #00b0ff;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 -2px 10px rgba(0, 176, 255, 0.7);
}

/* Zoologico (ID 2) - Green/Jungle theme */
.loteria-btn[data-game-id="2"] {
    background: rgba(255, 255, 255, 0.85);
    border: 1.5px solid rgba(0, 230, 118, 0.25);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.loteria-btn[data-game-id="2"]:hover,
.loteria-btn[data-game-id="2"].is-active {
    background: linear-gradient(135deg, #ffffff 0%, #f0fff4 100%);
    border-color: #00e676;
    box-shadow:
        0 10px 25px rgba(0, 230, 118, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.loteria-btn[data-game-id="2"].is-active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 12%;
    right: 12%;
    height: 4px;
    background: #00e676;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 -2px 10px rgba(0, 230, 118, 0.7);
}

.loteria-btn-label {
    display: none;
}

.loteria-btn-subtitle {
    display: none;
}

.loteria-btn-icon {
    display: block;
    max-width: 92%;
    max-height: 85%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.loteria-mobile-select {
    display: none;
}

.loteria-mobile-select label {
    display: block;
    margin-bottom: 0.45rem;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 700;
}

.loteria-mobile-select .form-select {
    min-height: 3rem;
    border-color: rgba(255, 193, 7, 0.24);
    border-radius: 14px;
    background-color: rgba(11, 16, 29, 0.98);
    color: #ffffff;
}

.loteria-frame-shell {
    display: none;
    padding: 0.1rem;
    border: 1px solid rgba(255, 193, 7, 0.14);
    border-radius: 22px;
    background:
        radial-gradient(
            circle at top right,
            rgba(255, 193, 7, 0.12),
            transparent 22%
        ),
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.04),
            rgba(255, 255, 255, 0.02)
        );
    box-shadow:
        0 18px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.loteria-frame-shell.is-open {
    display: block;
}

.frame-container {
    min-height: 560px;
    height: min(78vh, 820px);
    overflow: hidden;
    border-radius: 16px;
    background:
        radial-gradient(
            circle at top left,
            rgba(255, 193, 7, 0.08),
            transparent 26%
        ),
        #0a0f1c;
}

.frame-container iframe {
    border-radius: inherit;
}

#products {
    gap: 5.5rem;
}

#products .product-card {
    margin-bottom: 0;
}

@media (max-width: 720px) {
    .loteria-hero {
        margin-bottom: 1rem;
        max-width: 100%;
    }

    .loteria-selector {
        width: 100%;
        padding: 0;
        border-radius: 0;
    }

    .loteria-btn {
        width: 100% !important;
        max-width: 130px;
        height: 56px;
        border-radius: 10px;
        padding: 0.25rem 0.4rem;
    }

    .loteria-btn-icon {
        max-width: 92%;
        max-height: 85%;
        width: auto;
        height: auto;
        object-fit: contain;
    }

    .loteria-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.25rem;
    }

    .loteria-frame-shell {
        padding: 0rem;
    }

    .frame-container {
        min-height: 390px;
        height: min(68vh, 680px);
    }

    #products {
        gap: 1.5rem;
    }

    .carousel-item {
        height: 50px;
    }

    .s2 {
        margin-bottom: 10px;
    }

    #products .product-card {
        height: 190px;
        min-height: 210px;
        min-width: 238px;
    }
}

@media (max-width: 520px) {
    .loteria-hero {
        padding: 0;
    }

    .loteria-selector {
        padding: 0;
    }

    .loteria-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .loteria-btn {
        width: 100% !important;
        max-width: 130px;
        height: 56px;
        padding: 0.25rem 0.4rem;
    }

    .loteria-btn-icon {
        max-width: 92%;
        max-height: 85%;
        width: auto;
        height: auto;
        object-fit: contain;
    }

    .loteria-btn-label {
        display: none;
    }

    .loteria-btn-subtitle {
        display: none;
    }

    .frame-container {
        min-height: 350px;
        height: min(70vh, 620px);
    }
}

@media (max-width: 320px) {
    .loteria-hero {
        padding: 0;
    }

    .loteria-selector {
        padding: 0;
    }

    .loteria-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .loteria-btn {
        width: 100% !important;
        max-width: 95px;
        height: 46px;
        border-radius: 8px;
        padding: 0.15rem 0.3rem;
    }

    .loteria-btn-icon {
        max-width: 92%;
        max-height: 85%;
        width: auto;
        height: auto;
        object-fit: contain;
    }

    .loteria-copy p {
        font-size: 0.92rem;
    }

    .loteria-copy h1 {
        font-size: 3rem;
    }

    #products .product-card {
        height: 182px;
        min-height: 173px;
        min-width: 210px;
    }
}

/* Swiper Slider styles for Mobile & Desktop */
@media (min-width: 768px) {
    .loteria-swiper-container {
        width: 100%;
        display: flex;
        justify-content: center;
        padding: 0 !important;
    }

    .loteria-swiper {
        width: 100%;
        overflow: visible !important;
        border-radius: 12px;
    }

    .loteria-swiper .swiper-wrapper {
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-start;
        align-items: center !important;
        gap: 16px !important;
        transform: none !important;
        width: 100% !important;
    }

    .loteria-swiper .swiper-slide {
        width: auto !important;
        flex: 0 0 auto !important;
        margin: 0 !important;
    }

    .loteria-swiper-prev,
    .loteria-swiper-next {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .loteria-swiper-container {
        position: relative;
        width: 100%;
        padding: 0 !important;
        display: flex;
        justify-content: center;
    }

    .loteria-swiper {
        width: 100%;
        overflow: visible !important;
        border-radius: 12px;
    }

    .loteria-swiper .swiper-wrapper {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 8px !important;
        transform: none !important;
        width: 100% !important;
    }

    .loteria-swiper .swiper-slide {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        box-sizing: border-box !important;
        width: calc(33.333% - 6px) !important;
        flex: 0 0 auto !important;
        margin: 0 !important;
    }

    .loteria-swiper-prev,
    .loteria-swiper-next {
        display: none !important;
    }
}

/* ==========================================
   MODO OSCURO (DARK MODE OVERRIDES)
   ========================================== */

body.dark .loteria-hero {
    border-color: rgba(255, 255, 255, 0.08) !important;
    background:
        radial-gradient(
            circle at top right,
            rgba(255, 193, 7, 0.08),
            transparent 22%
        ),
        linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.1)) !important;
}

body.dark .loteria-btn {
    background: rgba(15, 22, 36, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

body.dark .loteria-btn:hover {
    background: rgba(15, 22, 36, 0.75) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Triple de Oro (ID 1) Active - Modo Oscuro */
body.dark .loteria-btn[data-game-id="1"].is-active {
    background: linear-gradient(
        135deg,
        rgba(30, 20, 10, 0.85) 0%,
        rgba(20, 12, 5, 0.95) 100%
    ) !important;
    border-color: #ff9800 !important;
    box-shadow:
        0 10px 25px rgba(255, 152, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

/* Foca Millonaria (ID 3) Active - Modo Oscuro */
body.dark .loteria-btn[data-game-id="3"].is-active {
    background: linear-gradient(
        135deg,
        rgba(10, 20, 30, 0.85) 0%,
        rgba(5, 12, 20, 0.95) 100%
    ) !important;
    border-color: #00b0ff !important;
    box-shadow:
        0 10px 25px rgba(0, 176, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

/* Zoologico (ID 2) Active - Modo Oscuro */
body.dark .loteria-btn[data-game-id="2"].is-active {
    background: linear-gradient(
        135deg,
        rgba(10, 30, 20, 0.85) 0%,
        rgba(5, 20, 12, 0.95) 100%
    ) !important;
    border-color: #00e676 !important;
    box-shadow:
        0 10px 25px rgba(0, 230, 118, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

/* ==========================================
   CINTILLO DE INFORMACIÓN (TICKER MARQUEE)
   ========================================== */

.cilinder-information {
    width: 100%;
    height: 38px;
    background: transparent;
    border: 1px solid rgba(255, 193, 7, 0.2);
    border-radius: 30px;
    overflow: hidden;
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    contain: layout paint;
}

body.dark .cilinder-information {
    background: var(--bg-body);
    border-color: rgba(255, 193, 7, 0.15);
}

.ticker-wrapper {
    display: flex;
    width: max-content;
    animation: ticker-scroll 25s linear infinite;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
}

.ticker-wrapper:hover {
    animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
    .ticker-wrapper {
        animation-play-state: paused;
    }
}

@keyframes ticker-scroll {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    padding: 0 1.5rem;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.ticker-divider {
    color: rgba(255, 193, 7, 0.6);
    font-size: 1rem;
}

.ticker-badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-right: 8px;
    display: inline-block;
    letter-spacing: 0.5px;
}

.ticker-badge.gold {
    background: linear-gradient(135deg, #ffb300, #ff8f00);
    color: #000;
    box-shadow: 0 2px 6px rgba(255, 179, 0, 0.3);
}

.ticker-badge.blue {
    background: linear-gradient(135deg, #00b0ff, #0081cb);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 176, 255, 0.3);
}

.ticker-badge.green {
    background: linear-gradient(135deg, #00e676, #00b348);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 230, 118, 0.3);
}
