/* ================================
   Bamba Slots Page
================================ */

.slots-page {
    min-height: var(--tg-viewport-height, 100svh);
}

@keyframes slotsFadeIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slotsFloat {
    0%, 100% {
        transform: translateY(0) rotate(-4deg);
    }
    50% {
        transform: translateY(-10px) rotate(4deg);
    }
}

@keyframes slotsPulse {
    0%, 100% {
        opacity: .42;
        transform: scale(1);
    }
    50% {
        opacity: .72;
        transform: scale(1.05);
    }
}

.slots-page main,
.slots-page section {
    animation: slotsFadeIn .45s ease both;
}

/* ================================
   Hero
================================ */

.slots-hero-card {
    position: relative;
    overflow: hidden;
    min-height: 330px;
    border-radius: 36px;
    padding: clamp(24px, 4vw, 44px);
    background:
        radial-gradient(circle at 78% 32%, rgba(0, 255, 136, .22), transparent 34%),
        radial-gradient(circle at 16% 20%, rgba(255, 255, 255, .08), transparent 26%),
        linear-gradient(145deg, rgba(26, 26, 26, .92), rgba(6, 6, 6, .98));
    border: 1px solid rgba(255, 255, 255, .09);
    box-shadow:
        0 30px 90px rgba(0, 0, 0, .42),
        inset 0 1px 0 rgba(255, 255, 255, .06);
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
    gap: 30px;
    isolation: isolate;
}

.slots-hero-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            135deg,
            transparent 0,
            transparent 13px,
            rgba(255, 255, 255, .025) 14px,
            rgba(255, 255, 255, .025) 15px
        );
    opacity: .85;
    pointer-events: none;
    z-index: -1;
}

.slots-hero-card::after {
    content: '';
    position: absolute;
    left: 36px;
    right: 36px;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00ff88, transparent);
    box-shadow: 0 0 28px rgba(0, 255, 136, .45);
    pointer-events: none;
}

.slots-hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.slots-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: fit-content;
    color: #00ff88;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .16em;
    margin-bottom: 12px;
}

.slots-kicker span {
    width: 8px;
    height: 8px;
    border-radius: 99px;
    background: #00ff88;
    box-shadow: 0 0 14px rgba(0, 255, 136, .9);
}

.slots-kicker.compact {
    margin-bottom: 8px;
}

.slots-hero-content h1 {
    max-width: 680px;
    color: #fff;
    font-size: clamp(40px, 7vw, 82px);
    line-height: .92;
    font-weight: 950;
    letter-spacing: -.06em;
}

.slots-hero-content p {
    max-width: 590px;
    color: #9ca3af;
    font-size: 15px;
    line-height: 1.6;
    margin-top: 18px;
}

.slots-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.slots-primary-action,
.slots-secondary-action {
    min-height: 48px;
    border-radius: 16px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 950;
    text-decoration: none;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease, background .25s ease;
}

.slots-primary-action {
    color: #050505;
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    box-shadow: 0 0 28px rgba(0, 255, 136, .24);
}

.slots-secondary-action {
    color: #fff;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .11);
}

.slots-secondary-action.is-active,
.slots-secondary-action:hover {
    color: #ef4444;
    border-color: rgba(239, 68, 68, .42);
    background: rgba(239, 68, 68, .1);
}

.slots-primary-action:hover,
.slots-secondary-action:hover {
    transform: translateY(-2px);
}

.slots-hero-visual {
    position: relative;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slots-orbit {
    position: absolute;
    border-radius: 999px;
    border: 1px solid rgba(0, 255, 136, .18);
    box-shadow: inset 0 0 34px rgba(0, 255, 136, .08);
    animation: slotsPulse 4s ease-in-out infinite;
}

.slots-orbit-one {
    width: 280px;
    height: 280px;
}

.slots-orbit-two {
    width: 190px;
    height: 190px;
    animation-delay: .7s;
}

.slots-machine-icon {
    position: relative;
    z-index: 2;
    width: 145px;
    height: 145px;
    border-radius: 42px;
    background:
        radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .18), transparent 33%),
        linear-gradient(145deg, rgba(0, 255, 136, .22), rgba(0, 204, 106, .08));
    border: 1px solid rgba(0, 255, 136, .34);
    color: #00ff88;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    box-shadow: 0 0 46px rgba(0, 255, 136, .18);
}

.slots-floating-chip {
    position: absolute;
    z-index: 3;
    min-width: 54px;
    height: 54px;
    padding: 0 10px;
    border-radius: 18px;
    color: #050505;
    background: #00ff88;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 950;
    box-shadow: 0 0 24px rgba(0, 255, 136, .28);
    animation: slotsFloat 3.4s ease-in-out infinite;
}

.chip-a {
    top: 26px;
    right: 38px;
}

.chip-b {
    left: 34px;
    bottom: 48px;
    animation-delay: .45s;
}

.chip-c {
    right: 74px;
    bottom: 24px;
    animation-delay: .9s;
}

/* ================================
   Toolbar
================================ */

.slots-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    padding: 10px;
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .025)),
        rgba(10, 10, 10, .74);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .24);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.slots-search-form {
    position: relative;
    min-width: 0;
}

.slots-search-form i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    pointer-events: none;
}

.slots-search-form input {
    width: 100%;
    height: 52px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 17px;
    padding: 0 16px 0 48px;
    color: #fff;
    background: rgba(255, 255, 255, .045);
    outline: none;
    transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}

.slots-search-form input::placeholder {
    color: #6b7280;
}

.slots-search-form input:focus {
    border-color: rgba(0, 255, 136, .55);
    background: rgba(0, 255, 136, .055);
    box-shadow: 0 0 22px rgba(0, 255, 136, .12);
}

.slots-icon-toggle,
.slots-filter-toggle {
    height: 52px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 17px;
    color: #e5e7eb;
    background: rgba(255, 255, 255, .05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .25s ease;
}

.slots-icon-toggle {
    position: relative;
    width: 52px;
    min-width: 52px;
}

.slots-filter-toggle {
    gap: 10px;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 900;
}

.slots-icon-toggle:hover,
.slots-filter-toggle:hover,
.slots-filter-toggle.is-active {
    color: #00ff88;
    border-color: rgba(0, 255, 136, .42);
    background: rgba(0, 255, 136, .08);
    box-shadow: 0 0 20px rgba(0, 255, 136, .12);
}

.slots-icon-toggle.is-active,
.slots-icon-toggle.is-favorite {
    color: #ef4444;
    border-color: rgba(239, 68, 68, .58);
    background: rgba(239, 68, 68, .12);
    box-shadow: 0 0 18px rgba(239, 68, 68, .2);
}

.slots-icon-toggle::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 50%;
    bottom: calc(100% + 10px);
    z-index: 20;
    padding: 7px 10px;
    border: 1px solid rgba(0, 255, 136, .22);
    border-radius: 10px;
    color: #e5e7eb;
    background: rgba(10, 10, 10, .96);
    font-size: 12px;
    font-weight: 800;
    opacity: 0;
    pointer-events: none;
    transform: translate(50%, 6px);
    transition: opacity .2s ease, transform .2s ease;
    white-space: nowrap;
}

.slots-icon-toggle:hover::after {
    opacity: 1;
    transform: translate(50%, 0);
}

#providersToggleIcon {
    transition: transform .25s ease;
}

/* ================================
   Providers
================================ */

#providersSection {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-8px);
    transition: max-height .35s ease, opacity .25s ease, transform .35s ease, margin-bottom .35s ease;
    margin-bottom: 0;
}

#providersSection.expanded {
    max-height: 540px;
    opacity: 1;
    transform: translateY(0);
    margin-bottom: 26px;
}

.slots-providers-panel {
    padding: 16px;
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)),
        rgba(10, 10, 10, .76);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 22px 60px rgba(0, 0, 0, .24);
}

.slots-provider-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.provider-card {
    width: 158px;
    height: 62px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 18px;
    padding: 9px 12px;
    cursor: pointer;
    background: rgba(255, 255, 255, .045);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease, background .25s ease;
}

.provider-card:hover,
.provider-card.is-active {
    transform: translateY(-2px);
    border-color: rgba(0, 255, 136, .58);
    background: rgba(0, 255, 136, .075);
    box-shadow: 0 0 18px rgba(0, 255, 136, .13);
}

.provider-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.provider-all {
    width: 100%;
    height: 100%;
    color: #00ff88;
    font-size: 14px;
    font-weight: 950;
    letter-spacing: .02em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
}

/* ================================
   Section Head
================================ */

.slots-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.slots-section-head h2 {
    color: #fff;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1;
    font-weight: 950;
    letter-spacing: -.04em;
}

.slots-section-head p {
    color: #8f8f8f;
    font-size: 14px;
    margin-top: 8px;
}

.slots-counter {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 14px;
    color: #00ff88;
    background: rgba(0, 255, 136, .08);
    border: 1px solid rgba(0, 255, 136, .22);
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 950;
}

/* ================================
   Slot Cards - same visual language as home page
================================ */

.bamba-slots-grid,
.slots-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.bamba-slot-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 440 / 590;
    border-radius: 18px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, .08);
    cursor: pointer;
    opacity: 0;
    transform: translateY(16px);
    transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease, opacity .28s ease;
    box-shadow: 0 16px 36px rgba(0, 0, 0, .28);
}

.bamba-slot-card.loaded {
    opacity: 1;
    transform: translateY(0);
}

.bamba-slot-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 255, 136, .55);
    box-shadow:
        0 0 24px rgba(0, 255, 136, .28),
        0 20px 44px rgba(0, 0, 0, .45);
}

.bamba-slot-card .slot-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease, filter .35s ease;
}

.bamba-slot-card:hover .slot-image {
    transform: scale(1.07);
    filter: saturate(1.12) contrast(1.05);
}

.slot-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, .18), transparent 34%);
    opacity: .18;
    pointer-events: none;
}

.bamba-slot-card .slot-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .88)),
        radial-gradient(circle at 50% 30%, transparent 20%, rgba(0, 0, 0, .52) 100%);
    opacity: 0;
    transition: opacity .25s ease;
}

.bamba-slot-card:hover .slot-overlay {
    opacity: 1;
}

.bamba-slot-card .slot-buttons {
    position: absolute;
    z-index: 5;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 11px;
    opacity: 1;
    pointer-events: none;
}

.bamba-slot-card:hover .slot-buttons {
    pointer-events: auto;
}

.bamba-slot-card .slot-play-icon,
.bamba-slot-card .slot-button-secondary {
    opacity: 0;
    transform: translateY(10px) scale(.96);
    transition: opacity .25s ease, transform .25s ease, background-color .25s ease, border-color .25s ease, box-shadow .25s ease, filter .25s ease;
    will-change: opacity, transform;
}

.bamba-slot-card:hover .slot-play-icon,
.bamba-slot-card:hover .slot-button-secondary {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.bamba-slot-card .slot-play-icon {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: #050505;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 28px rgba(0, 255, 136, .38);
    cursor: pointer;
}

.bamba-slot-card .slot-play-icon i {
    font-size: 18px;
}

.bamba-slot-card .slot-play-icon:hover {
    transform: translateY(0) scale(1.08);
    filter: brightness(1.08);
}

.bamba-slot-card .slot-button-secondary {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .18);
    background-color: rgba(255, 255, 255, .12);
    color: #fff;
    border-radius: 12px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: inset 0 0 18px rgba(255, 255, 255, .035), 0 8px 22px rgba(0, 0, 0, .28);
}

.bamba-slot-card .slot-button-secondary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, .18), transparent 55%);
    opacity: .55;
    pointer-events: none;
}

.bamba-slot-card .slot-button-secondary:hover {
    background-color: rgba(255, 255, 255, .22);
    border-color: rgba(255, 255, 255, .55);
    box-shadow: inset 0 0 18px rgba(255, 255, 255, .06), 0 0 20px rgba(255, 255, 255, .18), 0 8px 22px rgba(0, 0, 0, .32);
}

.slot-hover-title {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 10px;
    z-index: 4;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    transform: translateY(8px) scale(.98);
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: none;
    box-shadow: none;
}

.slot-hover-title span {
    display: block;
    width: 100%;
    color: #fff;
    font-size: 11px;
    font-weight: 850;
    line-height: 1.15;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .85);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bamba-slot-card:hover .slot-hover-title {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Compatibility with old AJAX classes, just in case */
.slot-card {
    position: relative;
}

.slot-button {
    border: none;
}

/* ================================
   Empty / Load more
================================ */

.slots-empty {
    min-height: 260px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .035);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 34px 18px;
}

.slots-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 22px;
    background: rgba(0, 255, 136, .09);
    border: 1px solid rgba(0, 255, 136, .22);
    color: #00ff88;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 14px;
}

.slots-empty h3 {
    color: #fff;
    font-size: 20px;
    font-weight: 950;
}

.slots-empty p {
    color: #8f8f8f;
    font-size: 14px;
    margin-top: 6px;
}

.slots-load-more {
    min-height: 52px;
    padding: 0 24px;
    border: none;
    border-radius: 18px;
    color: #050505;
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 950;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}

.slots-load-more:hover {
    transform: translateY(-2px) scale(1.02);
    filter: brightness(1.08);
    box-shadow: 0 0 28px rgba(0, 255, 136, .28);
}

.slots-load-more:disabled {
    opacity: .75;
    cursor: wait;
    transform: none;
}

/* ================================
   Mobile Navigation compatibility
================================ */

@media (max-width: 1023px) {
    main.slots-page {
        padding-bottom: 96px !important;
    }

    nav.lg\:hidden {
        display: block;
    }

    .mobile-nav-item {
        transition: all .3s ease;
    }

    .mobile-nav-item:active {
        transform: scale(.95);
    }
}

@media (min-width: 1024px) {
    .bamba-slots-grid,
    .slots-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 16px;
    }

    nav.lg\:hidden {
        display: none;
    }
}

@media (max-width: 900px) {
    .slots-hero-card {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .slots-hero-visual {
        min-height: 210px;
    }
}

@media (max-width: 768px) {
    .slots-hero-card {
        border-radius: 28px;
        padding: 24px;
    }

    .slots-hero-content h1 {
        font-size: clamp(38px, 13vw, 58px);
    }

    .slots-hero-content p {
        font-size: 14px;
    }

    .slots-toolbar {
        grid-template-columns: minmax(0, 1fr) 52px 52px;
        gap: 9px;
        padding: 8px;
    }

    .slots-filter-toggle {
        width: 52px;
        padding: 0;
    }

    .slots-filter-toggle span {
        display: none;
    }

    .slots-section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .bamba-slots-grid,
    .slots-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .bamba-slot-card {
        border-radius: 14px;
    }

    .bamba-slot-card .slot-play-icon {
        width: 48px;
        height: 48px;
    }

    .bamba-slot-card .slot-button-secondary {
        padding: 8px 14px;
        font-size: 12px;
    }

    .slot-hover-title {
        display: none;
    }

    .provider-card {
        width: calc(33.333% - 8px);
        min-width: 96px;
        height: 58px;
        border-radius: 16px;
    }

    #providersSection.expanded {
        max-height: 700px;
    }
}

@media (max-width: 420px) {
    .slots-hero-visual {
        display: none;
    }


    .provider-card {
        width: calc(50% - 6px);
    }
}

@media (max-width: 360px) {
    .bamba-slot-card .slot-play-icon {
        width: 44px;
        height: 44px;
    }

    .bamba-slot-card .slot-button-secondary {
        padding: 7px 12px;
        font-size: 11px;
    }
}
