/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.modal-container {
    background: rgba(30, 30, 40, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    text-align: center;
    margin-bottom: 32px;
    position: relative;
}

.modal-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

.modal-step {
    display: none;
}

.modal-step.active {
    display: block;
}

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

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--brand-blue);
    background: rgba(255, 255, 255, 0.08);
}

.phone-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.country-code {
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.phone-input input {
    flex: 1;
}

.primary-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 24px;
}

.primary-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

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

.verification-info {
    text-align: center;
    margin-bottom: 24px;
}

.verification-info p {
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.phone-display {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.code-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
}

.code-input {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.code-input:focus {
    outline: none;
    border-color: var(--brand-blue);
    background: rgba(255, 255, 255, 0.08);
}

.resend-section {
    text-align: center;
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

.link-btn {
    background: none;
    border: none;
    color: var(--brand-blue);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.link-btn:hover:not(:disabled) {
    color: var(--brand-purple);
}

.link-btn:disabled {
    color: var(--text-tertiary);
    cursor: not-allowed;
}

.loading-spinner {
    text-align: center;
    margin-bottom: 16px;
}

.spinner-icon {
    animation: spin 1s linear infinite;
}

#loadingStep p {
    text-align: center;
    color: var(--text-secondary);
}

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

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

/* Mobile responsiveness */
@media (max-width: 480px) {
    .modal-container {
        padding: 24px;
        margin: 16px;
    }
    
    .modal-header h2 {
        font-size: 24px;
    }
    
    .code-inputs {
        gap: 6px;
    }
    
    .code-input {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}