/* ═══════════════════════════════════════════════════════════════
   HOME PAGE — FRESH CLEAN CSS
   ═══════════════════════════════════════════════════════════════ */

/* ─────────── HOME CONTENT WRAPPER ─────────── */
.home-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    overflow: hidden;
}

/* ─────────── SCROLLING BANNERS (MARQUEE) ─────────── */
.scrolling-banners {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.1);
    background: #0F172A;
}

.marquee-row {
    overflow: hidden;
    position: relative;
    width: 100%;
    background: linear-gradient(90deg, #0F172A, #1E293B);
    padding: 12px 0;
}

.marquee-row-alt {
    background: linear-gradient(90deg, #1E293B, #0F172A);
}

.marquee-track {
    display: flex;
    gap: 80px;
    white-space: nowrap;
    width: max-content;
    animation: marqueeRTL 75s linear infinite;
}

.marquee-track.marquee-ltr {
    animation: marqueeLTR 75s linear infinite;
}

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

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

.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #F1F5F9;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.marquee-dot {
    width: 6px;
    height: 6px;
    background: #10B981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10B981;
}

.marquee-cta {
    color: #10B981;
    font-weight: 800;
    margin-left: 6px;
}

/* ─────────── PREMIUM BANNER CAROUSEL ─────────── */
.premium-banner {
    position: relative;
    height: 200px;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, #10B981 0%, #3B82F6 100%);
}

.banner-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.banner-slide.active { opacity: 1; }
.banner-slide:nth-child(2) { background: linear-gradient(135deg, #F59E0B, #EF4444); }
.banner-slide:nth-child(3) { background: linear-gradient(135deg, #8B5CF6, #EC4899); }
.banner-slide:nth-child(4) { background: linear-gradient(135deg, #06B6D4, #3B82F6); }
.banner-slide:nth-child(5) { background: linear-gradient(135deg, #F97316, #EF4444); }

.banner-content h2 {
    font-size: 32px;
    color: white;
    margin-bottom: 12px;
    font-weight: 900;
}

.banner-content p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 20px;
    font-size: 16px;
}

.banner-content .btn-primary {
    background: white;
    color: #10B981;
    padding: 12px 32px;
    border-radius: 30px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
}

.banner-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.banner-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.banner-dots .dot.active {
    width: 24px;
    border-radius: 4px;
    background: white;
}

/* ─────────── INFO TICKER ─────────── */
.info-ticker {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--bg-800);
    border: 1px solid var(--bg-600);
    border-radius: 10px;
    overflow: hidden;
}

.ticker-icon {
    font-size: 16px;
    flex-shrink: 0;
    animation: tickerPulse 2s infinite;
}

.ticker-track {
    display: flex;
    gap: 40px;
    white-space: nowrap;
    animation: tickerScroll 60s linear infinite;
}

.ticker-item {
    color: var(--text-300);
    font-size: 13px;
    font-weight: 600;
}

@keyframes tickerPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

/* ─────────── RECENT BETS TICKER ─────────── */
.recent-bets-ticker {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: linear-gradient(90deg, rgba(16,185,129,0.08), rgba(15,23,42,0.9));
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 10px;
    overflow: hidden;
}

.recent-bets-ticker .ticker-scroll {
    display: flex;
    gap: 32px;
    white-space: nowrap;
    animation: betScroll 40s linear infinite;
}

.recent-bets-ticker:hover .ticker-scroll {
    animation-play-state: paused;
}

.recent-bets-ticker .bet-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #94A3B8;
    font-weight: 600;
}

.recent-bets-ticker .bet-item strong { color: #F1F5F9; }
.recent-bets-ticker .bet-game { color: #64748B; font-size: 11px; }
.recent-bets-ticker .bet-amount { color: #F59E0B; font-weight: 900; }

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

/* ─────────── LIVE TIME BAR ─────────── */
.live-time-bar {
    background: var(--bg-700);
    border: 1px solid var(--bg-600);
    border-radius: 16px;
    overflow: hidden;
}

.live-time-inner {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 0;
}

.time-item {
    padding: 20px 24px;
    border-right: 1px solid var(--bg-600);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.time-item:last-child { border-right: none; }

.time-item.highlight {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(59, 130, 246, 0.08));
}

.time-item.highlight-large {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(245, 158, 11, 0.1));
}

.time-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-400);
}

.time-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-100);
}

.time-value.accent { color: var(--accent); }

.time-value.countdown {
    color: var(--primary);
    font-family: 'Courier New', monospace;
    font-size: 28px;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

/* ─────────── GAME FILTER CHIPS ─────────── */
.game-filter-chips {
    display: flex;
    gap: 10px;
    padding: 8px 4px;
    overflow-x: auto;
}

.game-filter-chips::-webkit-scrollbar { display: none; }

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--bg-700);
    border: 1px solid var(--bg-600);
    color: var(--text-300);
    border-radius: 24px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    font-family: inherit;
}

.filter-chip:hover {
    background: var(--bg-600);
    transform: translateY(-2px);
}

.filter-chip.active {
    background: linear-gradient(135deg, var(--primary), #059669);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

/* ─────────── RECENT WINNERS ─────────── */
.winners-trending-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin: 0;
}

.winners-section {
    position: relative;
    width: 100%;
    padding: 14px 0 14px 16px;
    margin: 0;
    background: linear-gradient(135deg, rgba(30,41,59,0.6), rgba(15,23,42,0.9));
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 14px;
    overflow: hidden;
}

/* ─────────── TRENDING SECTION (Right Side) ─────────── */
.trending-section {
    position: relative;
    width: 100%;
    padding: 12px 16px;
    margin: 0;
    background: linear-gradient(135deg, rgba(30,41,59,0.6), rgba(15,23,42,0.9));
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 14px;
    overflow: hidden;
}

.trending-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0;
}

.trending-grid::-webkit-scrollbar { height: 4px; }
.trending-grid::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.4);
    border-radius: 2px;
}

.trending-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(15,23,42,0.5);
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    position: relative;
    flex-shrink: 0;
    white-space: nowrap;
    min-height: 36px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-size: inherit;
}

.trending-card:hover {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.trending-card:active {
    transform: translateY(0);
}

.trending-card .trending-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.trending-card .trending-name {
    font-size: 12px;
    font-weight: 700;
    color: #F1F5F9;
    white-space: nowrap;
}

.trending-card .trending-players {
    font-size: 10px;
    color: #10B981;
    font-weight: 700;
    white-space: nowrap;
}

.trending-card .trending-rank {
    font-size: 10px;
    padding: 2px 6px;
    background: rgba(245,158,11,0.15);
    color: #F59E0B;
    border-radius: 6px;
    font-weight: 800;
    flex-shrink: 0;
}

.trending-card.skeleton {
    background: linear-gradient(90deg, rgba(30,41,59,0.8) 25%, rgba(51,65,85,0.6) 50%, rgba(30,41,59,0.8) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}


.winners-section h3,
.trending-section h3 {
    font-size: 16px;
    color: #F1F5F9;
    margin: 0 0 10px;
    font-weight: 800;
}

.winners-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    width: max-content;
    padding: 2px 0;
    animation: winnersEndlessScroll 60s linear infinite;
    will-change: transform;
    cursor: grab;
    user-select: none;
}

.winners-track:hover {
    animation-play-state: paused;
}

.winners-track:active {
    cursor: grabbing;
}

/* Endless scroll keyframes — exactly -50% for 2x content */
@keyframes winnersEndlessScroll {
    0%   { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

.winners-track::-webkit-scrollbar {
    display: none;
}

.winners-track:active {
    cursor: grabbing;
}

.winners-track:hover {
    animation-play-state: paused;
}

.winners-track:active { cursor: grabbing; }

/* Right fade */
.winners-section::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 60px;
    background: linear-gradient(90deg, transparent, rgba(15, 23, 42, 0.95));
    pointer-events: none;
    z-index: 2;
}

/* Left fade */
.winners-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 60px;
    background: linear-gradient(270deg, transparent, rgba(15, 23, 42, 0.95));
    pointer-events: none;
    z-index: 2;
}

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

.winner-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #1E293B;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 12px;
    flex-shrink: 0;
    width: 200px;
    min-width: 200px;
    max-width: 200px;
    box-sizing: border-box;
    transition: border-color 0.3s, transform 0.3s;
}

.winner-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.winner-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.winner-card.skeleton {
    background: linear-gradient(90deg, rgba(30,41,59,0.8) 25%, rgba(51,65,85,0.6) 50%, rgba(30,41,59,0.8) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}

@keyframes skeletonShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.winner-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10B981, #3B82F6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: white;
    font-size: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.winner-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.winner-avatar-initial {
    font-size: 16px;
    font-weight: 900;
    color: white;
}

.winner-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.winner-name {
    font-size: 13px;
    font-weight: 700;
    color: #F1F5F9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.winner-desc {
    font-size: 10px;
    color: #64748B;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.winner-amount {
    font-size: 14px;
    color: #F59E0B;
    font-weight: 900;
}

.skeleton-line {
    height: 10px;
    background: rgba(148, 163, 184, 0.15);
    border-radius: 5px;
    width: 100px;
    margin-bottom: 6px;
}

.skeleton-line.short { width: 60px; }

/* ─────────── GAME LIST (Chips Row) ─────────── */
.game-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    margin-bottom: 8px;
}

.game-row {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.2s;
    cursor: pointer;
    box-sizing: border-box;
}

.game-row:hover {
    border-color: rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.game-row.open {
    border-color: #10B981;
    box-shadow: 0 4px 24px rgba(16, 185, 129, 0.2);
}

.game-row-content {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}

.game-row-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.game-row-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.game-row-name {
    font-size: 15px;
    font-weight: 800;
    color: #F1F5F9;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-row-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: #94A3B8;
    margin: 0;
    flex-wrap: nowrap;
    overflow: hidden;
}

.game-row-type {
    font-weight: 700;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 9px;
    padding: 2px 6px;
    background: rgba(148, 163, 184, 0.1);
    border-radius: 4px;
    flex-shrink: 0;
}

.game-row-price {
    color: #F59E0B;
    font-weight: 800;
    font-size: 10px;
    flex-shrink: 0;
}

.session-badge {
    color: #10B981;
    font-weight: 700;
    font-family: 'SF Mono', monospace;
    font-size: 9px;
    padding: 2px 6px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    flex-shrink: 0;
    white-space: nowrap;
}

.game-row-timer {
    text-align: right;
    flex-shrink: 0;
}

.row-timer-label {
    font-size: 9px;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
    margin-bottom: 2px;
}

.row-timer-value {
    font-size: 16px;
    font-weight: 900;
    font-family: 'SF Mono', monospace;
    color: #F59E0B;
    line-height: 1.2;
}

.row-timer-value.text-muted {
    color: #64748B;
    font-size: 11px;
}

.game-row-action { display: none; }

/* ─────────── GAME PANELS CONTAINER ─────────── */
.game-panels-container {
    display: block;
    width: 100%;
    margin: 8px 0 0;
}

/* ─────────── GAME INLINE PANEL ─────────── */
.game-inline-panel {
    display: none;
    width: 100%;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    padding: 8px;
    margin-bottom: 16px;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 75vh;
}

/* When JS sets display:block — show panel */
.game-inline-panel[style*="display: block"],
.game-inline-panel[style*="display:block"],
.game-inline-panel.is-open {
    display: block;
}

.game-inline-panel .panel-loading {
    padding: 40px 20px;
    text-align: center;
}

.game-inline-panel table {
    width: 100%;
    font-size: 12px;
}

.game-inline-panel table th,
.game-inline-panel table td {
    padding: 6px 4px;
    font-size: 11px;
}

.game-inline-panel::-webkit-scrollbar { width: 6px; }
.game-inline-panel::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.4);
    border-radius: 3px;
}

/* ─────────── IMAGE BANNERS ─────────── */
.image-banner-section {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 0;
}

.image-banner-card {
    position: relative;
    flex-shrink: 0;
    width: 300px;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
}

.image-banner-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.image-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.8), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 8px;
}

/* ─────────── IN-PLAY BAR ─────────── */
.in-play-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(59, 130, 246, 0.95));
    backdrop-filter: blur(20px);
    padding: 12px 20px;
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 999;
}

.in-play-bar.active { display: flex; }

.inplay-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    flex: 1;
}

.inplay-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    color: white;
    font-size: 13px;
    flex-shrink: 0;
}

.inplay-game { font-weight: 700; }

.inplay-timer {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: #FEF3C7;
}

/* ─────────── RESPONSIVE ─────────── */
@media (max-width: 1024px) {
    .game-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .live-time-inner {
        grid-template-columns: 1fr 1fr;
    }
    .time-item {
        padding: 16px 12px;
    }
    .time-value { font-size: 18px; }
    .time-value.countdown { font-size: 20px; }
    .winner-card {
        width: 180px;
        min-width: 180px;
        max-width: 180px;
    }
    .premium-banner { height: 160px; }
    .banner-content h2 { font-size: 22px; }
}

@media (max-width: 640px) {
    .game-list {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .winners-track,
    .marquee-track,
    .ticker-track,
    .recent-bets-ticker .ticker-scroll {
        animation: none !important;
    }
}


