* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(135deg, #1a2a3a, #2c3e50);
    color: #ecf0f1;
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: rgba(44, 62, 80, 0.8);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #f1c40f;
    font-size: 2.5rem;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

h2 {
    color: #3498db;
    margin: 25px 0 15px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

h3 {
    color: #2ecc71;
    margin: 20px 0 10px;
}

.game-area {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.rules-section, .simulation-section, .odds-section {
    flex: 1;
    min-width: 300px;
    background: rgba(52, 73, 94, 0.7);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.card-table {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    background: #1a252f;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #34495e;
}

.player-area, .banker-area {
    text-align: center;
    width: 45%;
}

.cards {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
    min-height: 120px;
}

.card {
    width: 80px;
    height: 112px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #000;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    position: relative;
}

.card.red {
    color: #e74c3c;
}

.card.black {
    color: #2c3e50;
}

.card.empty {
    background: #34495e;
    color: #7f8c8d;
    border: 2px dashed #7f8c8d;
}

.card.empty::after {
    content: "?";
    font-size: 32px;
}

.points {
    font-size: 20px;
    font-weight: bold;
    margin-top: 10px;
    color: #f1c40f;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

button {
    padding: 12px 25px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

button:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

button#dealBtn {
    background: #2ecc71;
}

button#dealBtn:hover {
    background: #27ae60;
}

button#resetBtn {
    background: #e74c3c;
}

button#resetBtn:hover {
    background: #c0392b;
}

.betting-options {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.bet-option {
    padding: 10px 20px;
    background: #34495e;
    border: 2px solid #7f8c8d;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
    min-width: 100px;
}

.bet-option.selected {
    border-color: #f1c40f;
    background: #f39c12;
    color: #2c3e50;
    font-weight: bold;
}

.bet-option:hover {
    border-color: #3498db;
}

.result {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin: 20px 0;
    padding: 15px;
    border-radius: 10px;
    background: rgba(52, 152, 219, 0.2);
    display: none;
}

.win {
    background: rgba(46, 204, 113, 0.3);
    color: #2ecc71;
}

.lose {
    background: rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

.tie {
    background: rgba(241, 196, 15, 0.3);
    color: #f1c40f;
}

.odds-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #1a252f;
    border-radius: 10px;
    overflow: hidden;
}

.odds-table th, .odds-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #34495e;
}

.odds-table th {
    background: #3498db;
    color: white;
}

.odds-table tr:nth-child(even) {
    background: rgba(52, 73, 94, 0.5);
}

.odds-table tr:hover {
    background: rgba(52, 152, 219, 0.2);
}

.probability-calc {
    background: rgba(52, 73, 94, 0.7);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.calc-controls {
    display: flex;
    gap: 15px;
    margin: 15px 0;
    justify-content: center;
}

.calc-controls input {
    padding: 10px;
    border: 1px solid #7f8c8d;
    border-radius: 5px;
    background: #2c3e50;
    color: white;
    width: 100px;
}

.warning {
    background: rgba(231, 76, 60, 0.2);
    border-left: 4px solid #e74c3c;
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
}

@media (max-width: 768px) {
    .game-area {
        flex-direction: column;
    }
    
    .card-table {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    
    .player-area, .banker-area {
        width: 100%;
    }
}