/* Universal Modal Design - Modern & Centered with Casino Theme */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

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

.modal-container {
    background: linear-gradient(135deg, #1e2139 0%, #2a2d47 100%);
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

/* Casino chips decoration */
.modal-container::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.modal-container::after {
    content: "";
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(98, 70, 234, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Decorative chips */
.modal-chips {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.15;
}

.chip {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
}

.chip-1 {
    top: 20px;
    right: 30px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-color: #FFD700;
    color: #000;
}

.chip-2 {
    bottom: 40px;
    left: 20px;
    background: linear-gradient(135deg, #6246EA, #4834d4);
    border-color: #6246EA;
    color: #fff;
}

.chip-3 {
    top: 50%;
    right: 10px;
    background: linear-gradient(135deg, #d946ef, #ec4899);
    border-color: #d946ef;
    color: #fff;
    width: 30px;
    height: 30px;
}

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

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.modal-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #6246EA, #4834d4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    box-shadow: 0 4px 15px rgba(98, 70, 234, 0.4);
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #FFD700;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.modal-subtitle {
    font-size: 1rem;
    color: #A0A0A0;
    margin: 0;
}

.modal-body {
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.modal-input {
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 15px;
    border-radius: 12px;
    border: 1px solid rgba(98, 70, 234, 0.3);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s;
}

.modal-input:focus {
    outline: none;
    border-color: #6246EA;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(98, 70, 234, 0.2);
}

.modal-input::placeholder {
    color: #666;
}

.modal-button {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: none;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.modal-button-primary {
    background: linear-gradient(135deg, #d946ef, #ec4899);
    color: white;
    box-shadow: 0 4px 15px rgba(217, 70, 239, 0.4);
}

.modal-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 70, 239, 0.5);
}

.modal-button-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.modal-button-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.modal-link {
    color: #6246EA;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.modal-link:hover {
    color: #d946ef;
}

.modal-text {
    text-align: center;
    color: #A0A0A0;
    font-size: 0.95rem;
    margin-top: 15px;
    position: relative;
    z-index: 1;
}

.modal-message {
    text-align: center;
    color: #A0A0A0;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .modal-container {
        padding: 30px 25px;
        max-width: 95%;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
    
    .modal-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .chip {
        width: 30px;
        height: 30px;
        font-size: 10px;
    }
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 480px) {
    .modal-container {
        padding: 25px 20px !important;
        max-width: 92% !important;
        border-radius: 15px !important;
    }
    
    .modal-title {
        font-size: 1.3rem !important;
    }
    
    .modal-subtitle {
        font-size: 0.85rem !important;
    }
    
    .modal-icon {
        width: 45px !important;
        height: 45px !important;
        font-size: 20px !important;
        margin-bottom: 12px !important;
    }
    
    .modal-input {
        padding: 11px 16px !important;
        font-size: 0.9rem !important;
        margin-bottom: 12px !important;
    }
    
    .modal-button {
        padding: 12px !important;
        font-size: 0.95rem !important;
    }
    
    .modal-text {
        font-size: 0.85rem !important;
    }
    
    .chip {
        width: 25px !important;
        height: 25px !important;
        font-size: 9px !important;
        border-width: 2px !important;
    }
    
    .modal-close {
        width: 28px !important;
        height: 28px !important;
        font-size: 16px !important;
        top: 15px !important;
        right: 15px !important;
    }
}

/* Extra small phones */
@media (max-width: 360px) {
    .modal-container {
        padding: 20px 15px !important;
        max-width: 95% !important;
    }
    
    .modal-title {
        font-size: 1.2rem !important;
    }
    
    .modal-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .modal-container {
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-header {
        margin-bottom: 20px;
    }
    
    .modal-body {
        margin-bottom: 15px;
    }
}
