@import url('theme.css');

* { box-sizing: border-box; font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }
body {
    background: var(--wp-gradient-h);
    background-attachment: fixed;
    color: #fff;
    margin: 0;
    padding: 0;
    padding-bottom: 118px;
    min-height: 100vh;
}
.top-divider {
    height: 1px; width: 85%; margin: 5px auto 10px;
    background: linear-gradient(to right, transparent, rgba(255, 207, 75, 0.5), transparent);
}
.top-nav { display: flex; justify-content: space-around; padding: 5px 10px 10px; font-size: 11px; text-align: center; }
.top-nav-item { display: flex; flex-direction: column; align-items: center; color: var(--wp-text-secondary, #cbd5e1); gap: 6px; flex: 1; cursor: pointer; }
.top-nav-icon { font-size: 22px; color: var(--wp-primary-light, #7dd3fc); }
.eight-ball { width: 22px; height: 22px; background: var(--wp-primary, #38bdf8); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #0a1628; font-weight: bold; font-size: 14px; }
.banner { margin: 0 15px; height: 145px; border-radius: 10px; background: var(--wp-bg-card, #132238); position: relative; overflow: hidden; border: 1px solid var(--wp-border-light, rgba(125,211,252,0.2)); box-shadow: var(--wp-shadow-md, 0 4px 12px rgba(0,0,0,0.4)); cursor: pointer; }
.banner::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 35px;
    background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
    z-index: 1;
    pointer-events: none;
}
.slides-wrapper { display: flex; width: 100%; height: 100%; transition: transform 0.5s ease-in-out; }
.slide-img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: fill; }
.banner-dots { position: absolute; bottom: 8px; left: 0; width: 100%; display: flex; justify-content: center; gap: 5px; z-index: 2; }
.dot { width: 6px; height: 6px; background: rgba(255,255,255,0.4); border-radius: 50%; transition: all 0.3s; }
.dot.active { width: 14px; border-radius: 4px; background: #00e5ff; box-shadow: 0 0 8px #00e5ff; }
.notice-bar { margin: 10px 15px; height: 35px; background: var(--wp-bg-header, #0f2137); border: 1px solid var(--wp-border-light, rgba(125,211,252,0.2)); border-radius: 6px; display: flex; align-items: center; padding: 0 12px; gap: 10px; overflow: hidden; cursor: pointer; }
.notice-icon { color: var(--wp-primary-light, #7dd3fc); font-size: 14px; }
.ticker-text { color: var(--wp-text-secondary, #cbd5e1); font-size: 14px; white-space: nowrap; width: 100%; }
.action-grid { display: flex; justify-content: space-between; margin: 15px; gap: 8px; }
.action-card {
    flex: 1;
    border-radius: 12px;
    padding: 16px 2px 14px;
    text-align: center;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #fff;
    background: #142038;
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.action-card:active { transform: scale(0.95); box-shadow: 0 0 16px rgba(56, 189, 248, 0.18); }
.card-icon { font-size: 24px; color: #7dd3fc; }
.jackpot-container {
    margin: 15px;
    background: linear-gradient(145deg, #e0f2fe 0%, #bae6fd 35%, #7dd3fc 70%, #38bdf8 100%);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 12px;
    padding: 25px 15px;
    text-align: center;
    box-shadow: 0 8px 28px rgba(56, 189, 248, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.65);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}
.jackpot-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.45), transparent 55%),
                radial-gradient(circle at 80% 100%, rgba(14, 165, 233, 0.2), transparent 50%);
    pointer-events: none;
}
.jackpot-container > * { position: relative; z-index: 1; }
.jackpot-title { color: #0c4a6e; font-size: 14px; font-weight: 800; margin-bottom: 5px; text-shadow: none; }
.jackpot-title i { color: #ca8a04; margin-right: 4px; }
.jackpot-amount { color: #b45309; font-size: 34px; font-weight: bold; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); margin: 0; }
.jackpot-sub { color: #075985; font-size: 11px; font-weight: 600; margin: 5px 0 20px; }
.btn-play { background: linear-gradient(to bottom, #0284c7, #0369a1); color: #fff; padding: 10px 45px; border: 2px solid var(--wp-primary-light, #7dd3fc); border-radius: 30px; font-size: 18px; cursor: pointer; box-shadow: 0 5px 0 #075985, 0 8px 10px rgba(0,0,0,0.6); transition: transform 0.2s, box-shadow 0.2s; }
.btn-play:active { transform: translateY(5px); box-shadow: 0 0 0 #0369a1; }

.home-quick-links {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin: 0 15px 15px;
}
.home-quick-links--top {
    margin: 4px 12px 12px;
    padding: 2px 0 4px;
}
.home-quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #e2e8f0;
}
.home-quick-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    border: 1px solid rgba(56, 189, 248, 0.25);
    background: rgba(15, 23, 42, 0.85);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.home-quick-link:active .home-quick-icon { transform: scale(0.92); }
.home-quick-icon--cyan { color: #38bdf8; border-color: rgba(56, 189, 248, 0.45); box-shadow: 0 0 12px rgba(56, 189, 248, 0.15); }
.home-quick-icon--gold { color: #fbbf24; border-color: rgba(251, 191, 36, 0.45); box-shadow: 0 0 12px rgba(251, 191, 36, 0.12); }
.home-quick-icon--green { color: #4ade80; border-color: rgba(74, 222, 128, 0.4); }
.home-quick-icon--blue { color: #60a5fa; border-color: rgba(96, 165, 250, 0.4); }
.home-quick-icon--violet { color: #c084fc; border-color: rgba(192, 132, 252, 0.45); box-shadow: 0 0 12px rgba(192, 132, 252, 0.12); }
.home-quick-label { font-size: 10px; font-weight: 600; color: #94a3b8; }

.home-invite-card {
    margin: 0 15px 15px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.18) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.1);
    transition: transform 0.2s ease;
}
.home-invite-card:active { transform: scale(0.98); }
.home-invite-title { font-size: 15px; font-weight: 800; color: #f8fafc; margin-bottom: 3px; }
.home-invite-title i { color: #fbbf24; margin-right: 4px; }
.home-invite-sub { font-size: 11px; color: #94a3b8; margin-bottom: 6px; }
.home-invite-code { font-size: 12px; color: #7dd3fc; }
.home-invite-code strong { color: #38bdf8; letter-spacing: 0.5px; }
.home-invite-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.home-invite-badge {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #0a1628;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 20px;
    white-space: nowrap;
}
.home-invite-go { color: #38bdf8; font-size: 18px; }

.home-wins-strip {
    margin: 0 15px 15px;
    padding: 12px 14px;
    background: rgba(10, 22, 40, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 12px;
    overflow: hidden;
}
.home-wins-title {
    font-size: 12px;
    font-weight: 700;
    color: #7dd3fc;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.home-wins-title i { color: #fbbf24; margin-right: 4px; }
.home-wins-viewport { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.home-wins-track {
    display: flex;
    gap: 8px;
    width: max-content;
    animation: homeWinsScroll 22s linear infinite;
}
.home-win-chip {
    flex-shrink: 0;
    padding: 6px 12px;
    background: rgba(30, 58, 95, 0.6);
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-radius: 20px;
    font-size: 11px;
    color: #cbd5e1;
    white-space: nowrap;
}
.home-win-chip strong { color: #fbbf24; }
.home-win-user { color: #38bdf8; margin-right: 4px; }
@keyframes homeWinsScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.stats-section.stats-pills {
    margin: 14px 12px 14px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
    width: auto;
    max-width: none;
    box-sizing: border-box;
}

.stats-pills-track {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
}

.stats-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 5px 9px;
    min-width: 0;
    min-height: 72px;
    width: 100%;
    border-radius: 14px;
    background: linear-gradient(165deg, rgba(18, 32, 52, 0.95) 0%, rgba(8, 14, 24, 0.98) 100%);
    border: 1px solid rgba(56, 189, 248, 0.28);
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.stats-pill-icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.04);
}

.stats-pill--online .stats-pill-icon { color: #4ade80; background: rgba(74, 222, 128, 0.12); box-shadow: 0 0 12px rgba(74, 222, 128, 0.2); }
.stats-pill--winners .stats-pill-icon { color: #fbbf24; background: rgba(251, 191, 36, 0.12); box-shadow: 0 0 12px rgba(251, 191, 36, 0.2); }
.stats-pill--today .stats-pill-icon { color: #a78bfa; background: rgba(167, 139, 250, 0.12); box-shadow: 0 0 12px rgba(167, 139, 250, 0.2); }
.stats-pill--rate .stats-pill-icon { color: #38bdf8; background: rgba(56, 189, 248, 0.12); box-shadow: 0 0 12px rgba(56, 189, 248, 0.2); }

.stats-pill-body {
    min-width: 0;
    width: 100%;
    line-height: 1.1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stats-pill-num {
    font-size: 13px;
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: -0.02em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    max-width: 100%;
}

.stats-pill-label {
    font-size: 9px;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1.2;
    text-align: center;
    max-width: 100%;
    letter-spacing: 0.01em;
}

@media (max-width: 360px) {
    .stats-section.stats-pills {
        margin: 12px 10px 12px;
    }

    .stats-pills-track {
        gap: 5px;
    }

    .stats-pill {
        padding: 8px 3px 8px;
        min-height: 68px;
        border-radius: 12px;
    }

    .stats-pill-icon {
        width: 26px;
        height: 26px;
        font-size: 12px;
        border-radius: 8px;
    }

    .stats-pill-num {
        font-size: 11px;
    }

    .stats-pill-label {
        font-size: 8px;
    }
}

/* Legacy glass stats (fallback) */
.stats-section.stats-glass {
    margin: 20px 15px 15px;
    padding: 16px 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
    background: rgba(10, 22, 40, 0.72);
    backdrop-filter: blur(16px) saturate(1.25);
    -webkit-backdrop-filter: blur(16px) saturate(1.25);
    border-radius: 16px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.35),
        0 0 24px rgba(56, 189, 248, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
}

.stats-section.stats-glass::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.06) 0%, transparent 45%, rgba(251, 191, 36, 0.03) 100%);
    pointer-events: none;
}

.stats-glass .stats-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 4px 6px;
    position: relative;
    z-index: 1;
    min-width: 0;
}

.stats-glass .stats-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 12%;
    height: 76%;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(148, 163, 184, 0.35), transparent);
}

.stats-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.04);
}

.stats-icon--blue { color: #38bdf8; box-shadow: 0 0 12px rgba(56, 189, 248, 0.25); }
.stats-icon--orange { color: #fb923c; box-shadow: 0 0 12px rgba(251, 146, 60, 0.22); }
.stats-icon--green { color: #4ade80; box-shadow: 0 0 12px rgba(74, 222, 128, 0.22); }
.stats-icon--gold { color: #fbbf24; box-shadow: 0 0 12px rgba(251, 191, 36, 0.25); }

.stats-glass .stats-num {
    font-size: 15px;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1.15;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.stats-glass .stats-label {
    font-size: 10px;
    font-weight: 500;
    color: #94a3b8;
    line-height: 1.2;
}

@media (max-width: 380px) {
    .stats-glass .stats-num { font-size: 13px; }
    .stats-glass .stats-label { font-size: 9px; }
    .stats-icon-wrap { width: 28px; height: 28px; font-size: 13px; }
}

/* Legacy stats (fallback) */
.stats-section:not(.stats-glass) {
    margin: 25px 15px 15px;
    background: var(--wp-bg-card, #132238);
    border-radius: 10px;
    padding: 15px 10px;
    display: flex;
    justify-content: space-around;
    text-align: center;
    font-size: 11px;
    border: 1px solid var(--wp-border-light, rgba(125,211,252,0.2));
}
.stats-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stats-item span { color: var(--wp-text-muted, #94a3b8); }
.stats-val { font-weight: bold; font-size: 13px; display: flex; align-items: center; gap: 4px; }
.stat-icon-blue { color: #38bdf8; } .stat-icon-orange { color: #7dd3fc; } .stat-icon-green { color: #4ade80; } .stat-icon-yellow { color: #fbbf24; }
.daily-rewards { margin: 15px; background: linear-gradient(135deg, #1a3a5c 0%, #132238 50%, #0a1628 100%); border-radius: 16px; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; border: 2px solid rgba(56,189,248,0.35); box-shadow: 0 0 20px rgba(56,189,248,0.15), 0 8px 32px rgba(0,0,0,0.5); position: relative; overflow: hidden; cursor: pointer; transition: all 0.3s ease; }
.daily-rewards::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.1), transparent);
    transform: skewX(-25deg);
    animation: glassShine 4s infinite;
}
@keyframes glassShine { 0% { left: -100%; } 20% { left: 150%; } 100% { left: 150%; } }
.reward-coin { width: 55px; filter: drop-shadow(0 0 15px rgba(56,189,248,0.7)) drop-shadow(0 0 8px rgba(14,165,233,0.4)); animation: floatCoin 2.5s ease-in-out infinite; }
@keyframes floatCoin { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-6px) rotate(5deg); } }
.reward-text { flex: 1; padding: 0 15px; text-align: center; }
.reward-title { font-size: 16px; font-weight: 900; }
.reward-sub { color: #7dd3fc; font-size: 12px; font-weight: bold; }
.reward-btn { background: var(--wp-gradient-btn, linear-gradient(135deg, #38bdf8, #0284c7)); color: #fff; border: 2px solid rgba(255,255,255,0.3); border-radius: 25px; padding: 10px 28px; font-weight: bold; cursor: pointer; }
.games-section { margin: 0 15px 20px; }
.games-header { margin-bottom: 12px; font-size: 18px; font-weight: bold; }

.games-share-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.18) 0%, rgba(15, 23, 42, 0.95) 55%, rgba(10, 15, 30, 0.98) 100%);
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.games-share-main { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.games-share-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #38bdf8, #0284c7);
    color: #fff;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.35);
}
.games-share-text { min-width: 0; }
.games-share-title { font-size: 13px; font-weight: 800; line-height: 1.2; }
.games-share-code { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.games-share-code strong { color: #fde047; letter-spacing: 0.04em; }
.games-share-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.games-share-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, opacity 0.15s;
}
.games-share-btn:active { transform: scale(0.92); }
.games-share-btn--wa { background: #25d366; }
.games-share-btn--tg { background: #229ed9; }
.games-share-btn--copy { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.15); font-size: 14px; }
.games-share-more {
    font-size: 11px;
    font-weight: 700;
    color: #38bdf8;
    text-decoration: none;
    padding: 6px 8px;
    white-space: nowrap;
}
.games-share-bar--guest {
    cursor: pointer;
    justify-content: flex-start;
    gap: 12px;
}
.games-share-guest-text { flex: 1; font-size: 13px; font-weight: 600; color: #cbd5e1; }
.games-share-guest-go { color: #64748b; font-size: 14px; }

#share-toast-container {
    position: fixed;
    bottom: 110px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    pointer-events: none;
}
.share-toast {
    background: rgba(15, 33, 55, 0.95);
    color: #fff;
    padding: 12px 22px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(56, 189, 248, 0.3);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    transform: translateY(20px);
}
.share-toast.show { opacity: 1; transform: translateY(0); }

.games-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.game-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--wp-bg-card, #132238);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(255,255,255,0.06);
    animation: gameCardIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.game-card:nth-child(1) { animation-delay: 0.02s; }
.game-card:nth-child(2) { animation-delay: 0.06s; }
.game-card:nth-child(3) { animation-delay: 0.1s; }
.game-card:nth-child(4) { animation-delay: 0.14s; }
.game-card:nth-child(5) { animation-delay: 0.18s; }
.game-card:nth-child(6) { animation-delay: 0.22s; }
.game-card:nth-child(7) { animation-delay: 0.26s; }
.game-card:nth-child(8) { animation-delay: 0.3s; }
.game-card:nth-child(9) { animation-delay: 0.34s; }
.game-card:nth-child(n+10) { animation-delay: 0.38s; }

@keyframes gameCardIn {
    from { opacity: 0; transform: translateY(14px) scale(0.92); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.game-card:active { transform: scale(0.95); }

.game-card-icon {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 26px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 2px 0;
    pointer-events: none;
}
.game-card-icon::before {
    content: '';
    position: absolute;
    inset: 8% 8% 12%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.14) 0%, transparent 68%);
    pointer-events: none;
    z-index: 0;
}
.game-card-icon img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.6)) saturate(1.18) contrast(1.08);
    animation: gameIconFloat 3.5s ease-in-out infinite;
    will-change: transform;
}

.game-card::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.12) 50%, transparent 58%);
    transform: translateX(-130%) skewX(-12deg);
    animation: gameCardShimmer 5s ease-in-out infinite;
}

.game-card:nth-child(3n+1) .game-card-icon img { animation-delay: 0s; }
.game-card:nth-child(3n+2) .game-card-icon img { animation-delay: 0.4s; }
.game-card:nth-child(3n+3) .game-card-icon img { animation-delay: 0.8s; }

.game-card:nth-child(3n+1)::after { animation-delay: 0.2s; }
.game-card:nth-child(3n+2)::after { animation-delay: 1.4s; }
.game-card:nth-child(3n+3)::after { animation-delay: 2.6s; }

.badge-tr {
    animation: badgePulse 2.5s ease-in-out infinite;
}

@keyframes gameIconFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-6px) scale(1.06); }
}

@keyframes gameCardShimmer {
    0%, 72%, 100% { transform: translateX(-130%) skewX(-12deg); opacity: 0; }
    78% { opacity: 1; }
    88% { transform: translateX(130%) skewX(-12deg); opacity: 0; }
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 rgba(255, 255, 255, 0); }
    50% { box-shadow: 0 0 10px rgba(255, 255, 255, 0.25); }
}

/* WinGo game card */
.game-card--wingo {
    background:
        radial-gradient(circle at 50% 28%, rgba(56, 189, 248, 0.28) 0%, transparent 45%),
        radial-gradient(circle at 25% 75%, rgba(34, 197, 94, 0.18) 0%, transparent 50%),
        linear-gradient(155deg, #0c1445 0%, #1e3a5f 45%, #0f172a 100%);
    border: 1px solid rgba(56, 189, 248, 0.32);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), 0 0 18px rgba(56, 189, 248, 0.15);
}
.game-card--wingo::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        radial-gradient(1px 1px at 22% 30%, rgba(255,255,255,0.65), transparent),
        radial-gradient(1.2px 1.2px at 72% 25%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 50% 58%, rgba(255,255,255,0.35), transparent);
}
.game-card--wingo .game-card-icon img { filter: drop-shadow(0 8px 20px rgba(56, 189, 248, 0.55)) saturate(1.15); }
.game-card--wingo .game-title { background: linear-gradient(to top, rgba(12, 20, 69, 0.96) 0%, rgba(30, 58, 95, 0.55) 55%, transparent 100%); }

/* Chicken game card */
.game-card--chicken {
    background:
        radial-gradient(circle at 50% 30%, rgba(251, 191, 36, 0.32) 0%, transparent 45%),
        radial-gradient(circle at 70% 75%, rgba(34, 197, 94, 0.15) 0%, transparent 50%),
        linear-gradient(155deg, #1a1208 0%, #422006 42%, #0f172a 100%);
    border: 1px solid rgba(251, 191, 36, 0.35);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), 0 0 18px rgba(251, 191, 36, 0.15);
}
.game-card--chicken::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        radial-gradient(1px 1px at 25% 35%, rgba(255,255,255,0.6), transparent),
        radial-gradient(1.2px 1.2px at 75% 28%, rgba(255,255,255,0.45), transparent);
}
.game-card--chicken .game-card-icon img { filter: drop-shadow(0 8px 20px rgba(251, 191, 36, 0.55)) saturate(1.15); }
.game-card--chicken .game-title { background: linear-gradient(to top, rgba(26, 18, 8, 0.96) 0%, rgba(66, 32, 6, 0.55) 55%, transparent 100%); }

.game-card--poster {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.22s cubic-bezier(0.34, 1.2, 0.64, 1), box-shadow 0.22s ease;
}

/* Casino-style game tiles (games.php / home grid) */
.game-card--tile {
    background: #0b1220;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: transform 0.22s cubic-bezier(0.34, 1.2, 0.64, 1), box-shadow 0.22s ease, border-color 0.22s ease;
}

.game-card--tile::before,
.game-card--tile::after {
    display: none;
}

.game-card--tile .game-card-art {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    border-radius: inherit;
}

.game-card--tile .game-card-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transform: scale(1.02);
    filter: saturate(1.14) contrast(1.06) brightness(1.03);
    transition: transform 0.35s ease, filter 0.35s ease;
}

.game-card--tile .game-card-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, transparent 38%, rgba(0, 0, 0, 0.18) 68%, rgba(0, 0, 0, 0.82) 100%),
        radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.12) 0%, transparent 52%);
}

.game-card--tile .game-title {
    display: block;
    z-index: 3;
    padding: 28px 8px 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.45) 55%, transparent 100%);
}

.game-card--tile .badge-tl,
.game-card--tile .badge-tr {
    z-index: 4;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.game-card--tile:active {
    transform: scale(0.97);
}

@media (hover: hover) {
    .game-card--tile:hover {
        transform: translateY(-4px) scale(1.03);
        box-shadow:
            0 14px 30px rgba(0, 0, 0, 0.5),
            0 0 22px rgba(56, 189, 248, 0.14);
    }
    .game-card--tile:hover .game-card-cover {
        transform: scale(1.08);
        filter: saturate(1.22) contrast(1.08) brightness(1.08);
    }
}

.game-card--tile.game-card--wingo { border-color: rgba(56, 189, 248, 0.35); box-shadow: 0 6px 16px rgba(0,0,0,0.45), 0 0 14px rgba(56,189,248,0.12); }
.game-card--tile.game-card--chicken { border-color: rgba(251, 191, 36, 0.35); box-shadow: 0 6px 16px rgba(0,0,0,0.45), 0 0 14px rgba(251,191,36,0.12); }

.game-card--poster:active {
    transform: scale(0.97);
}

@media (hover: hover) {
    .game-card--poster:hover {
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 20px rgba(56, 189, 248, 0.12);
    }
}
.game-card--poster::before,
.game-card--poster::after {
    display: none;
}
.game-card--poster .game-card-icon {
    bottom: 0;
    padding: 12% 14% 10%;
    align-items: center;
    justify-content: center;
}
.game-card--poster .game-card-icon::before {
    display: none;
}
.game-card--poster .game-card-icon img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
    filter: saturate(1.12) contrast(1.05) brightness(1.02) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
    animation: none;
    transform: translateZ(0);
}
.game-card--poster .game-title {
    display: none;
}
.game-card--poster .badge-tl,
.game-card--poster .badge-tr {
    z-index: 4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.game-title { position: absolute; bottom: 0; left: 0; width: 100%; padding: 24px 6px 7px; background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, transparent 100%); font-size: 11px; font-weight: 700; z-index: 2; text-align: center; line-height: 1.2; }
.badge-tl { position: absolute; top: 0; left: 0; padding: 2px 8px; font-size: 10px; font-weight: bold; color: #fff; border-radius: 0 0 8px 0; z-index: 3; }
.badge-top { background: #38bdf8; } .badge-tb { background: #8bc34a; } .badge-jili { background: #e040fb; }
.badge-tr { position: absolute; top: 6px; right: 6px; background: #000; color: #fff; padding: 2px 6px; border-radius: 12px; font-size: 10px; font-weight: bold; z-index: 3; }
.footer-container {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 414px;
    z-index: 1000;
    padding: 0;
    margin: 0;
    background: transparent;
    pointer-events: none;
}

.footer-bg-img,
.wheel-click-area,
.footer-icon-img,
.footer-games-ring {
    display: none !important;
}

.footer-dock--fab {
    pointer-events: auto;
    position: relative;
    width: 100%;
    min-height: calc(72px + env(safe-area-inset-bottom, 0px));
    overflow: visible;
    background: #0c121c;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

.footer-bar-svg {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: calc(72px + env(safe-area-inset-bottom, 0px));
    display: block;
    filter: none;
}

.footer-games-fab {
    position: absolute;
    left: 50%;
    top: -30px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    z-index: 4;
    -webkit-tap-highlight-color: transparent;
}

.footer-games-fab:active {
    transform: translateX(-50%) scale(0.94);
}

.footer-games-fab-ring {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 28%, #1e3248 0%, #0a1018 72%);
    border: 2px solid #38bdf8;
    box-shadow:
        0 0 0 4px rgba(56, 189, 248, 0.15),
        0 0 24px rgba(56, 189, 248, 0.45),
        0 8px 20px rgba(0, 0, 0, 0.5),
        inset 0 2px 6px rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.footer-games-fab.active .footer-games-fab-ring {
    border-color: #7dd3fc;
    box-shadow:
        0 0 0 5px rgba(56, 189, 248, 0.22),
        0 0 32px rgba(56, 189, 248, 0.55),
        0 10px 24px rgba(0, 0, 0, 0.55);
}

.footer-games-fab .footer-fa-icon {
    color: #38bdf8;
    font-size: 22px;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.5));
}

.footer-games-fab.active .footer-fa-icon {
    color: #7dd3fc;
}

.footer-games-fab-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: color 0.22s ease;
}

.footer-games-fab.active .footer-games-fab-label {
    color: #38bdf8;
}

.footer-nav--fab {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr 72px 1fr 1fr;
    align-items: flex-end;
    padding: 28px 4px calc(8px + env(safe-area-inset-bottom, 0px));
    gap: 0;
    min-height: calc(72px + env(safe-area-inset-bottom, 0px));
}

.footer-center-spacer {
    display: block;
}

.footer-side-btn {
    flex: unset;
    gap: 5px;
    padding: 0 2px 4px;
    border-radius: 0;
    background: transparent !important;
}

.footer-side-btn:active {
    transform: scale(0.92);
}

.footer-side-btn--promo {
    transform: translateX(-24px);
}

.footer-side-btn--earn {
    transform: translateX(24px);
}

.footer-side-btn--promo:active {
    transform: translateX(-24px) scale(0.92);
}

.footer-side-btn--earn:active {
    transform: translateX(24px) scale(0.92);
}

.footer-side-btn .footer-icon-wrap {
    width: auto;
    height: auto;
    min-height: 22px;
    border: none;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0;
}

.footer-side-btn .footer-fa-icon {
    font-size: 21px;
    color: #64748b;
    filter: none;
    transition: color 0.22s ease, filter 0.22s ease;
}

.footer-side-btn .footer-label {
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    opacity: 1;
    transition: color 0.22s ease;
}

.footer-side-btn.active .footer-fa-icon {
    color: #38bdf8;
    filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.45));
}

.footer-side-btn.active .footer-label {
    color: #38bdf8;
    font-weight: 700;
}

/* Legacy dock classes — keep for other pages referencing footer-btn */
.footer-dock {
    pointer-events: auto;
    position: relative;
}

.footer-nav {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #64748b;
    gap: 5px;
    min-width: 0;
    -webkit-tap-highlight-color: transparent;
}

.footer-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-fa-icon {
    transition: color 0.22s ease, transform 0.22s ease;
}

.footer-label {
    line-height: 1;
    transition: color 0.22s ease, font-weight 0.22s ease;
}

#ios-toast-container {
    position: fixed;
    bottom: 112px;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    z-index: 9999;
    pointer-events: none;
    display: none;
}
#ios-toast-container.show {
    display: block;
    transform: translateX(-50%) scale(1);
}
.ios-toast {
    background: rgba(20,20,20,0.75);
    backdrop-filter: blur(12px);
    padding: 10px 24px;
    border-radius: 50px;
    color: #fff;
    font-size: 13px;
    border: 1px solid rgba(255,255,255,0.15);
    white-space: nowrap;
}

.bet-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
    border-radius: 10px;
    padding: 16px;
    min-width: 280px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    z-index: 9999;
    animation: slideInRight 0.3s ease-out;
}
@keyframes slideInRight {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
.notification-content { display: flex; align-items: center; gap: 12px; position: relative; }
.notification-icon { font-size: 28px; color: #ffd700; flex-shrink: 0; }
.notification-title { color: #fff; font-weight: bold; font-size: 14px; margin-bottom: 4px; }
.notification-amount { color: #ffd700; font-weight: bold; font-size: 16px; }
.notification-close {
    position: absolute; top: -8px; right: -8px; background: rgba(0,0,0,0.3);
    border: none; color: #fff; font-size: 24px; cursor: pointer; width: 30px; height: 30px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
@media (max-width: 600px) {
    .bet-notification { right: 10px; left: 10px; min-width: auto; }
}

.app-download-section {
    margin: 0 15px 15px;
    background: linear-gradient(135deg, #1a3a5c 0%, #132238 50%, #0a1628 100%);
    border-radius: 12px;
    padding: 16px 18px;
    text-align: center;
    display: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    border: 1px solid rgba(56,189,248,0.3);
    position: relative;
    overflow: hidden;
}
.app-download-section.show { display: block; }
.app-download-section::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(56,189,248,0.1), transparent);
    transform: skewX(-25deg);
    animation: glassShine 4s infinite 1s;
}
.app-download-icon { font-size: 38px; margin-bottom: 8px; animation: floatIcon 3s ease-in-out infinite; display: inline-block; position: relative; z-index: 2; }
@keyframes floatIcon { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.app-download-title { font-size: 16px; font-weight: 900; margin-bottom: 4px; position: relative; z-index: 2; }
.app-download-text { font-size: 12px; color: #7dd3fc; margin-bottom: 12px; font-weight: bold; position: relative; z-index: 2; }
.app-download-btn {
    background: var(--wp-gradient-btn, linear-gradient(to bottom, #38bdf8, #0284c7));
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    padding: 10px 28px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 2;
}
.app-download-bonus { font-size: 11px; margin-top: 8px; color: #7dd3fc; font-weight: bold; position: relative; z-index: 2; }

#ios-toast-container {
