/* ========================================
   MOCRASH - Main Stylesheet
   
   ======================================== */

/* CSS Custom Properties */
:root {
    --bg-primary: #0E1013;
    --bg-secondary: #1A1C1F;
    --bg-tertiary: #252729;
    --bg-card: #1E2024;
    --bg-input: #2A2D31;
    --bg-hover: #2E3035;
    --bg-panel: #171A1D;

    --text-primary: #FFFFFF;
    --text-secondary: #9EA0A3;
    --text-muted: #6B6D70;

    --accent-red: #DC2626;
    --accent-red-hover: #EF4444;
    --accent-green: #22C55E;
    --accent-green-dark: #16A34A;
    --accent-green-glow: rgba(34, 197, 94, 0.3);
    --accent-blue: #34B4FF;
    --accent-purple: #913EF8;
    --accent-pink: #C017B4;
    --accent-yellow: #F59E0B;
    --accent-cyan: #06B6D4;

    --border-color: #2A2D31;
    --border-light: #3A3D41;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;
    --radius-xl: 14px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow-green: 0 0 20px rgba(34, 197, 94, 0.4);
    --shadow-glow-red: 0 0 20px rgba(220, 38, 38, 0.4);
}

/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    min-height: 100vh;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Preloader */
body.loading-active {
    overflow: hidden;
}

#site-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0E1013;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

#site-preloader .preloader-logo {
    font-size: 48px;
    font-weight: 900;
    font-style: italic;
    letter-spacing: 3px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    margin-bottom: 20px;
}

#site-preloader .preloader-logo .highlight {
    color: #e61b1b;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.loading-dots .dot {
    width: 12px;
    height: 12px;
    background: #DC2626;
    border-radius: 50%;
    animation: preloaderDotPulse 1.4s infinite ease-in-out both;
}

.loading-dots .dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dots .dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes preloaderDotPulse {
    0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}



body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   HEADER — thin dark bar
   ======================================== */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: #0E1013;
    border-bottom: 1px solid #1A1C1F;
    height: 52px; /* Increased height for better balance */
    z-index: 1000;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transform: skewX(-10deg); /* Style choice for dynamic look */
}

.logo-text {
    font-size: 24px;
    font-weight: 900;
    font-style: italic;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

.logo-text .highlight {
    color: #e61b1b;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
}
.user-balance-display {
    background: #1A1C1F;
    border-radius: 8px;
    padding: 4px 12px;
    border: 1px solid #2A2D31;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    height: 36px;
}

.user-balance-display #label {
    font-size: 10px;
    color: #22C55E;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1;
}

#header-balance {
    color: #22C55E;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.2;
}

.btn-deposit {
    background: #16A34A;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0 18px;
    height: 36px;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-deposit:hover {
    background: #22C55E;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
}
.btn-login {
    background: #E61B1B;
    color: white;
    border: none;
    height: 36px;
    padding: 0 24px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

.btn-login:hover {
    background: #FF2E2E;
}

.header-divider {
    width: 1px;
    height: 24px;
    background: #2A2D31;
    margin: 0 4px;
}

.header-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    color: #6B6D70;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
}

.header-icon i {
    font-size: 18px;
}

.ham-menu-item .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    margin-right: 12px;
}

.header-icon:hover {
    background: #1A1C1F;
    color: white;
}

.header-icon svg {
    stroke-width: 2.5;
}

.game-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #0b0d10;
    border-bottom: 1px solid #1a1c1f;
    overflow-x: auto;
    scrollbar-width: none;
}

.game-menu::-webkit-scrollbar {
    display: none;
}

.game-menu-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 10px;
    border: 1px solid #2a2d31;
    background: #14171c;
    color: #9ea0a3;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.game-menu-item i {
    font-size: 12px;
    opacity: 0.9;
}

.game-menu-item:hover {
    border-color: #3b3e43;
    color: #ffffff;
    background: #1a1d22;
}

.game-menu-item.active {
    color: #ffffff;
    background: linear-gradient(135deg, #e61b1b, #b61313);
    border-color: #ff3a3a;
    box-shadow: 0 0 16px rgba(230, 27, 27, 0.35);
}

.sports-page {
    min-height: calc(100vh - 106px);
    padding: 16px 14px 24px;
    background: radial-gradient(circle at top right, rgba(230, 27, 27, 0.16), transparent 45%), #0e1013;
}

.sports-hero {
    border: 1px solid #23262b;
    border-radius: 14px;
    background: linear-gradient(145deg, #15181d, #101318);
    padding: 20px;
    margin-bottom: 14px;
}

.sports-kicker {
    color: #f59e0b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
    margin-bottom: 8px;
}

.sports-hero h1 {
    font-size: 28px;
    line-height: 1.1;
    margin-bottom: 10px;
}

.sports-hero p {
    color: #a5a8ad;
    max-width: 560px;
    margin-bottom: 16px;
}

.sports-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 800;
    color: #fff;
    background: #e61b1b;
    border: 1px solid #ff3636;
}

.sports-listing {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.sports-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid #262a31;
    border-radius: 12px;
    background: #12151a;
    padding: 14px;
}

.sports-league {
    color: #8f9399;
    font-size: 12px;
    margin-bottom: 4px;
}

.sports-fixture {
    font-weight: 700;
}

.sports-odds {
    display: flex;
    gap: 8px;
}

.sports-odds span {
    min-width: 56px;
    text-align: center;
    padding: 8px 10px;
    border-radius: 8px;
    background: #1d222a;
    border: 1px solid #2d3340;
    color: #fff;
    font-weight: 700;
}

.casino-lobby-top {
    margin-bottom: 12px;
}

.casino-search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #2b3038;
    border-radius: 12px;
    background: #161a20;
    padding: 10px 12px;
}

.casino-search-wrap i {
    color: #8f9399;
}

.casino-search-wrap input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: #fff;
    font-size: 15px;
}

.casino-lobby-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.casino-lobby-card {
    position: relative;
    border: 1px solid #2a2f37;
    border-radius: 12px;
    background: #1b1f25;
    min-height: 104px;
    overflow: hidden;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.casino-card-image,
.casino-card-fallback {
    width: 100%;
    height: 100%;
    min-height: 104px;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 900;
    background: radial-gradient(circle at top right, #303746, #131722);
}

.casino-card-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
    padding: 18px 8px 8px;
}

.casino-card-name {
    font-size: 12px;
    font-weight: 800;
    line-height: 1.1;
}

.casino-card-sub {
    font-size: 10px;
    color: #c7ccd3;
    margin-top: 2px;
}

.aviator-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 8px;
    background: radial-gradient(circle at top left, #f43a4a, #22060b);
}

/* ========================================
   MAIN LAYOUT
   ======================================== */
.game-layout {
    display: flex;
    min-height: calc(100vh - 106px);
    overflow: visible;
}

/* Sidebar */
.sidebar {
    width: 320px;
    min-width: 320px;
    background: #111317; /* SLightly darker */
    border-right: 1px solid #1A1C1F;
    display: flex;
    flex-direction: column;
    z-index: 10;
    flex-shrink: 0;
}

.sidebar-tabs {
    display: flex;
    background: #111317;
    padding: 10px;
    gap: 8px;
    border-bottom: 1px solid #1A1C1F;
}

.sidebar-tab {
    flex: 1;
    background: #1A1C1F;
    border: 1px solid #2A2D31;
    border-radius: 8px;
    color: #9EA0A3;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 0;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-tab:hover {
    color: white;
    border-color: #3A3D41;
}

.sidebar-tab.active {
    background: #25282E;
    color: #fff;
    border-color: #3B3E43;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


.bets-header {
    display: grid;
    grid-template-columns: 1fr 60px 60px 80px;
    padding: 10px 16px;
    background: #0E1013;
    color: #6B6D70;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    border-bottom: 1px solid #1A1C1F;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 5;
}

.bets-header span:not(:first-child) {
    text-align: right;
}

.bets-list {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    background: #0E1013;
}

.bet-row {
    display: grid;
    grid-template-columns: 1fr 60px 60px 80px;
    padding: 8px 16px;
    border-bottom: 1px solid #111317;
    align-items: center;
    font-size: 12px;
    transition: background 0.2s ease;
}

.bet-row:hover {
    background: #16181C;
}

.bet-row.cashed-out {
    background: #28A909;
}

.bet-row.cashed-out .bet-user,
.bet-row.cashed-out .bet-user span,
.bet-row.cashed-out .bet-amount,
.bet-row.cashed-out .bet-multiplier,
.bet-row.cashed-out .bet-rank,
.bet-row.cashed-out .bet-cashout {
    color: #FFFFFF !important;
}

.bet-user {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #9EA0A3;
    overflow: hidden;
}

.bet-avatar {
    width: 24px;
    height: 24px;
    background: #1A1C1F;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.bet-amount {
    color: #FFFFFF;
    font-weight: 600;
    text-align: right;
}

.bet-multiplier {
    text-align: right;
    font-weight: 700;
}

.bet-multiplier.blue { color: #34B4FF; }
.bet-multiplier.purple { color: #913EF8; }
.bet-multiplier.pink { color: #C017B4; }

.bet-cashout {
    color: #22C55E;
    font-weight: 800;
    text-align: right;
}


/* ========================================
   MAIN GAME AREA
   ======================================== */
.game-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    overflow: visible;
    background: var(--bg-primary);
}

.casino-games-strip {
    margin: 10px 10px 8px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #23262b;
    background: #12151a;
}

.casino-games-strip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.casino-games-strip-header h3 {
    font-size: 14px;
    font-weight: 800;
}

.casino-games-strip-header a {
    color: #9ea0a3;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}

.casino-games-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.casino-game-card {
    background: #1b1f25;
    border: 1px solid #2a2f37;
    border-radius: 10px;
    padding: 10px;
    text-align: left;
    color: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.2s ease;
}

.casino-game-card:hover {
    border-color: #3a404b;
    background: #20252d;
}

.casino-game-provider {
    color: #8f9399;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.6px;
}

.casino-game-name {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.casino-game-action {
    color: #22c55e;
    font-size: 12px;
    font-weight: 800;
}


/* Jackpot Banner */
.jackpot-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Deep dark background with animated rainbow border */
    background: linear-gradient(#111317, #111317) padding-box, 
                linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #8b00ff, #ff0000) border-box;
    background-size: 100% 100%, 300% 100%;
    border: 2px solid transparent;
    border-radius: 40px;
    padding: 8px 12px 8px 20px;
    margin: 10px 10px 8px;
    position: relative;
    cursor: pointer;
    animation: rainbowShift 4s linear infinite;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.jackpot-banner:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* rainbowShift animation defined below */
@keyframes rainbowShift {
    0%   { background-position: 0% 0%; }
    100% { background-position: 100% 0%; }
}

.jackpot-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.jackpot-banner .jackpot-text {
    color: #FFFFFF;
    font-weight: 500;
}

.jackpot-banner .jackpot-amount {
    color: #FFB800; /* Gold/Yellow from screenshot */
    font-weight: 700;
}

.jackpot-minbet {
    font-size: 11px;
    color: #606367;
    margin-left: 4px;
}

.jackpot-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffbb00;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.jackpot-arrow:hover {
    transform: scale(1.05);
}

/* History Bar */
.history-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 10px;
    overflow-x: auto;
    scrollbar-width: none;
    background: #000;
}

.history-bar::-webkit-scrollbar {
    display: none;
}

.history-chip {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.history-chip.blue {
    color: #0fb9fb;
}

.history-chip.purple {
    color: #8e52f5;
}

.history-chip.pink {
    color: #c017b4;
}

.history-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-shrink: 0;
    cursor: pointer;
    background: #212327;
    border: none;
    padding: 2px 8px;
    border-radius: 20px;
    color: #606367;
    margin-left: auto;
    margin-right: 4px;
}

.history-toggle:hover {
    background: #2a2d31;
    color: #fff;
}

.history-toggle svg {
    margin-left: 2px;
}

/* Game Canvas Area */
.game-canvas-container {
    position: relative;
    margin: 4px 10px;
    border-radius: 24px;
    overflow: hidden;
    background: #000000;
    border: 1px solid var(--border-color);
    height: 300px;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

.multiplier-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 130px;
    font-weight: 900;
    color: #FFFFFF;
    text-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    z-index: 10;
    pointer-events: none;
    letter-spacing: -3px;
    font-variant-numeric: tabular-nums;
    font-family: 'Inter', -apple-system, sans-serif;
}

.multiplier-display.crashed {
    color: #DC2626;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    animation: crashPulse 0.5s ease;
}

@keyframes crashPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.15);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

.game-status-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-secondary);
    z-index: 10;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.game-status-text.waiting {
    animation: waitingPulse 1.5s ease-in-out infinite;
}

@keyframes waitingPulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* ========================================
   BETTING CONTROLS — Two panels side by side
   ======================================== */
.betting-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 6px 10px 8px;
}

.bet-panel {
    background: #1B1D20;
    border-radius: 12px;
    padding: 12px;
    border: none;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: unset; /* Remove fixed min-width for mobile */
}

.bet-panel-tabs-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.bet-panel-tabs {
    display: flex;
    background: #141518;
    border-radius: 30px;
    padding: 3px;
    width: fit-content;
}

.bet-panel-tab {
    padding: 4px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #9EA0A3;
    border-radius: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bet-panel-tab.active {
    background: #3B3E43;
    color: white;
}

.bet-panel-body {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.bet-panel-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 170px; /* Increased from 150px to give more space for text */
}

.bet-input-group {
    background: #141518;
    border-radius: 30px;
    display: flex;
    align-items: center;
    padding: 4px 8px;
}

.bet-adjust-btn {
    color: #FFFFFF;
    background: transparent;
    font-size: 18px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #444;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.bet-adjust-btn:hover {
    border-color: #888;
}

.bet-amount-container {
    flex: 1;
    background: #000000;
    margin: 0 4px; /* Reduced from 8px */
    border-radius: 4px;
    display: flex;
    align-items: center;
    height: 30px;
}

.bet-input {
    width: 100%;
    background: transparent;
    color: #FFFFFF;
    font-size: 20px; /* Reduced from 24px to prevent overflow */
    font-weight: 800;
    text-align: center;
    border: none;
    outline: none;
    font-family: inherit;
}

.quick-bets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.quick-bet-btn {
    background: #141518;
    color: #666;
    padding: 6px 0;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

.quick-bet-btn:hover {
    color: #AAA;
    background: #1A1C20;
}

.bet-submit-btn {
    flex: 1;
    background: #28A909;
    border-radius: 24px;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.bet-submit-btn:hover {
    background: #2BBF0A;
    transform: translateY(-1px);
}

.btn-text-main {
    font-size: 26px;
    font-weight: 850;
    letter-spacing: 0.8px;
}

.btn-text-sub {
    font-size: 22px;
    font-weight: 750;
    opacity: 0.95;
    font-family: monospace;
}

.bet-submit-btn.cashout-state {
    background: var(--accent-yellow);
    color: #000;
}

.bet-panel-auto-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #2A2D31;
}

.auto-control {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #9EA0A3;
}

.toggle-switch-pill {
    width: 36px;
    height: 18px;
    background: #3B3E43;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease;
}

.toggle-switch-pill::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: left 0.2s ease;
}

.toggle-switch-pill.active {
    background: #28A909;
}

.toggle-switch-pill.active::after {
    left: 20px;
}

.auto-multiplier-input {
    background: #000;
    border-radius: 20px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    height: 24px;
    margin-left: 4px;
}

.auto-multiplier-input input {
    background: transparent;
    border: none;
    color: #FFF;
    width: 30px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    outline: none;
}

.auto-multiplier-input span {
    color: #666;
    font-size: 14px;
    cursor: pointer;
}

.bet-submit-btn.disabled-state {
    background: #2A2D31;
    color: #6B6D70;
    cursor: not-allowed;
    border-color: transparent;
}

/* ========================================
   FOOTER
   ======================================== */
.game-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 14px;
    font-size: 10px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    height: 28px;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 5px;
}

.provably-fair-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--accent-green);
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s ease;
    font-size: 10px;
}

.provably-fair-badge:hover {
    opacity: 0.8;
}

.provably-fair-badge .check {
    width: 14px;
    height: 14px;
    background: var(--accent-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 8px;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
}

.footer-right a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 800;
}

/* ========================================
   MODALS
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: var(--bg-tertiary) transparent;
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 1;
}

.modal-title {
    font-size: 15px;
    font-weight: 600;
}

.modal-close {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-md);
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 18px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-body h3 {
    color: var(--text-primary);
    margin: 14px 0 6px;
    font-size: 14px;
}

.modal-body p {
    margin-bottom: 10px;
}

.modal-body ul {
    padding-left: 18px;
    margin-bottom: 10px;
}

.modal-body li {
    margin-bottom: 4px;
}

/* ========================================
   HAMBURGER MENU
   ======================================== */
.hamburger-menu {
    position: absolute;
    top: 44px;
    right: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 220px;
    box-shadow: var(--shadow-lg);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s ease;
}

.hamburger-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ham-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.ham-menu-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.ham-menu-item:first-child {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.ham-menu-item:last-child {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.ham-menu-item .icon {
    font-size: 16px;
    margin-right: 8px;
}

.toggle-switch {
    width: 36px;
    height: 20px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease;
}

.toggle-switch.active {
    background: var(--accent-green);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.toggle-switch.active::after {
    transform: translateX(16px);
}

.ham-divider {
    height: 1px;
    background: var(--border-color);
    margin: 3px 0;
}

/* ========================================
   AUTH PAGES
   ======================================== */
.auth-page {
    min-height: 100vh;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    overflow: auto;
}

.auth-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
}

.auth-back {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 18px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: background 0.2s ease;
}

.auth-back:hover {
    background: var(--bg-tertiary);
}

.auth-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 36px 24px;
    max-width: 460px;
    margin: 0 auto;
    width: 100%;
}

.auth-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
    font-style: italic;
    align-self: flex-start;
}

.auth-subtitle {
    font-size: 13px;
    color: var(--accent-cyan);
    margin-bottom: 28px;
    align-self: flex-start;
}

.auth-form {
    width: 100%;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-family);
    outline: none;
    transition: border-color 0.2s ease;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    border-color: var(--accent-red);
}

.form-input-group {
    position: relative;
}

.form-input-group .toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
}

.forgot-password {
    display: block;
    text-align: right;
    color: var(--accent-red);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 20px;
    transition: opacity 0.2s ease;
}

.forgot-password:hover {
    opacity: 0.8;
}

.btn-auth-submit {
    width: 100%;
    padding: 12px;
    background: var(--accent-red);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-family);
}

.btn-auth-submit:hover {
    background: var(--accent-red-hover);
    box-shadow: var(--shadow-glow-red);
}

.auth-switch {
    text-align: center;
    margin-top: 28px;
    font-size: 13px;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--accent-red);
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-error {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: var(--accent-red);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 12px;
    margin-bottom: 14px;
}

/* ========================================
   HOW TO PLAY STEPS
   ======================================== */
.how-to-play-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 14px 0;
}

.step-card {
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-red);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    font-size: 14px;
}

.step-content h4 {
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 4px;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 12px;
    margin: 0;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
        min-width: 240px;
    }
}

@media (max-width: 768px) {
    .game-menu {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1300;
        padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
        gap: 6px;
        background: #0b0d10;
        border-top: 1px solid #1a1c1f;
        border-bottom: none;
        box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.45);
        overflow-x: visible;
    }

    .game-menu-item {
        flex: 1;
        min-width: 0;
        flex-direction: column;
        font-size: 10px;
        line-height: 1;
        padding: 8px 6px;
        border-radius: 8px;
        gap: 5px;
    }

    .game-menu-item i {
        font-size: 14px;
    }

    .game-menu-item span {
        font-size: 10px;
        letter-spacing: 0.2px;
    }

    .sports-page {
        padding: 12px 10px 88px;
        min-height: calc(100vh - 102px);
    }

    .sports-hero {
        padding: 16px;
    }

    .sports-hero h1 {
        font-size: 22px;
    }

    .sports-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .casino-lobby-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }

    .casino-lobby-card {
        min-height: 88px;
    }

    .casino-card-image,
    .casino-card-fallback {
        min-height: 88px;
    }

    .sports-odds {
        width: 100%;
    }

    .sports-odds span {
        flex: 1;
    }

    .game-layout {
        flex-direction: column;
        min-height: auto;
        overflow: visible;
        padding-bottom: 88px;
    }

    .casino-games-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }


    .sidebar {
        width: calc(100% - 20px);
        min-width: unset;
        margin: 0 10px 20px;
        order: 2;
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-lg);
        height: 350px;
        overflow: hidden;
        flex: none;
    }

    .sidebar-tabs {
        padding: 5px;
        gap: 5px;
    }

    .sidebar-tab {
        font-size: 11px;
        padding: 6px 0;
    }

    .bets-stats {
        padding: 8px 12px;
    }

    .bets-header, .bet-row {
        grid-template-columns: 1fr 50px 50px 70px;
        padding: 8px 12px;
        font-size: 11px;
    }

    .game-main {
        order: 1;
        flex: none;
        overflow: visible;
    }

    .betting-controls {
        grid-template-columns: 1fr;
    }

    .multiplier-display {
        font-size: 52px; /* Adjusted from 60px */
    }

    .bet-panel {
        padding: 8px;
    }

    .bet-input {
        font-size: 18px; /* Smaller font for better fit */
    }

    .bet-panel-left {
        width: 155px; /* Increased from 130px */
    }

    .btn-text-main {
        font-size: 18px;
    }

    .btn-text-sub {
        font-size: 14px;
    }

    .game-canvas-container {
        height: 220px; /* Shorter for better overall fit */
    }
    
    .quick-bet-btn {
        font-size: 11px;
        padding: 4px 0;
    }
}

@media (max-width: 400px) {
    .bet-panel-left {
        width: 145px; /* Increased from 110px */
    }
    
    .multiplier-display {
        font-size: 42px;
    }

    .bet-input {
        font-size: 16px;
    }

    .btn-text-main {
        font-size: 15px;
    }

    .btn-text-sub {
        font-size: 11px;
    }
    
    .quick-bets {
        gap: 2px;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes planeShake {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(1px, -1px) rotate(0.5deg);
    }

    50% {
        transform: translate(-1px, 1px) rotate(-0.5deg);
    }

    75% {
        transform: translate(1px, 0px) rotate(0.25deg);
    }
}
/* Toast Notifications */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--bg-card); color: white; padding: 12px 20px; border-radius: 8px; font-size: 14px; font-weight: 600; min-width: 250px; display: flex; align-items: center; justify-content: space-between; border-left: 4px solid var(--accent-blue); box-shadow: var(--shadow-lg); transform: translateX(120%); transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55); }
.toast.active { transform: translateX(0); }
.toast-success { border-left-color: var(--accent-green); }
.toast-error { border-left-color: var(--accent-red); }
.toast-content { display: flex; align-items: center; gap: 10px; }

/* Header Responsive Fixes */
@media (max-width: 480px) {
    .header { padding: 0 10px; height: 48px; }
    .header-actions { gap: 4px; }
    .btn-deposit { padding: 0 10px; font-size: 10px; height: 32px; }
    .btn-login { padding: 0 12px; font-size: 10px; height: 32px; }
    .user-balance-display { min-width: 70px; height: 32px; padding: 0 8px; }
    #header-balance { font-size: 11px; }
    .logo-text { font-size: 18px; }
    .header-icon { width: 32px; height: 32px; }
}

/* Hamburger Menu Item Styles */
.ham-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.ham-menu-item:hover { background: var(--bg-hover); }
.ham-menu-item .icon { margin-right: 12px; font-size: 18px; }
.ham-divider { height: 1px; background: var(--border-color); margin: 8px 0; }

.header-global-actions { display: flex; align-items: center; gap: 4px; }

/* ========================================
   CHAT PANEL
   ======================================== */
.chat-panel {
    position: fixed;
    right: -340px;
    top: 0;
    bottom: 0;
    width: 320px;
    background: #14161A;
    border-left: 1px solid #2A2D31;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 40px rgba(0,0,0,0.6);
}
.chat-panel.open { right: 0; }
.chat-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1999;
    backdrop-filter: blur(2px);
}
.chat-overlay.show { display: block; }

.chat-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #2A2D31;
    background: #0E1013;
}
.chat-header-info { display: flex; flex-direction: column; gap: 2px; }

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: #2A2D31; border-radius: 2px; }

.chat-msg {
    font-size: 13px;
    color: #AAB0BA;
    line-height: 1.4;
    animation: fadeInUp 0.2s ease;
}
.chat-msg.system {
    background: rgba(245, 158, 11, 0.08);
    border-left: 2px solid #F59E0B;
    padding: 6px 10px;
    border-radius: 0 6px 6px 0;
    color: #F59E0B;
    font-size: 12px;
    font-weight: 600;
}
.chat-user { color: #22C55E; font-weight: 700; margin-right: 5px; }

.chat-input-wrap {
    padding: 12px;
    border-top: 1px solid #2A2D31;
    background: #0E1013;
}
.emoji-btn {
    background: #1A1C1F;
    border: 1px solid #2A2D31;
    border-radius: 6px;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
}
.emoji-btn:hover { background: #2A2D31; }

/* Consistently using styles from top of file */

/* ========================================
   JACKPOT MODAL ENHANCEMENTS
   ======================================== */
.jackpot-modal-header {
    background: linear-gradient(180deg, #2D1B4D 0%, #1B1229 100%);
    padding: 24px;
    position: relative;
    text-align: left;
}

.jackpot-header-prize {
    color: #FFB800;
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
}

.jackpot-header-title {
    color: white;
    font-size: 18px;
    font-weight: 700;
    margin-top: 8px;
}

.jackpot-header-desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    margin-top: 6px;
}

.jackpot-header-minbet {
    color: white;
    font-size: 13px;
    margin-top: 12px;
}

.jackpot-header-minbet span {
    color: #FFB800;
    font-weight: 700;
}

.jackpot-tabs-container {
    background: #111317;
    padding: 0 20px;
}

.jackpot-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 0;
    border-bottom: none !important;
}

.jackpot-tab {
    flex: 1;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    border: none !important;
    text-align: center;
}

.jackpot-tab.active {
    background: rgba(255, 255, 255, 0.1);
    color: #FFB800;
    border-bottom: none !important;
}

.jackpot-lb-header, .jackpot-winners-header {
    display: grid;
    grid-template-columns: 80px 1fr 100px;
    background: #000;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid #1A1C1F;
}

/* Winners header specifically */
.jackpot-winners-header {
    grid-template-columns: 70px 1fr 80px 100px;
}

.jackpot-row-list {
    background: #000;
}

.jackpot-lb-row, .jackpot-winners-row {
    display: grid;
    grid-template-columns: 80px 1fr 100px;
    align-items: center;
    padding: 10px 20px;
    background: #16181C;
    margin-top: 2px;
    border-bottom: none !important;
}

/* Winners row specifically */
.jackpot-winners-row {
    grid-template-columns: 70px 1fr 80px 100px;
}

.jackpot-lb-row:nth-child(even), .jackpot-winners-row:nth-child(even) {
    background: #1A1C1F;
}

.rank-text {
    font-weight: 800;
    font-size: 14px;
    text-align: center;
}

.rank-gold   { color: #FFB800; }
.rank-silver { color: #C0C0C0; }
.rank-bronze { color: #CD7F32; }
.rank-col {
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-name {
    color: #FFFFFF;
    font-weight: 500;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 8px;
}

.cashout-val {
    color: #FFFFFF;
    font-weight: 700;
    font-size: 14px;
    text-align: right;
}

.time-val {
    color: #FFFFFF;
    font-weight: 500;
    font-size: 14px;
}

.winnings-val {
    color: #FFB800;
    font-weight: 800;
    font-size: 14px;
    text-align: right;
}

.medal-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* Modal adjustments */
#jackpot-modal .modal {
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #000;
}

#jackpot-modal .modal-close {
    color: white;
    background: transparent;
    top: 24px;
    right: 20px;
}

.jackpot-tab-content {
    background: #000;
    border-top: 1px solid #1A1C1F;
}
.jackpot-lb-row:last-child { border-bottom: none; }
.jackpot-rank-badge {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900;
    font-size: 12px;
    flex-shrink: 0;
    margin-right: 10px;
}
.rank-1 { background: linear-gradient(135deg, #b8860b, #FFD700); color: #000; }
.rank-2 { background: linear-gradient(135deg, #808080, #C0C0C0); color: #000; }
.rank-3 { background: linear-gradient(135deg, #804A00, #CD7F32); color: #fff; }
.rank-other { background: #1A1C1F; color: var(--text-muted); }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Response for Mobile */
@media (max-width: 480px) {
    #jackpot-modal .modal {
        width: 95%;
        max-width: none;
    }

    .jackpot-modal-header {
        padding: 16px;
    }

    .jackpot-header-prize {
        font-size: 24px;
    }

    .jackpot-header-title {
        font-size: 16px;
    }

    .jackpot-lb-header, 
    .jackpot-lb-row {
        grid-template-columns: 50px 1fr 80px;
        padding: 10px 12px;
    }

    .jackpot-winners-header,
    .jackpot-winners-row {
        grid-template-columns: 50px 1fr 65px 85px;
        padding: 10px 8px;
    }

    .player-name, 
    .cashout-val,
    .time-val,
    .winnings-val {
        font-size: 12px;
    }

    .rank-col {
        width: 30px;
    }

    .jackpot-tabs-container {
        padding: 0 12px;
    }
}
