/* =========================================================
   CASINO PAGE
   ========================================================= */

.casino-layout {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 20px;
    margin-top: 16px;
    align-items: start;
    min-width: 0;
}

.casino-layout > * {
    min-width: 0;
}

.cgrid > * {
    min-width: 0;
}

/* ---------- Side icons rail ---------- */
.side-rail {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: sticky;
    top: 116px;
}

.side-rail__btn {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 16px;
    transition: all var(--transition);
    position: relative;
    cursor: pointer;
}

.side-rail__btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background: var(--gold);
    border-radius: 0 2px 2px 0;
    transform: scaleY(0);
    transition: transform var(--transition);
}

.side-rail__btn:hover,
.side-rail__btn.is-active {
    color: var(--gold);
    background: var(--bg-tertiary);
}

.side-rail__btn:hover::before,
.side-rail__btn.is-active::before {
    transform: scaleY(1);
}

/* ---------- Page header ---------- */
.casino-header {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 13px;
}

.breadcrumb a:hover { color: var(--gold); }
.breadcrumb i { font-size: 12px; }

.casino-header__title {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-primary);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-tertiary);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    width: 220px;
    transition: border-color var(--transition);
}

.search-box:focus-within { border-color: var(--gold); }

.search-box i { color: var(--text-muted); }

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

.search-box input::placeholder { color: var(--text-muted); }

/* ---------- Casino hero banner ---------- */
.casino-hero {
    background:
        radial-gradient(ellipse at 80% 50%, rgba(212, 175, 55, 0.35), transparent 60%),
        linear-gradient(135deg, #134635 0%, #1d6448 50%, #0a2e22 100%);
    border-radius: var(--radius-lg);
    padding: 36px 40px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 32px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
}

.casino-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        -45deg,
        transparent 0,
        transparent 20px,
        rgba(255, 255, 255, 0.02) 20px,
        rgba(255, 255, 255, 0.02) 21px
    );
}

.casino-hero__content {
    position: relative;
    z-index: 1;
}

.casino-hero__title {
    font-size: 26px;
    font-weight: 900;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.casino-hero__title .gold {
    color: var(--gold-bright);
}

.casino-hero__sub {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 18px;
    max-width: 460px;
}

.casino-hero__visual {
    position: relative;
    width: 280px;
    height: 200px;
    z-index: 1;
}

/* CSS crown */
.crown {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 140px;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4));
}

.crown::before {
    content: '\f521';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 140px;
    background: linear-gradient(180deg, var(--gold-bright) 0%, var(--gold) 50%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: absolute;
    inset: 0;
    text-align: center;
    line-height: 140px;
}

.coin {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--gold-bright), var(--gold-dark));
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.5), inset 0 -3px 6px rgba(0,0,0,0.25);
    border: 2px solid var(--gold-bright);
}

.coin--1 { top: 0; right: 30px; animation: coinFloat 3s ease-in-out infinite; }
.coin--2 { top: 40px; right: 0; width: 24px; height: 24px; animation: coinFloat 3.5s ease-in-out infinite reverse; }
.coin--3 { bottom: 20px; right: 50px; width: 28px; height: 28px; animation: coinFloat 2.8s ease-in-out infinite; }
.coin--4 { bottom: 0; right: 100px; width: 22px; height: 22px; animation: coinFloat 4s ease-in-out infinite reverse; }
.coin--5 { top: 70px; left: 20px; width: 26px; height: 26px; animation: coinFloat 3.2s ease-in-out infinite; }
.coin--6 { bottom: 30px; left: 40px; width: 20px; height: 20px; animation: coinFloat 3.8s ease-in-out infinite reverse; }

@keyframes coinFloat {
    0%, 100% { transform: translateY(0) rotate(0); }
    50%      { transform: translateY(-15px) rotate(180deg); }
}

/* ---------- Filter tabs ---------- */
.casino-filters {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 6px;
    margin-bottom: 18px;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.casino-filters::-webkit-scrollbar { display: none; }

.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    transition: color var(--transition);
}

.filter-tab i {
    color: var(--gold);
    font-size: 14px;
}

.filter-tab::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 0;
    height: 3px;
    background: var(--gold);
    transform: scaleX(0);
    transition: transform var(--transition);
}

.filter-tab:hover { color: var(--text-primary); }

.filter-tab.is-active {
    color: var(--gold-bright);
}

.filter-tab.is-active::after {
    transform: scaleX(1);
}

/* ---------- Casino game grid ---------- */
.cgrid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

.cgame {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: all var(--transition);
    border: 1px solid transparent;
    min-width: 0;
    width: 100%;
}

.cgame:hover {
    transform: translateY(-6px);
    border-color: var(--gold);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--gold-soft);
}

.cgame__art {
    aspect-ratio: 4 / 3;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--bg-primary);
}

.cgame__art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.cgame:hover .cgame__art img {
    transform: scale(1.06);
}

.cgame__art-icon {
    position: absolute;
    font-size: 64px;
    opacity: 0.4;
    z-index: 0;
}

.cgame__art-text {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cgame__art-text small {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    opacity: 0.85;
}

.cgame__art-text big {
    font-size: 22px;
    font-weight: 900;
}

/* Specific game backgrounds (mimicking real slot art) */
.bg-cactus  { background: linear-gradient(135deg, #d4a017 0%, #8b4513 50%, #5d2f0a 100%); }
.bg-roman   { background: linear-gradient(135deg, #6b1d3a 0%, #c9a227 50%, #4a0e1f 100%); }
.bg-sweet   { background: linear-gradient(135deg, #ff6fae 0%, #ffb84d 50%, #ff5599 100%); }
.bg-bigbass { background: linear-gradient(135deg, #1e6091 0%, #4a8a3f 50%, #0f4c75 100%); }
.bg-volcano { background: linear-gradient(135deg, #c83e1e 0%, #ff8c1a 50%, #800000 100%); }
.bg-fruit   { background: linear-gradient(135deg, #ff5e62 0%, #ffd166 50%, #06a77d 100%); }
.bg-burning { background: linear-gradient(135deg, #1e6f3a 0%, #f25c05 50%, #800909 100%); }
.bg-alkemor { background: linear-gradient(135deg, #4b1d6c 0%, #c9a227 50%, #2a0d3f 100%); }
.bg-mustang { background: linear-gradient(135deg, #5d3a1f 0%, #c98a48 50%, #3d2410 100%); }
.bg-fortune { background: linear-gradient(135deg, #c8552c 0%, #f2b138 50%, #7a2810 100%); }
.bg-chicken { background: linear-gradient(135deg, #c81818 0%, #f2c842 50%, #800000 100%); }
.bg-golden  { background: linear-gradient(135deg, #4b1d6c 0%, #c9a227 50%, #1a0626 100%); }
.bg-aviator { background: linear-gradient(135deg, #c2185b 0%, #1a1a1a 50%, #6a0033 100%); }
.bg-gates   { background: linear-gradient(135deg, #4a148c 0%, #c9a227 50%, #1a0033 100%); }
.bg-buffalo { background: linear-gradient(135deg, #5d4037 0%, #ffa726 50%, #3e2723 100%); }
.bg-mines   { background: linear-gradient(135deg, #1a3a52 0%, #2196f3 50%, #0d1b2a 100%); }
.bg-crash   { background: linear-gradient(135deg, #ad1457 0%, #f57c00 50%, #4a0033 100%); }
.bg-zeus    { background: linear-gradient(135deg, #1565c0 0%, #ffd700 50%, #0d47a1 100%); }

.cgame__badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--gold);
    color: var(--text-dark);
    font-size: 10px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.cgame__badge--hot { background: linear-gradient(135deg, #ff6b3d, #c81818); color: #fff; }
.cgame__badge--new { background: linear-gradient(135deg, #4caf50, #1b5e20); color: #fff; }
.cgame__badge--top { background: linear-gradient(135deg, var(--gold-bright), var(--gold-dark)); color: var(--text-dark); }
.cgame__badge--jp  { background: linear-gradient(135deg, #ad1457, #ff4081); color: #fff; }

.cgame__overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 46, 34, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: opacity var(--transition);
    z-index: 3;
}

.cgame:hover .cgame__overlay { opacity: 1; }

.cgame__play {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-bright), var(--gold-dark));
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
    transition: transform var(--transition);
}

.cgame:hover .cgame__play { transform: scale(1.1); }

.cgame__demo {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid var(--gold);
    padding: 6px 14px;
    border-radius: 50px;
}

.cgame__demo:hover { background: var(--gold); color: var(--text-dark); }

.cgame__body {
    padding: 10px 12px;
    background: var(--bg-secondary);
}

.cgame__title {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cgame__title i {
    color: var(--gold);
    font-size: 11px;
}

.cgame__provider {
    color: var(--text-muted);
    font-size: 11px;
    margin-top: 2px;
}

/* ---------- Provider filter (collapsible) ---------- */
.providers-bar {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    overflow: hidden;
    transition: border-color var(--transition);
}

.providers-bar.is-open {
    border-color: var(--gold);
}

.providers-bar__toggle {
    width: 100%;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: var(--text-primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    background: transparent;
    transition: background var(--transition);
    text-align: left;
}

.providers-bar__toggle:hover {
    background: var(--bg-tertiary);
}

.providers-bar__toggle .icon {
    color: var(--gold);
    font-size: 16px;
}

.providers-bar__toggle .count {
    margin-left: auto;
    background: var(--gold-soft);
    color: var(--gold-bright);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
}

.providers-bar__toggle .chevron {
    color: var(--gold);
    transition: transform var(--transition);
    font-size: 12px;
}

.providers-bar.is-open .chevron {
    transform: rotate(180deg);
}

.providers-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
    padding: 0 14px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    border-top: 1px solid transparent;
}

.providers-bar.is-open .providers-list {
    max-height: 800px;
    padding: 12px 14px 14px;
    border-top-color: var(--border);
}

.provider {
    background: #ffffff;
    border: 2px solid transparent;
    height: 56px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.provider img {
    max-height: 32px;
    max-width: 100%;
    object-fit: contain;
    filter: none;
}

.provider:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.provider.is-active {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px var(--gold-soft), 0 4px 12px rgba(212, 175, 55, 0.3);
}

.provider.is-active::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background: var(--gold);
    color: var(--text-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
}

/* "Tous" button special style */
.provider--all {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border: 2px solid var(--border-strong);
    gap: 6px;
}

.provider--all:hover {
    background: var(--bg-hover);
}

.provider--all.is-active {
    background: var(--gold-soft);
    color: var(--gold-bright);
    border-color: var(--gold);
}

.provider--all.is-active::after { display: none; }

.provider--all i {
    color: var(--gold);
    font-size: 14px;
}

/* ---------- Live casino specific ---------- */
.cgame__live-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 10px;
    background: linear-gradient(to top, rgba(10, 46, 34, 0.95), transparent);
    color: #fff;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cgame__live-info .seats {
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cgame__live-info .seats i { color: var(--gold); }

.cgame__live-info .stake {
    font-size: 10px;
    color: var(--gold-bright);
    font-weight: 700;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 8px;
    border-radius: 50px;
}

.live-badge--small {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--live);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.live-badge--small::before {
    content: '';
    width: 5px;
    height: 5px;
    background: #fff;
    border-radius: 50%;
    animation: pulse 1.4s ease-in-out infinite;
}

/* ---------- Load more ---------- */
.load-more {
    margin: 24px auto 0;
    display: block;
    height: 44px;
    padding: 0 32px;
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.load-more:hover {
    background: var(--gold);
    color: var(--text-dark);
}

/* ---------- Responsive ---------- */
@media (max-width: 1400px) {
    .cgrid { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 1200px) {
    .cgrid { grid-template-columns: repeat(4, 1fr); }
    .casino-hero__title { font-size: 24px; }
    .casino-hero__visual { width: 240px; height: 180px; }
}

@media (max-width: 992px) {
    .cgrid { grid-template-columns: repeat(3, 1fr); }
    .casino-hero { padding: 28px 24px; }
    .casino-hero__title { font-size: 22px; }
    .casino-hero__visual { width: 200px; height: 160px; }
    .crown::before { font-size: 110px; line-height: 110px; }
    .side-rail { width: 56px; }
    .casino-layout { grid-template-columns: 56px 1fr; gap: 14px; }
}

@media (max-width: 768px) {
    .casino-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .side-rail {
        display: none;
    }
    .casino-header {
        flex-wrap: wrap;
        padding: 10px 12px;
        margin-bottom: 12px;
        gap: 10px;
    }
    .casino-header__title {
        order: -1;
        flex: 1 1 100%;
        text-align: left;
        font-size: 16px;
        letter-spacing: 0.5px;
    }
    .breadcrumb { font-size: 12px; }
    .search-box {
        width: 100%;
        flex: 1 1 100%;
        padding: 6px 12px;
    }
    .search-box input { font-size: 12px; }

    .casino-hero {
        grid-template-columns: 1fr;
        padding: 20px 16px;
        gap: 14px;
        margin-bottom: 14px;
    }
    .casino-hero__title {
        font-size: 18px;
        line-height: 1.25;
    }
    .casino-hero__sub {
        font-size: 12px;
        margin-bottom: 14px;
    }
    .casino-hero__visual {
        width: 100%;
        height: 110px;
        order: -1;
    }
    .crown::before { font-size: 80px; line-height: 80px; }
    .crown { width: 100px; height: 80px; }
    .coin { width: 22px !important; height: 22px !important; }
    .coin--1 { right: 25%; top: 10px; }
    .coin--2 { right: 15%; top: 30px; }
    .coin--3 { right: 30%; bottom: 10px; }
    .coin--4 { right: 40%; bottom: 5px; }
    .coin--5 { left: 25%; top: 20px; }
    .coin--6 { left: 18%; bottom: 15px; }

    .casino-hero .btn { height: 38px; padding: 0 18px; font-size: 12px; }

    /* Filters horizontal scroll */
    .casino-filters {
        padding: 0 4px;
        margin-bottom: 12px;
    }
    .filter-tab {
        padding: 12px 10px;
        font-size: 12px;
        gap: 6px;
    }
    .filter-tab i { font-size: 12px; }
    .filter-tab::after { left: 10px; right: 10px; }

    /* GRID — 2 columns on mobile */
    .cgrid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
    .cgame__art {
        font-size: 16px;
        padding: 8px;
    }
    .cgame__art-text small { font-size: 9px; }
    .cgame__art-text big { font-size: 16px; }
    .cgame__art-icon { font-size: 48px; }
    .cgame__badge {
        font-size: 9px;
        padding: 3px 7px;
        top: 6px;
        left: 6px;
    }
    .cgame__title { font-size: 12px; }
    .cgame__provider { font-size: 10px; }
    .cgame__body { padding: 8px 10px; }
    .cgame__play { width: 44px; height: 44px; font-size: 16px; }
    .cgame__demo { font-size: 10px; padding: 4px 10px; }

    .load-more {
        height: 40px;
        padding: 0 22px;
        font-size: 12px;
        margin: 18px auto 0;
    }
}

/* ---------- Small mobile (≤ 420px) ---------- */
@media (max-width: 420px) {
    .casino-hero__title { font-size: 16px; }
    .casino-hero__sub { font-size: 11px; }
    .casino-hero__visual { height: 90px; }
    .crown::before { font-size: 64px; line-height: 64px; }

    .filter-tab { padding: 10px 8px; font-size: 11px; }

    .cgrid { gap: 8px; }
    .cgame__art-text big { font-size: 14px; }
    .cgame__art-icon { font-size: 40px; }
    .cgame__title { font-size: 11px; }
    .cgame__provider { font-size: 9px; }
}

/* ---------- Provider responsive ---------- */
@media (max-width: 768px) {
    .providers-bar__toggle {
        padding: 12px 14px;
        font-size: 12px;
        gap: 10px;
    }
    .providers-bar__toggle .count {
        font-size: 10px;
        padding: 3px 10px;
    }
    .providers-list {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px;
        padding: 0 10px;
    }
    .providers-bar.is-open .providers-list {
        padding: 10px 10px 12px;
    }
    .provider {
        height: 50px;
        padding: 6px 8px;
    }
    .provider img {
        max-height: 26px;
    }
    .provider--all {
        font-size: 11px;
    }
    .cgame__live-info { padding: 6px 8px; }
    .cgame__live-info .seats { font-size: 10px; }
    .cgame__live-info .stake { font-size: 9px; }
}

@media (max-width: 420px) {
    .providers-list {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .provider { height: 46px; }
    .provider img { max-height: 22px; }
}

/* ---------- Tiny mobile (≤ 340px) ---------- */
@media (max-width: 340px) {
    .cgrid { grid-template-columns: 1fr !important; }
}
