* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #0a4d0a;
    color: #fff;
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    margin: 0 auto;
    background-color: #1a5c1a;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 25px;
    align-items: start;
}

.sidebar {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hand-panel {
    background-color: #0a4d0a;
    padding: 20px;
    border-radius: 10px;
}

.hand-card-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.hand-btn {
    padding: 12px 0;
    font-size: 18px;
    font-weight: bold;
    border: 2px solid #ffd700;
    border-radius: 8px;
    background-color: #2a6c2a;
    color: #fff;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.1s;
}

.hand-btn:hover {
    background-color: #3a7c3a;
    transform: scale(1.05);
}

.hand-btn:active {
    transform: scale(0.95);
}

.dealer-btn.selected {
    background-color: #ffd700;
    color: #0a4d0a;
}

.hand-summary {
    margin-top: 15px;
    font-size: 18px;
    line-height: 1.8;
}

.hand-summary span {
    color: #ffd700;
    font-weight: bold;
}

.recommendation-panel {
    text-align: center;
    border: 2px solid #ffd700;
}

.rec-waiting {
    color: #ccc;
    font-size: 16px;
    padding: 10px 0;
}

.rec-action {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 10px;
}

.rec-hit {
    color: #4CAF50;
}

.rec-stand {
    color: #ffd700;
}

.rec-double {
    color: #2196F3;
}

.rec-bust {
    color: #ff4444;
}

.rec-confidence {
    font-size: 16px;
    margin-bottom: 15px;
}

.rec-probs {
    text-align: left;
    font-size: 14px;
    line-height: 1.6;
}

.rec-prob-row {
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 6px;
    background-color: #1a5c1a;
}

.rec-prob-row.best {
    outline: 2px solid #ffd700;
}

.bust-text {
    color: #ff6b6b;
}

.rec-count-advice {
    margin-top: 12px;
    font-size: 13px;
    color: #ccc;
}

.hand-controls {
    display: flex;
    gap: 10px;
}

.hand-controls button {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.undo-btn {
    background-color: #FFC107;
    color: #0a4d0a;
}

.undo-btn:hover {
    background-color: #ffd54f;
}

.clear-btn {
    background-color: #f44336;
    color: white;
}

.clear-btn:hover {
    background-color: #ef5350;
}

.section-hint {
    color: #ccc;
    font-size: 14px;
    margin-bottom: 12px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #ffd700;
}

h2, h3 {
    color: #ffd700;
    margin-bottom: 15px;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background-color: #0a4d0a;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.count-display {
    font-size: 48px;
    font-weight: bold;
    color: #ffd700;
    margin-top: 10px;
}

#decks-remaining {
    font-size: 24px;
    padding: 10px;
    width: 100%;
    text-align: center;
    background-color: #2a6c2a;
    color: #fff;
    border: 2px solid #ffd700;
    border-radius: 5px;
    margin-top: 10px;
}

.recommendation-box {
    background-color: #0a4d0a;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
}

#recommendation {
    font-size: 20px;
    margin-top: 10px;
    line-height: 1.5;
}

.hand-input {
    background-color: #0a4d0a;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    margin-bottom: 5px;
    color: #ffd700;
}

.input-group input[type="number"] {
    padding: 10px;
    font-size: 16px;
    background-color: #2a6c2a;
    color: #fff;
    border: 2px solid #ffd700;
    border-radius: 5px;
}

.input-group input[type="checkbox"] {
    width: 25px;
    height: 25px;
    margin-top: 5px;
}

.hand-input button {
    grid-column: span 2;
    padding: 15px;
    font-size: 18px;
    background-color: #ffd700;
    color: #0a4d0a;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.hand-input button:hover {
    background-color: #ffed4e;
}

.cards-section {
    margin-bottom: 30px;
}

.card-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.card-btn {
    padding: 20px;
    font-size: 24px;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
}

.card-btn:hover:not(:disabled) {
    transform: scale(1.1);
}

.card-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.card-btn.disabled {
    background-color: #666 !important;
    color: #999 !important;
}

.card-count {
    font-size: 14px;
    display: block;
    margin-top: 5px;
}

.card-btn.low {
    background-color: #4CAF50;
    color: white;
}

.card-btn.neutral {
    background-color: #FFC107;
    color: black;
}

.card-btn.high {
    background-color: #f44336;
    color: white;
}

.controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.controls button {
    flex: 1;
    padding: 15px;
    font-size: 16px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.controls button:hover {
    background-color: #1976D2;
}

.card-history {
    background-color: #0a4d0a;
    padding: 20px;
    border-radius: 10px;
    min-height: 50px;
}

.card-history p {
    font-size: 18px;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }
}

@media (max-width: 600px) {
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .card-buttons {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .hand-input {
        grid-template-columns: 1fr;
    }
    
    .hand-input button {
        grid-column: span 1;
    }
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #1a5c1a;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.modal-content h2 {
    color: #ffd700;
    margin-bottom: 30px;
}

.setup-group {
    margin-bottom: 25px;
}

.setup-group label {
    display: block;
    color: #ffd700;
    margin-bottom: 10px;
    font-size: 18px;
}

.setup-group select {
    width: 100%;
    padding: 12px;
    font-size: 18px;
    background-color: #2a6c2a;
    color: #fff;
    border: 2px solid #ffd700;
    border-radius: 5px;
    cursor: pointer;
}

.modal-content button {
    padding: 15px 40px;
    font-size: 20px;
    background-color: #ffd700;
    color: #0a4d0a;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 20px;
}

.modal-content button:hover {
    background-color: #ffed4e;
}

/* 21+3 Side Bet Styles */
.side-bet-box {
    background-color: #0a4d0a;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.side-bet-input {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.side-bet-input .input-group {
    display: flex;
    flex-direction: column;
}

.side-bet-input select {
    padding: 8px;
    font-size: 14px;
    background-color: #2a6c2a;
    color: #fff;
    border: 2px solid #ffd700;
    border-radius: 5px;
    margin-bottom: 5px;
}

.side-bet-input button {
    grid-column: span 3;
    padding: 15px;
    font-size: 18px;
    background-color: #9370DB;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.side-bet-input button:hover {
    background-color: #7B68EE;
}

#side-bet-results {
    background-color: #1a5c1a;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

@media (max-width: 600px) {
    .side-bet-input {
        grid-template-columns: 1fr;
    }
    
    .side-bet-input button {
        grid-column: span 1;
    }
}

/* Betting Recommendation Styles */
.betting-box {
    background-color: #0a4d0a;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
}

.betting-box h3 {
    color: #ffd700;
    margin-bottom: 15px;
}

#betting-recommendation {
    font-size: 18px;
}

.betting-units {
    font-size: 36px;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 15px;
}

.betting-units span {
    font-size: 48px;
}

.betting-advice {
    line-height: 1.6;
    margin-top: 10px;
}

.betting-advice small {
    display: block;
    margin-top: 10px;
    color: #ccc;
    font-size: 14px;
}