/* Magic Modal Component Styles */

.magic-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.magic-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.magic-modal {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.98) 0%, rgba(30, 41, 59, 0.98) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 24px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(139, 92, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    max-width: 500px;
    width: 100%;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    overflow: hidden;
    position: relative;
}

.magic-modal-overlay.active .magic-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Gradient Decoration */
.magic-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #8B5CF6, #F97316, #00D9FF);
    animation: gradient-shift 3s ease-in-out infinite;
}

/* Modal Header */
.magic-modal-header {
    padding: 2rem 2rem 1rem;
    text-align: center;
    position: relative;
}

.magic-modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #8B5CF6, #F97316);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    animation: pulse-glow 2s ease-in-out infinite;
    box-shadow: 0 0 50px rgba(139, 92, 246, 0.5);
}

.magic-modal-title {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, #FFFFFF 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.magic-modal-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Modal Body */
.magic-modal-body {
    padding: 1.5rem 2rem;
}

.magic-modal-input-group {
    position: relative;
}

.magic-modal-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    color: #FFFFFF;
    font-size: 1.125rem;
    font-weight: 500;
    transition: all 0.3s ease;
    outline: none;
}

.magic-modal-input:focus {
    background: rgba(139, 92, 246, 0.1);
    border-color: #8B5CF6;
    box-shadow: 
        0 0 0 4px rgba(139, 92, 246, 0.1),
        0 0 30px rgba(139, 92, 246, 0.3);
}

.magic-modal-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.magic-modal-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 8px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.magic-modal-hint i {
    color: #8B5CF6;
}

/* Score Display */
.magic-modal-score-display {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(139, 92, 246, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.magic-modal-score-item {
    text-align: center;
}

.magic-modal-score-value {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #8B5CF6, #F97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.magic-modal-score-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.25rem;
}

/* Modal Footer */
.magic-modal-footer {
    padding: 1.5rem 2rem 2rem;
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

.magic-modal-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.magic-modal-btn-primary {
    background: linear-gradient(135deg, #8B5CF6, #F97316);
    color: white;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

.magic-modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.4);
}

.magic-modal-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

.magic-modal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Ripple effect */
.magic-modal-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.magic-modal-btn:active::after {
    width: 300px;
    height: 300px;
}

/* Success State */
.magic-modal-success {
    text-align: center;
    padding: 2rem;
}

.magic-modal-success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #10B981, #34D399);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    animation: success-bounce 0.6s ease;
}

@keyframes success-bounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.magic-modal-success-message {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
}

/* Loading State */
.magic-modal-loading {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10;
    align-items: center;
    justify-content: center;
}

.magic-modal-loading.active {
    display: flex;
}

.magic-modal-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(139, 92, 246, 0.3);
    border-top-color: #8B5CF6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .magic-modal {
        max-width: calc(100% - 40px);
    }
    
    .magic-modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .magic-modal-body {
        padding: 1rem 1.5rem;
    }
    
    .magic-modal-footer {
        padding: 1rem 1.5rem 1.5rem;
    }
    
    .magic-modal-score-display {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 0 50px rgba(139, 92, 246, 0.5);
    }
    50% { 
        box-shadow: 0 0 80px rgba(139, 92, 246, 0.8);
    }
}