/* ============================================================
   STYLE.CSS - RTP Slot Display v2
   Glass cards, fixed footer, full theme customization
   ============================================================ */

/* --- Theme Variables (overridden by PHP inline) --- */
:root {
    --theme-color: #F10B0B;
    --theme-rgb: 241, 11, 11;
    --bg-start: #0a0a0a;
    --bg-end: #0d1117;
    --bg-card: #111827;
    --bg-sidebar: #0f172a;
    --bg-header: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #1e293b;
    --green: #28a745;
    --yellow: #ffd800;
    --orange: #fd7e14;
    --red: #dc3545;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: 12px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Segoe UI', Avenir, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.825rem;
    background: linear-gradient(180deg, var(--bg-start) 0%, var(--bg-end) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--theme-color); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.85; }
img { vertical-align: middle; max-width: 100%; }

/* --- Layout Flex Push Footer --- */
.page-content { flex: 1 0 auto; }
.footer { flex-shrink: 0; }

/* --- Container --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0.75rem;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    background: linear-gradient(135deg, var(--bg-sidebar) 0%, #1a1a2e 100%);
    border-bottom: 2px solid var(--theme-color);
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
@media (max-width: 992px) {
    .navbar { padding: 0.35rem 0; }
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.navbar-logo img { height: 40px; width: auto; }

.navbar-actions { display: flex; gap: 0.5rem; align-items: center; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.15); }
.btn:active { transform: translateY(0); }

.btn-login {
    background: transparent;
    border: 1.5px solid var(--theme-color);
    color: var(--theme-color);
}

.btn-register {
    background: var(--theme-color);
    color: #fff;
    box-shadow: 0 2px 10px rgba(var(--theme-rgb), 0.4);
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.main-wrapper {
    display: flex;
    gap: 0;
    padding: 0.75rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}
@media (max-width: 992px) {
    .main-wrapper { padding: 0.35rem 0.5rem; }
}

/* --- Sidebar Desktop --- */
.sidebar {
    width: 200px;
    flex-shrink: 0;
    display: none;
}
@media (min-width: 992px) { .sidebar { display: block; } }

.sidebar-list {
    background: var(--bg-sidebar);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    position: sticky;
    top: 70px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 500;
}
.sidebar-item:last-child { border-bottom: none; }
.sidebar-item:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}
.sidebar-item.active {
    background: linear-gradient(90deg, rgba(var(--theme-rgb),0.35), transparent);
    color: #fff;
    font-weight: 700;
    border-left: 3px solid var(--theme-color);
}
.sidebar-item img {
    width: 28px; height: 28px;
    border-radius: 4px;
    object-fit: contain;
    background: rgba(255,255,255,0.08);
    padding: 2px;
}

/* --- Mobile Provider Carousel --- */
.mobile-providers { display: block; }
@media (min-width: 992px) { .mobile-providers { display: none; } }

.provider-carousel {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 0.35rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.provider-carousel::-webkit-scrollbar { display: none; }

/* --- Mobile Provider Card (text-only, clear & readable) --- */
.provider-card {
    flex-shrink: 0;
    cursor: pointer;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;

    /* Glass + Border */
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1.5px solid var(--glass-border);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);

    /* Typography */
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.2px;
    text-align: center;
}
.provider-card:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(var(--theme-rgb), 0.35);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.06),
        0 4px 12px rgba(0,0,0,0.3);
}
.provider-card.active {
    background: rgba(var(--theme-rgb), 0.15);
    border-color: var(--theme-color);
    color: #fff;
    font-weight: 700;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        0 0 10px rgba(var(--theme-rgb), 0.2);
}

/* --- Content Area --- */
.content-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
@media (min-width: 992px) { .content-area { margin-left: 0.75rem; } }

/* --- Marquee Running Text --- */
.marquee-bar {
    background: linear-gradient(90deg, rgba(var(--theme-rgb), 0.15), rgba(var(--theme-rgb), 0.05), rgba(var(--theme-rgb), 0.15));
    border: 1px solid rgba(var(--theme-rgb), 0.2);
    border-radius: 6px;
    padding: 6px 0;
    margin-bottom: 6px;
    overflow: hidden;
    position: relative;
}
/* Fade edges */
.marquee-bar::before,
.marquee-bar::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 30px;
    z-index: 2;
    pointer-events: none;
}
.marquee-bar::before {
    left: 0;
    background: linear-gradient(90deg, var(--bg-start), transparent);
}
.marquee-bar::after {
    right: 0;
    background: linear-gradient(270deg, var(--bg-start), transparent);
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marqueeScroll 25s linear infinite;
}

.marquee-text {
    flex-shrink: 0;
    padding-right: 80px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--theme-color);
    white-space: nowrap;
    letter-spacing: 0.3px;
    text-shadow: 0 0 8px rgba(var(--theme-rgb), 0.3);
}

@keyframes marqueeScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media (max-width: 576px) {
    .marquee-bar {
        margin-bottom: 4px;
        padding: 5px 0;
        border-radius: 4px;
    }
    .marquee-text { font-size: 0.7rem; }
}

/* --- RTP Header --- */
.rtp-header {
    background: var(--bg-header);
    border-radius: 10px 10px 0 0;
    padding: 0.65rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    border: 1px solid var(--glass-border);
    border-bottom: 2px solid var(--theme-color);
}

.rtp-title {
    font-size: 1rem;
    font-weight: 700;
    background: linear-gradient(
        90deg,
        var(--theme-color),
        #ff6b35,
        var(--yellow),
        var(--green),
        #00bcd4,
        var(--theme-color)
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
    flex-shrink: 0;
}
@keyframes shimmer { to { background-position: 200% center; } }

.info-text {
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0.8;
    white-space: nowrap;
    flex: 1;
    text-align: center;
}

.search-box {
    width: 100%;
    max-width: 220px;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-start);
    color: var(--text-primary);
    font-size: 0.8rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}
.search-box:focus {
    border-color: var(--theme-color);
    box-shadow: 0 0 0 2px rgba(var(--theme-rgb), 0.2);
}

@media (max-width: 576px) {
    .rtp-header {
        padding: 0.5rem 0.65rem;
        gap: 0.4rem;
    }
    .rtp-title { font-size: 0.8rem; }
    .info-text { display: none; }
    .search-box { max-width: 100%; flex: 1; }
}

/* ============================================================
   GAME CARDS GRID
   ============================================================ */
.game-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    padding: 10px;
    background: var(--bg-card);
    border-radius: 0 0 10px 10px;
    border: 1px solid var(--glass-border);
    border-top: none;
    min-height: 600px;
    align-content: start;
    flex: 1;
}

/* 6 → 5 */
@media (max-width: 1200px) {
    .game-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}
/* 5 → 4 */
@media (max-width: 900px) {
    .game-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        min-height: 500px;
    }
}
/* 4 → 3 */
@media (max-width: 576px) {
    .game-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
        padding: 6px;
        min-height: 400px;
    }
}

/* ============================================================
   GAME CARD - Glass Morphism + Theme Border
   ============================================================ */
.game-card {
    /* Glass Effect */
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));

    /* Theme Border Glow */
    border: 1px solid rgba(var(--theme-rgb), 0.25);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;

    /* Subtle inner glow */
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.06),
        0 2px 8px rgba(0,0,0,0.3);
}

.game-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--theme-rgb), 0.6);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        0 8px 25px rgba(0,0,0,0.5),
        0 0 15px rgba(var(--theme-rgb), 0.15);
}

/* Shine overlay on card */
.game-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(
        180deg,
        rgba(255,255,255,0.05) 0%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 1;
    border-radius: 10px 10px 0 0;
}

/* ---- HOT GAME CARD ---- */
.game-card-hot {
    border-color: rgba(255, 160, 0, 0.5);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        0 2px 12px rgba(255, 100, 0, 0.15),
        0 0 20px rgba(255, 100, 0, 0.08);
}
.game-card-hot:hover {
    border-color: rgba(255, 140, 0, 0.8);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.1),
        0 8px 25px rgba(0,0,0,0.5),
        0 0 25px rgba(255, 100, 0, 0.2);
}
.game-card-hot::before {
    background: linear-gradient(
        180deg,
        rgba(255, 140, 0, 0.08) 0%,
        transparent 100%
    );
}

/* Hot badge */
.hot-badge {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 12;
    background: linear-gradient(135deg, #ff0000, #cc0000, #990000);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 900;
    padding: 4px 10px 4px 7px;
    border-radius: 10px 0 8px 0;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    box-shadow:
        0 3px 12px rgba(255, 0, 0, 0.6),
        0 0 20px rgba(255, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 3px;
    line-height: 1;
    pointer-events: none;
    animation: hotPulse 1.5s ease-in-out infinite;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.hot-fire {
    font-size: 0.85rem;
    line-height: 1;
    filter: drop-shadow(0 0 3px rgba(255,100,0,0.8));
}

@keyframes hotPulse {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 3px 12px rgba(255,0,0,0.6), 0 0 20px rgba(255,0,0,0.3); }
    50%      { opacity: 1; transform: scale(1.06); box-shadow: 0 3px 16px rgba(255,0,0,0.8), 0 0 30px rgba(255,0,0,0.5); }
}

@media (max-width: 576px) {
    .hot-badge {
        font-size: 0.58rem;
        padding: 3px 8px 3px 5px;
    }
    .hot-fire { font-size: 0.72rem; }
}

/* Play overlay */
.game-card .play-overlay {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 55%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 10;
}
.game-card:hover .play-overlay { opacity: 1; }

.play-btn {
    background: var(--theme-color);
    color: #fff;
    padding: 0.4rem 1.3rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    letter-spacing: 1px;
    transition: transform 0.15s;
    box-shadow: 0 2px 12px rgba(var(--theme-rgb), 0.5);
}
.play-btn:hover { transform: scale(1.08); }

/* Game image */
.game-card .game-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 0;
}

/* Percent bar */
.percent-wrapper {
    position: relative;
    height: 20px;
    background: rgba(0,0,0,0.5);
    overflow: hidden;
}
.percent-fill {
    height: 100%;
    transition: width 0.6s cubic-bezier(0.4,0,0.2,1), background-color 0.3s;
    position: absolute;
    top: 0; left: 0;
}
.percent-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
    z-index: 2;
}

/* Rating colors */
.color-green  { background: linear-gradient(90deg, #1a8a3e, var(--green)); }
.color-yellow { background: linear-gradient(90deg, #c8a800, var(--yellow)); }
.color-orange { background: linear-gradient(90deg, #d46a0a, var(--orange)); }
.color-red    { background: linear-gradient(90deg, #a82030, var(--red)); }

/* Game name */
.game-name {
    padding: 0.3rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(0,0,0,0.3);
}

/* Jam & Pola */
.game-info {
    padding: 0.3rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.jam-gacor {
    text-align: center;
    padding: 0.2rem 0.3rem;
    border-radius: 5px;
    font-size: 0.6rem;
    font-weight: 700;
    color: #fff;
}
.jam-gacor.status-green  { background: var(--green); }
.jam-gacor.status-yellow { background: var(--yellow); color: #000; }
.jam-gacor.status-orange { background: var(--orange); color: #000; }
.jam-gacor.status-red    { background: var(--red); }

.pola-box {
    background: rgba(0,0,0,0.25);
    border-radius: 5px;
    padding: 0.25rem 0.3rem;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.04);
}
.pola-box .pola-title {
    font-size: 0.55rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.pola-box .pola-line {
    font-size: 0.55rem;
    color: var(--text-primary);
    margin: 1px 0;
    line-height: 1.3;
}
.pola-box.warning-mode {
    background: var(--red);
    border-color: rgba(220,53,69,0.5);
}
.pola-box.warning-mode .pola-line {
    font-weight: 700;
    font-size: 0.65rem;
}

/* ============================================================
   LOADING STATE
   ============================================================ */
.loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    grid-column: 1 / -1;
    gap: 1rem;
}
.loading-overlay p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--theme-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   FOOTER - Fixed at bottom, never jumps
   ============================================================ */
.footer {
    background: linear-gradient(135deg, var(--theme-color), #c20808);
    padding: 0.75rem;
    text-align: center;
    margin-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.footer p {
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast-container {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    pointer-events: none;
}
.toast-msg {
    background: linear-gradient(135deg, var(--theme-color), #d42020);
    color: #fff;
    padding: 0.6rem 1.5rem;
    border-radius: 8px 8px 0 0;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 -2px 15px rgba(0,0,0,0.4);
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
}
.toast-msg.show {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   CHAT BUBBLES (Always visible, direct click)
   ============================================================ */
.chat-bubbles {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

/* Individual bubble */
.chat-bubble {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 3px 12px rgba(0,0,0,0.35);
}
.chat-bubble svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}
.chat-bubble:hover {
    transform: scale(1.12);
    box-shadow: 0 5px 20px rgba(0,0,0,0.45);
}
.chat-bubble:active {
    transform: scale(0.95);
}

/* Tooltip label — appears on hover */
.chat-label {
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateY(-50%) translateX(6px);
}
.chat-label::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -4px;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-left-color: rgba(0, 0, 0, 0.85);
}
.chat-bubble:hover .chat-label {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* Per-service colors */
.chat-livechat { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.chat-whatsapp { background: linear-gradient(135deg, #25d366, #128c7e); }
.chat-telegram { background: linear-gradient(135deg, #2aabee, #229ed9); }
.chat-facebook { background: linear-gradient(135deg, #1877f2, #0e5fc4); }

/* Mobile */
@media (max-width: 576px) {
    .chat-bubbles {
        bottom: 16px;
        right: 14px;
        gap: 8px;
    }
    .chat-bubble {
        width: 42px;
        height: 42px;
    }
    .chat-bubble svg {
        width: 19px;
        height: 19px;
    }
    .chat-label {
        display: none;
    }
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-start); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* ============================================================
   UTILITY
   ============================================================ */
.hidden { display: none !important; }
.text-center { text-align: center; }

/* Responsive font sizing for very small screens */
@media (max-width: 360px) {
    .game-name { font-size: 0.58rem; }
    .pola-box .pola-line { font-size: 0.5rem; }
    .jam-gacor { font-size: 0.55rem; }
    .percent-text { font-size: 0.62rem; }
    .rtp-title { font-size: 0.85rem; }
    .provider-card { font-size: 0.68rem; padding: 0.4rem 0.65rem; }
}

@media (min-width: 361px) and (max-width: 576px) {
    .provider-card { font-size: 0.72rem; }
}
