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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: 
        linear-gradient(135deg, rgba(102, 126, 234, 0.7) 0%, rgba(118, 75, 162, 0.7) 100%),
        url('/static/assets/bg.jpg') center center / cover no-repeat fixed;
    background-color: #1a1a2e;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 900px;
    width: 100%;
}

/* ========== INDEX PAGE ========== */
.title-section {
    text-align: center;
    margin-bottom: 40px;
}

.title-section h1 {
    font-size: 48px;
    color: #333;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.title-section h2 {
    font-size: 24px;
    color: #666;
    margin-bottom: 10px;
}

.title-section p {
    font-size: 18px;
    color: #999;
}

.modes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.mode-card {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #f9f9f9;
}

.mode-card:hover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
}

.mode-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.mode-card h3 {
    color: #333;
    margin-bottom: 10px;
}

.mode-card p {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

/* ========== BUTTONS ========== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    padding-top: 10px;
    margin-left: 2px;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.btn-large {
    padding: 20px 40px;
    font-size: 20px;
    width: 100%;
    margin: 10px 0;
}

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

/* ========== SETUP PAGE ========== */
.setup-container {
    max-width: 600px;
}

.setup-container h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

.setup-container h3 {
    color: #667eea;
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
}

.form-group input[type="radio"] {
    margin-right: 8px;
}

.form-group small {
    display: block;
    color: #999;
    margin-top: 5px;
    font-size: 12px;
}

/* ========== GAME PAGE ========== */
.game-container {
    padding: 30px;
}

.game-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 20px;
}

.game-header h1 {
    color: #333;
    margin-bottom: 10px;
}

.players-info {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.current-player {
    font-size: 20px;
    color: #667eea;
    font-weight: 600;
}

.game-image-section {
    text-align: center;
    margin: 30px 0;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-image {
    max-width: 100%;
    max-height: 500px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.game-info {
    text-align: center;
    color: #666;
    margin: 20px 0;
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
}

.status-message {
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    font-weight: 600;
    display: none;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ========== GAME OVER PAGE ========== */
.game-over-container {
    max-width: 600px;
    text-align: center;
}

.game-over-content {
    padding: 40px 20px;
}

.game-over-content h1 {
    font-size: 48px;
    color: #e74c3c;
    margin-bottom: 20px;
    animation: pulse 0.5s ease-in-out;
}

.winner-info h2 {
    font-size: 36px;
    color: #27ae60;
    margin-bottom: 10px;
}

.loser-text {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

.game-over-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .title-section h1 {
        font-size: 36px;
    }

    .title-section h2 {
        font-size: 18px;
    }

    .modes-grid {
        grid-template-columns: 1fr;
    }

    .players-info {
        flex-direction: column;
        gap: 5px;
    }

    .game-image {
        max-height: 300px;
    }

    .btn-large {
        padding: 15px 30px;
        font-size: 16px;
    }
}

/* ========== CASINO MODE ========== */
.casino-bar {
    background: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.balance-display {
    font-size: 24px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.balance-display #currentBalance {
    font-size: 28px;
    color: #fff;
}

.bet-display {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bet-display #currentBet {
    font-size: 20px;
    color: #fff700;
}

.stats-display {
    font-size: 16px;
}

.stats-display .wins {
    color: #2ecc71;
}

.stats-display .losses {
    color: #ff6b6b;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
}

.btn-small:hover {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 600px) {
    .casino-bar {
        flex-direction: column;
        text-align: center;
    }
    
    .balance-display {
        font-size: 20px;
    }
    
    .balance-display #currentBalance {
        font-size: 24px;
    }
}
