/* Game Mode Selection Modal */
.game-mode-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.game-mode-modal {
    background: var(--secondary-bg);
    border-radius: 20px;
    padding: 2rem;
    max-width: 350px;
    width: 90%;
    text-align: center;
    animation: slideUp 0.3s ease;
}

.game-mode-modal h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.game-mode-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.game-mode-btn {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--accent-color);
    border: none;
    border-radius: 15px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.game-mode-btn:hover {
    background: var(--button-primary);
    transform: translateY(-2px);
}

.game-mode-btn.free {
    border: 2px solid #4CAF50;
}

.game-mode-btn.paid {
    border: 2px solid #FF9800;
}

.mode-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
}

.mode-info {
    flex: 1;
}

.mode-title {
    display: block;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.mode-desc {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.close-modal {
    background: var(--accent-color);
    color: var(--text-primary);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.close-modal:hover {
    background: var(--button-hover);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}
/* Ins
ufficient Balance Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--secondary-bg);
    border-radius: 20px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    animation: modalSlideUp 0.3s ease;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.3rem;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: var(--accent-color);
    color: var(--text-primary);
}

.modal-body {
    color: var(--text-primary);
}

.insufficient-balance-animation,
.error-animation {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: bounce 1s infinite;
}

.modal-body p {
    margin-bottom: 1rem;
    line-height: 1.5;
}

.topup-buttons,
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.action-btn {
    flex: 1;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.action-btn.primary {
    background: var(--button-primary);
    color: var(--text-primary);
}

.action-btn.primary:hover {
    background: var(--button-hover);
    transform: translateY(-2px);
}

.action-btn.secondary {
    background: var(--accent-color);
    color: var(--text-primary);
}

.action-btn.secondary:hover {
    background: var(--button-hover);
}

@keyframes modalSlideUp {
    from { 
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .modal-content {
        padding: 1.5rem;
        max-width: 95%;
    }
    
    .topup-buttons,
    .action-buttons {
        flex-direction: column;
    }
    
    .action-btn {
        padding: 1rem;
    }
}
/* B
et Selection Modal */
.bet-selection-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.bet-selection-modal {
    background: var(--secondary-bg);
    border-radius: 20px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    animation: slideUp 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.bet-selection-modal .modal-header {
    margin-bottom: 1.5rem;
}

.bet-selection-modal .modal-header h3 {
    color: var(--text-primary);
    margin: 0.5rem 0;
    font-size: 1.3rem;
}

.bet-selection-modal .mode-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.bet-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.bet-option {
    background: var(--accent-color);
    border: 2px solid transparent;
    border-radius: 15px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.bet-option:hover {
    background: var(--button-primary);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.bet-amount {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.bet-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.custom-bet-section {
    background: var(--primary-bg);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.custom-bet-section label {
    display: block;
    color: var(--text-primary);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.custom-bet-input-group {
    display: flex;
    align-items: center;
    background: var(--secondary-bg);
    border-radius: 10px;
    padding: 0.5rem;
    margin-bottom: 1rem;
}

.custom-bet-input-group input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    padding: 0.5rem;
    outline: none;
}

.custom-bet-input-group input::placeholder {
    color: var(--text-secondary);
}

.currency-label {
    color: var(--text-secondary);
    font-weight: bold;
    margin-left: 0.5rem;
}

#custom-bet-btn {
    width: 100%;
    margin: 0;
}

/* Mobile responsiveness for bet selection */
@media (max-width: 480px) {
    .bet-selection-modal {
        padding: 1.5rem;
        max-width: 95%;
    }
    
    .bet-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .bet-option {
        padding: 0.8rem;
    }
    
    .bet-amount {
        font-size: 1rem;
    }
    
    .custom-bet-section {
        padding: 1rem;
    }
}

@media (max-width: 320px) {
    .bet-options {
        grid-template-columns: 1fr;
    }
}