@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap');

.slot-oyunlari-wrapper {
    max-width: var(--layout-max-width, 1400px);
    margin: 40px auto;
    background-color: transparent;
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
    box-sizing: border-box;
}

.slot-top-section {
    background-color: var(--surface-800, #050505);
    padding: 10px 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 10px;
    min-width: 0;
    overflow: hidden;
}

.slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.slot-header-left {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.slot-header-left h1 {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-light);
    margin: 0;
}

.provider-count {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 12px;
    color: var(--text-gray);
    font-weight: 500;
}

.slot-header-right {
    display: flex;
    gap: 5px;
}

/* Inherit styling from sizden gelenler nav */
.sg-nav-btn {
    background-color: var(--surface-800, #0d0d0d);
    border: 1px solid var(--surface-700);
    color: var(--text-secondary, #cbd5e1);
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.sg-nav-btn:hover {
    background-color: var(--surface-700);
    color: var(--text-light);
}

.sg-nav-btn i {
    font-size: 16px;
}

.provider-slider-container {
    overflow: hidden;
    position: relative;
    width: 100%;
    min-width: 0;
}

.provider-slider-strip {
    display: flex;
    gap: 15px;
    transition: transform 0.3s ease;
}

.provider-btn {
    flex: 0 0 calc((100% - (7 * 15px)) / 8);
    /* 8 items visible */
    height: 52px;
    background-color: var(--surface-800, #050505);
    border: 1px solid var(--surface-700);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.provider-btn img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.provider-btn span {
    color: var(--text-secondary, #cbd5e1);
    font-size: 13px;
    font-weight: 700;
}

.provider-btn:hover {
    background-color: var(--surface-800, #0d0d0d);
}

.provider-btn:hover img {
    opacity: 1;
}

.provider-btn.active {
    border-color: var(--brand-red-hover);
    background-color: var(--surface-800, #0c0c0c);
}

.provider-btn.active img {
    opacity: 1;
}

.games-grid-container {
    background-color: var(--surface-800, #050505);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px;
    min-width: 0;
    overflow: hidden;
}

.slot-oyunlari-wrapper .games-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 15px;
    min-width: 0;
}

.game-card-grid {
    width: 100%;
    aspect-ratio: 130 / 180;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background-color: var(--surface-800, #0d0d0d);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    display: block;
    padding: 0;
    border: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-align: left;
}

.game-card-grid:focus-visible {
    outline: 2px solid var(--accent, var(--brand-red));
    outline-offset: 2px;
}

.game-card-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card-grid:hover img {
    transform: scale(1.05);
}

.game-card-info-grid {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 6px 8px;
    background: linear-gradient(to top, rgba(6, 22, 33, 1) 0%, rgba(6, 22, 33, 0.8) 50%, transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.game-card-name-grid {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

.load-more-container {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 20px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--primary), 0.1);
    color: var(--brand-red, #f59e0b);
    padding: 8px 24px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid rgba(var(--primary), 0.3);
    cursor: pointer;
}

.btn-load-more:hover {
    background: var(--brand-red, #f59e0b);
    color: var(--text-light);
    border-color: var(--brand-red, #f59e0b);
    box-shadow: 0 4px 12px rgba(var(--primary), 0.3);
}

.btn-load-more.loading {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-secondary);
    border-color: rgba(148, 163, 184, 0.3);
    cursor: wait;
    box-shadow: none;
}

.load-more-text {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-gray);
}

@media (max-width: 1200px) {
    .slot-oyunlari-wrapper .games-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .provider-btn {
        flex: 0 0 calc((100% - (5 * 15px)) / 6);
    }
}

@media (max-width: 992px) {
    .slot-oyunlari-wrapper .games-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .provider-btn {
        flex: 0 0 calc((100% - (3 * 15px)) / 4);
    }
}

@media (max-width: 600px) {
    .slot-oyunlari-wrapper {
        margin: 15px auto;
        padding: 0 8px;
    }

    .slot-top-section {
        padding: 10px;
        border-radius: 8px;
        margin-bottom: 8px;
    }

    .slot-header {
        flex-direction: row;
        align-items: center;
        margin-bottom: 8px;
    }

    .slot-header-left h1 {
        font-size: 13px;
    }

    .provider-count {
        font-size: 10px;
    }

    .provider-slider-strip {
        gap: 8px;
    }

    .provider-btn {
        flex: 0 0 calc((100% - (2 * 8px)) / 3);
        height: 42px;
        padding: 6px;
        border-radius: 6px;
    }

    .provider-btn span {
        font-size: 10px;
    }

    .games-grid-container {
        padding: 8px;
        border-radius: 8px;
    }

    .slot-oyunlari-wrapper .games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .game-card-grid {
        border-radius: 6px;
    }

    .game-card-name-grid {
        font-size: 9px;
    }

    .game-card-info-grid {
        padding: 20px 4px 5px;
    }

    .load-more-container {
        padding-top: 15px;
        margin-top: 10px;
    }

    .btn-load-more {
        padding: 7px 18px;
        font-size: 12px;
    }

    .load-more-text {
        font-size: 11px;
    }

    .sg-nav-btn {
        width: 26px;
        height: 26px;
    }

    .sg-nav-btn i {
        font-size: 14px;
    }
}

/* ─── Sponsor modal ─── */
.so-sponsor-modal[hidden] {
    display: none !important;
}

.so-sponsor-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    overflow: hidden;
    overscroll-behavior: contain;
}

html.so-modal-open,
body.so-modal-open {
    overflow: hidden !important;
    overscroll-behavior: none;
}

body.so-modal-open .mobile-bottom-nav {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.so-sponsor-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(4px);
}

.so-sponsor-modal__panel {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    max-height: min(86vh, 720px);
    display: flex;
    flex-direction: column;
    background: var(--card-bg, var(--surface-800, #161616));
    border: 1px solid var(--border-soft, rgba(255, 255, 255, 0.1));
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    font-family: 'Chakra Petch', sans-serif;
}

.so-sponsor-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 12px;
}

.so-sponsor-modal__game {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.so-sponsor-modal__game img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--surface-700, #1c1c1c);
    flex-shrink: 0;
}

.so-sponsor-modal__titles {
    min-width: 0;
}

.so-sponsor-modal__titles h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary, var(--text-light, #fff));
    line-height: 1.25;
}

.so-sponsor-modal__titles p {
    margin: 4px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent, var(--brand-red, #f59e0b));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.so-sponsor-modal__close {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 999px;
    background: var(--surface-700, #1c1c1c);
    color: var(--text-secondary, #9ca3af);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}

.so-sponsor-modal__close:hover {
    background: var(--surface-600, #2a2a2a);
    color: var(--text-light, #fff);
}

.so-sponsor-modal__close i {
    font-size: 16px;
}

.so-sponsor-modal__search {
    position: relative;
    padding: 0 18px 12px;
}

.so-sponsor-modal__search i {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(calc(-50% - 6px));
    color: var(--text-gray, #6b7280);
    font-size: 16px;
    pointer-events: none;
}

.so-sponsor-modal__search input {
    width: 100%;
    box-sizing: border-box;
    height: 42px;
    padding: 0 14px 0 38px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.05));
    background: var(--surface-900, #050505);
    color: var(--text-primary, #f8fafc);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.so-sponsor-modal__search input::placeholder {
    color: var(--text-muted, #8a9aa6);
}

.so-sponsor-modal__search input:focus {
    border-color: rgba(var(--primary), 0.45);
    box-shadow: 0 0 0 3px rgba(var(--primary), 0.12);
}

.so-sponsor-modal__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    padding: 4px 18px 18px;
    scrollbar-width: thin;
    scrollbar-color: var(--surface-600, #2a2a2a) transparent;
}

.so-sponsor-modal__body::-webkit-scrollbar {
    width: 6px;
}

.so-sponsor-modal__body::-webkit-scrollbar-thumb {
    background: var(--surface-600, #2a2a2a);
    border-radius: 999px;
}

.so-sponsor-group + .so-sponsor-group {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.05));
}

.so-sponsor-group__title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary, #f8fafc);
}

.so-sponsor-group__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.so-sponsor-card {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: var(--surface-700, #1c1c1c);
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.05));
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.so-sponsor-card:hover {
    background: var(--surface-600, #2a2a2a);
    border-color: rgba(var(--primary), 0.35);
}

.so-sponsor-card__logo {
    width: 56px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--surface-900, #050505);
    overflow: hidden;
}

.so-sponsor-card__logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.so-sponsor-card__logo span {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
}

.so-sponsor-card__info {
    min-width: 0;
}

.so-sponsor-card__name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-light, #fff);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.so-sponsor-card__promo {
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.so-sponsor-card__promo-accent {
    color: var(--accent, var(--brand-red, #f59e0b));
    font-weight: 700;
}

.so-sponsor-card__promo-sub {
    color: var(--text-secondary, #9ca3af);
    font-weight: 500;
}

.so-sponsor-card__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1.5px solid rgba(var(--primary), 0.55);
    background: rgba(var(--primary), 0.08);
    color: var(--accent, var(--brand-red, #f59e0b));
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.so-sponsor-card:hover .so-sponsor-card__btn {
    background: var(--accent, var(--brand-red, #f59e0b));
    border-color: var(--accent, var(--brand-red, #f59e0b));
    color: var(--text-on-accent, #000);
}

.so-sponsor-empty {
    padding: 28px 12px;
    text-align: center;
    color: var(--text-muted, #8a9aa6);
    font-size: 13px;
}

@media (max-width: 600px) {
    .so-sponsor-modal {
        padding: 16px 12px;
        align-items: center;
        justify-content: center;
        height: 100%;
        height: 100dvh;
    }

    .so-sponsor-modal__panel {
        width: 100%;
        max-height: min(86dvh, 86vh);
        border-radius: 16px;
        overflow: hidden;
    }

    .so-sponsor-modal__header,
    .so-sponsor-modal__search {
        flex-shrink: 0;
    }

    .so-sponsor-modal__body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    }

    .so-sponsor-card {
        grid-template-columns: 48px minmax(0, 1fr);
        grid-template-areas:
            "logo info"
            "btn btn";
        gap: 10px;
    }

    .so-sponsor-card__logo { grid-area: logo; width: 48px; }
    .so-sponsor-card__info { grid-area: info; }
    .so-sponsor-card__btn {
        grid-area: btn;
        width: 100%;
        min-height: 36px;
    }

    .so-sponsor-modal__titles h2 {
        font-size: 14px;
    }

    .so-sponsor-modal__titles p {
        font-size: 12px;
    }
}