:root {
    /* New deep dark table themes */
    --table-bg-1: linear-gradient(135deg, #020407, #060a12, #020407); /* Black → Navy */
    --table-bg-2: linear-gradient(135deg, #05030a, #0d0a20, #05030a); /* Black → Purple-Navy */
    --table-bg-3: linear-gradient(135deg, #03040b, #0d1528, #03040b); /* Navy → Midnight Blue */
    --table-bg-4: linear-gradient(135deg, #000000, #0a0a0a, #000000); /* Pure Black */

    /* Dark UI palette */
    --ui-bg: #0a0c10;          /* main black/navy base */
    --ui-bg-soft: #11141b;     /* slightly lighter navy */
    --ui-bg-hover: #181c25;
    --ui-border: #1e2330;

    /* Cool silver blue accents */
    --ui-accent: #7aa3ff;
    --ui-accent-soft: #5c84d1;

    --ui-text-light: #e4e7ef;
    --ui-text-dim: #a7abba;

    --current-table-bg: var(--table-bg-1);
}

/* MAIN BACKGROUND */
body {
    background: var(--current-table-bg) !important;
    transition: background 0.6s ease-in-out;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    padding: 10px;
    margin-bottom: 60px;
    color: var(--ui-text-light);
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* HEADER */
.header {
    text-align: center;
    color: var(--ui-accent);
    padding: 20px 0;
    text-shadow: 0px 0px 10px rgba(122,163,255,0.25);
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

/* GAME AREA */
.game-area {
    background: rgba(0, 0, 0, 0.55);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    border: 2px solid #1e2330;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.25);
}

/* BALANCE */
.balance {
    text-align: center;
    color: var(--ui-accent);
    font-size: 1.5em;
    margin-bottom: 20px;
    font-weight: bold;
}

/* TABLE LAYOUT */
.table {
    display: flex;
    flex-direction: column-reverse !important;
    align-items: center;
    gap: 25px;
}

.table .hand {
    width: 100%;
    max-width: 700px;
    background: var(--ui-bg-soft);
    padding: 15px;
    border-radius: 12px;
    color: var(--ui-text-light);
    text-align: center;
    border: 1px solid var(--ui-border);
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.table .hand .cards {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}



        .card {
            width: 60px;
            height: 90px;
            background: white;
            border-radius: 8px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            font-size: 1.5em;
            font-weight: bold;
            box-shadow: 0 4px 8px rgba(0,0,0,0.3);
            animation: dealCard 0.3s ease-out;
        }

        @keyframes dealCard {
            from {
                transform: translateY(-50px) rotateY(180deg);
                opacity: 0;
            }
            to {
                transform: translateY(0) rotateY(0);
                opacity: 1;
            }
        }

        .card.red {
            color: #d00;
        }

        .card.black {
            color: #000;
        }

        .score {
            color: white;
            font-size: 1.8em;
            font-weight: bold;
        }

        .betting-area {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 15px;
            margin-bottom: 20px;
        }

        .bet-option {
            background: linear-gradient(145deg, #2a5c2a, #1a4d1a);
            border: 2px solid #ffd700;
            border-radius: 15px;
            padding: 20px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s;
        }

        .bet-option:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
        }

        .bet-option.active {
            background: linear-gradient(145deg, #ffd700, #ffed4e);
            border-color: #fff;
        }

        .bet-option h4 {
            color: #ffd700;
            margin-bottom: 10px;
            font-size: 1.2em;
        }

        .bet-option.active h4 {
            color: #0a4d0a;
        }

        .bet-option .payout {
            color: white;
            font-size: 0.9em;
        }

        .bet-option.active .payout {
            color: #0a4d0a;
        }

        .bet-amount {
            margin-bottom: 20px;
            text-align: center;
        }

        .bet-amount input {
            width: 150px;
            padding: 10px;
            font-size: 1.2em;
            border-radius: 8px;
            border: 2px solid #ffd700;
            text-align: center;
        }

        .controls {
            display: flex;
            gap: 15px;
            justify-content: center;
            flex-wrap: wrap;
        }

        button {
            padding: 15px 30px;
            font-size: 1.1em;
            font-weight: bold;
            border: none;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.3s;
        }

        .deal-btn {
            background: linear-gradient(145deg, #4CAF50, #45a049);
            color: white;
        }

        .deal-btn:hover {
            transform: scale(1.05);
            box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
        }

        .deal-btn:disabled {
            background: #666;
            cursor: not-allowed;
            transform: none;
        }

        .clear-btn {
            background: linear-gradient(145deg, #f44336, #da190b);
            color: white;
        }

        .result {
            text-align: center;
            font-size: 1.8em;
            font-weight: bold;
            margin: 20px 0;
            min-height: 40px;
            color: #ffd700;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
        }

        .scorecards {
            background: rgba(0, 0, 0, 0.3);
            border-radius: 20px;
            padding: 20px;
            border: 3px solid #ffd700;
            margin-bottom: 20px;
        }

        .scorecards h2 {
            color: #ffd700;
            text-align: center;
            margin-bottom: 20px;
        }

        .scorecard-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}


        .road {
            background: rgba(255, 255, 255, 0.05);
            border: 2px solid rgba(255, 215, 0, 0.3);
            border-radius: 10px;
            padding: 15px;
        }

        .road h3 {
            color: #ffd700;
            margin-bottom: 10px;
            font-size: 1.1em;
            text-align: center;
        }

        .road-grid {
            display: inline-grid;
            gap: 2px;
            background: rgba(0, 0, 0, 0.2);
            padding: 5px;
            border-radius: 5px;
            overflow-x: auto;
            min-width: 100%;
        }

        .bead-plate-grid {
            grid-template-columns: repeat(6, 30px);
            grid-auto-rows: 30px;
        }

        .big-road-grid {
            grid-template-columns: repeat(24, 25px);
            grid-auto-rows: 25px;
            grid-template-rows: repeat(6, 25px);
        }

        .derived-road-grid {
            grid-template-columns: repeat(24, 20px);
            grid-auto-rows: 20px;
            grid-template-rows: repeat(6, 20px);
        }

        .road-cell {
            border: 1px solid rgba(255, 255, 255, 0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 0.8em;
            border-radius: 3px;
            position: relative;
        }

        .bead-cell {
            border-radius: 50%;
            font-size: 0.7em;
        }

        .bead-cell.banker {
            background: #e74c3c;
            color: white;
        }

        .bead-cell.player {
            background: #3498db;
            color: white;
        }

        .bead-cell.tie {
            background: #2ecc71;
            color: white;
        }

        .big-road-cell {
            border-radius: 50%;
            width: 100%;
            height: 100%;
        }

        .big-road-cell.banker {
            background: transparent;
            border: 3px solid #e74c3c;
        }

        .big-road-cell.player {
            background: transparent;
            border: 3px solid #3498db;
        }

        .big-road-cell.tie::before {
            content: '';
            position: absolute;
            width: 70%;
            height: 2px;
            background: #2ecc71;
            transform: rotate(45deg);
        }

        .derived-cell {
            border-radius: 50%;
            width: 100%;
            height: 100%;
        }

        .derived-cell.red {
            background: transparent;
            border: 2px solid #e74c3c;
        }

        .derived-cell.blue {
            background: transparent;
            border: 2px solid #3498db;
        }

        .stats {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 15px;
            color: white;
            text-align: center;
        }

        .stat-box {
            background: rgba(255, 255, 255, 0.1);
            padding: 15px;
            border-radius: 10px;
        }

        .stat-box h4 {
            color: #ffd700;
            margin-bottom: 10px;
        }

        .stat-box .number {
            font-size: 1.5em;
            font-weight: bold;
        }

        @media (max-width: 768px) {
            .betting-area {
                grid-template-columns: 1fr;
            }
            
            .scorecard-container {
                grid-template-columns: 1fr;
            }

            .stats {
                grid-template-columns: 1fr;
            }

            .header h1 {
                font-size: 1.8em;
            }

            .road {
                overflow-x: auto;
            }

            .bead-plate-grid {
                grid-template-columns: repeat(6, 28px);
                grid-auto-rows: 28px;
            }

            .big-road-grid {
                grid-template-columns: repeat(24, 23px);
                grid-auto-rows: 23px;
                grid-template-rows: repeat(6, 23px);
            }

            .derived-road-grid {
                grid-template-columns: repeat(24, 18px);
                grid-auto-rows: 18px;
                grid-template-rows: repeat(6, 18px);
            }

            .road-cell {
                font-size: 0.7em;
            }
        }
        
        
        
        
   
    
    

.chip-container {
    display:flex;
    justify-content:center;
    gap:10px;
    margin-bottom:15px;
    flex-wrap:wrap;

}

.chip {
    width:60px;
    height:60px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:bold;
    font-size:1.2em;
    cursor:pointer;
    border:4px solid white;
    user-select:none;
    transition:transform 0.2s;
    
}
.chip:hover {
    transform:scale(1.1);
}
.chip[data-value="1"] { background:#ffffff; color:#000; }
.chip[data-value="5"] { background:#00bfff; color:#fff; }
.chip[data-value="10"] { background:#00ff00; color:#000; }
.chip[data-value="50"] { background:#ff8c00; color:#fff; }
.chip[data-value="100"] { background:#ff0000; color:#fff; }



        
    #deal-btn {
    position: fixed;
    bottom: 78px;
    right: 20px;
    z-index: 9999;
    padding: 15px 25px;
    font-size: 1.2rem;
    background-color: rgba(124, 58, 237, 0.85); /* semi-transparent accent */
    color: #fff;
    border: 2px solid #ffd700; /* subtle highlight border */
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    cursor: pointer;
    text-align: center;
    font-weight: bold;
    display: inline-block;
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.2s ease, background-color 0.2s ease;
}

#deal-btn:hover {
    transform: scale(1.05) translateY(-3px); /* bouncy effect */
    box-shadow: 0 6px 16px rgba(0,0,0,0.6);
    background-color: rgba(124, 58, 237, 1); /* fully opaque on hover */
}

#deal-btn:active {
    transform: scale(0.95) translateY(2px); /* press-down effect */
    box-shadow: 0 3px 8px rgba(0,0,0,0.4);
}

/* Mobile adjustments */
@media screen and (max-width: 768px) {
    #deal-btn {
        padding: 12px 20px;
        font-size: 1rem;
        bottom: 75px;
        right: 15px;
    }
}


        
    
    
    .theme-btn {
    background: rgba(255,255,255,0.1);
    border: 2px solid #ffd700;
    padding: 5px 10px;
    border-radius: 10px;
    margin: 5px;
    color: #ffd700;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.theme-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.05);
}

.theme-btn.active {
    background: #ffd700;
    color: #000;
}



    .drag-handle {
    width: 100%;
    text-align: center;
    padding: 6px 0;
    margin-bottom: 8px;
    cursor: grab;
    color: #ffd700;
    font-size: 0.9em;
    opacity: 0.7;
}

.road {
    position: relative;
    user-select: none;
}

.sortable-ghost {
    opacity: 0.3;
    border: 2px dashed #ffd700;
}

#bet-input{display: none;}



.pattern-box {
    background:#1f2937;
    padding:10px;
    border-radius:8px;
    border:1px solid #ffd700;
    margin-bottom:10px;
}

.pattern-box input {
    width:100%;
    margin-top:5px;
    padding:6px;
    border-radius:6px;
    border:1px solid #ffd700;
    background:#111827;
    color:white;
}

.pattern-box button {
    width:100%;
    margin-top:6px;
    padding:6px;
    background:#dc2626;
    border:none;
    color:white;
    border-radius:5px;
    cursor:pointer;
}


#auto-speed {
    pointer-events: auto !important;
}


.auto-start-fixed {
    position: fixed;
    bottom: 20px;
    right: 130px;

    padding: 10px 10px;
    background: #10b981;
    border: none;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    z-index: 99999;

    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}
.auto-start-fixed:hover {
    background: #0c9668;
}


/* Mobile responsive layout */
@media (max-width: 768px) {
    #game-table {
        flex-direction: column !important;
    }
    
    #dealer-section,
    #player-section {
        width: 100% !important;
        margin: 10px 0 !important;
    }
}




#count-panel {
    background: #111;
    border: 2px solid #444;
    padding: 12px;
    margin-top: 15px;
    border-radius: 10px;
    color: #ffd700;
    font-family: 'Inter', sans-serif;
    width: fit-content;
    min-width: 260px;
    box-shadow: 0 0 10px #000 inset;
}

#count-panel span {
    display: inline-block;
    margin-right: 12px;
    font-size: 16px;
}

#count-main {
    margin-bottom: 6px;
}

#count-meter {
    width: 100%;
    height: 10px;
    background: #222;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 8px;
}

#count-meter-fill {
    height: 100%;
    width: 50%;
    background: #888;
    transition: width 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}





/* Base bottom bar (mobile-first: scrollable) */
.bottom-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #111;
    padding: 10px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    z-index: 9999;
    border-top: 2px solid #333;
}

.bottom-actions::-webkit-scrollbar {
    display: none;
}

/* Buttons (mobile default) */
.bottom-actions button {
    display: inline-block;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    flex: 0 0 auto;
}

/* ============================ */
/* DESKTOP FIX – Bigger buttons */
/* ============================ */

@media (min-width: 768px) {
    .bottom-actions {
        overflow-x: hidden; /* desktop = no scroll by default */
        justify-content: space-between;
        white-space: normal;
    }

    /* Desktop buttons fill the whole bar */
    .bottom-actions button {
        flex: 1 1 auto;       /* expand equally */
        font-size: 18px;
        padding: 16px 24px;
    }

    /* When INSURANCE shows, auto-switch to scroll mode */
    .bottom-actions.show-scroll {
        overflow-x: auto;
        white-space: nowrap;
    }

    .bottom-actions.show-scroll button {
        flex: 0 0 auto; /* buttons keep natural size when scrolling */
    }
}


.dice {
      font-size: 2rem;
      animation: roll 3s infinite;
      display: inline-block;
    }
    
    @keyframes roll {
      0% { transform: rotate(0deg); }
      25% { transform: rotate(90deg); }
      50% { transform: rotate(180deg); }
      75% { transform: rotate(270deg); }
      100% { transform: rotate(360deg); }
    }


    .logo {
      font-family: 'Amaranth', sans-serif;
      font-weight: 700;
      font-size: 30px;
      color: black;
      -webkit-text-stroke: 1px white;
      position: relative;
margin-bottom:40px;
margin-left:20px;
margin-top:5px;
    }

    .highlight {
      background: linear-gradient(to left, yellow, black);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      -webkit-text-stroke: 2px white;
    }
    
    
    
    
   /* WebKit Browsers (Chrome, Edge, etc.) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #f6e27a, #d4af37);
    border-radius: 10px;
    border: 2px solid #1a1a1a; /* makes it look inset */
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ffe787, #c9a230);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #d4af37 #1a1a1a;
}
 
    
