* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(25, 25, 45, 0.9);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #3498db;
}

header h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    color: #3498db;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

header h1 i {
    margin-right: 15px;
}

.game-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
}

.balance-box, .current-bet-box {
    background: rgba(52, 73, 94, 0.7);
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.balance-box i, .current-bet-box i {
    color: #f1c40f;
    font-size: 1.6rem;
}

#balance {
    color: #2ecc71;
    font-weight: bold;
    font-size: 1.6rem;
}

#current-bet {
    color: #e74c3c;
    font-weight: bold;
    font-size: 1.6rem;
}

/* Game Area */
.game-area {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 30px;
}

/* Wheel Container */
.wheel-container {
    flex: 1;
    min-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wheel {
    position: relative;
    width: 400px;
    height: 400px;
    margin-bottom: 20px;
}

#roulette-wheel {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 50%;
    background: #2c3e50;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
}

.wheel-center {
    position: absolute;
    width: 60px;
    height: 60px;
    background: #1a1a2e;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.ball-track {
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    top: 10px;
    left: 10px;
    z-index: 1;
}

.ball {
    position: absolute;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at 5px 5px, #fff, #ccc);
    border-radius: 50%;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
}

.pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 30px solid #e74c3c;
    z-index: 4;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.7));
}

.last-numbers {
    width: 100%;
    background: rgba(44, 62, 80, 0.8);
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
}

.last-numbers h3 {
    margin-bottom: 10px;
    color: #3498db;
}

#last-numbers-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.last-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Table Container */
.table-container {
    flex: 2;
    min-width: 600px;
}

.table {
    background: #27ae60;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    border: 5px solid #1e8449;
}

/* Number Grid */
.number-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 4px;
    margin-bottom: 15px;
    direction: rtl; /* Roulette numbers go right to left */
}

.number-bet {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.number-bet:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.number-bet.red {
    background: #e74c3c;
    color: white;
}

.number-bet.black {
    background: #2c3e50;
    color: white;
}

.number-bet .chip-on-bet {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

/* Outside Bets */
.outside-bets {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.outside-row {
    display: flex;
    gap: 4px;
}

.outside-bet {
    flex: 1;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2980b9;
    color: white;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    position: relative;
}

.outside-bet:hover {
    background: #3498db;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.outside-bet[data-type="red"] {
    background: #e74c3c;
}

.outside-bet[data-type="black"] {
    background: #2c3e50;
}

.outside-bet[data-type="column1"],
.outside-bet[data-type="column2"],
.outside-bet[data-type="column3"] {
    background: #8e44ad;
}

/* Zero Section */
.zero-section {
    position: absolute;
    left: 10px;
    top: 20px;
    width: 50px;
}

.zero-bet {
    height: 156px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #27ae60;
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    position: relative;
}

.zero-bet:hover {
    background: #2ecc71;
    transform: translateX(3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Chips */
.chips {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.chip {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    user-select: none;
    border: 3px solid white;
}

.chip:hover {
    transform: scale(1.1);
}

.chip[data-value="1"] {
    background: #3498db;
}

.chip[data-value="5"] {
    background: #e74c3c;
}

.chip[data-value="10"] {
    background: #2ecc71;
}

.chip[data-value="25"] {
    background: #f1c40f;
}

.chip[data-value="100"] {
    background: #9b59b6;
}

.chip.selected {
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.7);
    border: 3px solid #fff;
}

/* Control Panel */
.control-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(41, 128, 185, 0.2);
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.selected-chip {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.2rem;
}

.controls {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.btn:active {
    transform: translateY(-1px);
}

.spin-btn {
    background: linear-gradient(to right, #e74c3c, #c0392b);
    color: white;
}

.spin-btn:hover {
    background: linear-gradient(to right, #c0392b, #a93226);
}

.clear-btn {
    background: linear-gradient(to right, #95a5a6, #7f8c8d);
    color: white;
}

.clear-btn:hover {
    background: linear-gradient(to right, #7f8c8d, #707b7c);
}

.repeat-btn {
    background: linear-gradient(to right, #3498db, #2980b9);
    color: white;
}

.repeat-btn:hover {
    background: linear-gradient(to right, #2980b9, #2471a3);
}

.message-box {
    flex: 1;
    min-width: 300px;
    background: rgba(44, 62, 80, 0.9);
    padding: 15px;
    border-radius: 10px;
    font-size: 1.1rem;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Footer */
footer {
    margin-top: 30px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
    font-size: 0.9rem;
}

footer .disclaimer {
    color: #e74c3c;
    font-weight: bold;
    margin-top: 10px;
    font-size: 0.95rem;
}

/* Bet chip indicator */
.chip-on-bet {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    position: absolute;
    top: -10px;
    right: -10px;
    z-index: 5;
    border: 2px solid white;
    font-size: 0.8rem;
}

/* Winning animation */
.winning-number {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

/* Spin animation */
.spinning {
    animation: spin 3s cubic-bezier(0.1, 0.7, 0.1, 1);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(1800deg); }
}

/* Responsive */
@media (max-width: 1100px) {
    .game-area {
        flex-direction: column;
        align-items: center;
    }
    
    .table-container {
        min-width: 100%;
    }
}

@media (max-width: 700px) {
    .number-grid {
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: repeat(6, 1fr);
    }
    
    .zero-section {
        position: relative;
        width: 100%;
        left: 0;
        top: 0;
        margin-bottom: 10px;
    }
    
    .zero-bet {
        height: 50px;
        width: 100%;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}