/* Auth Modal - Glassmorphism Style */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    backdrop-filter: blur(10px);
    background: rgba(7, 7, 18, 0.85);
    animation: fadeIn 0.3s ease;
}

.auth-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-modal-content {
    background: linear-gradient(
        135deg,
        rgba(18, 13, 31, 0.95),
        rgba(27, 21, 48, 0.95)
    );
    backdrop-filter: blur(20px);
    border: 1px solid rgba(124, 77, 255, 0.3);
    border-radius: 1.5rem;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.6),
        0 0 80px rgba(124, 77, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    width: 90%;
    max-width: 420px;
    position: relative;
    animation: slideUp 0.4s ease;
}

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

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

/* Close Button */
.auth-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #F5F4FF;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.auth-modal-close:hover {
    background: rgba(248, 113, 113, 0.2);
    border-color: rgba(248, 113, 113, 0.4);
    transform: rotate(90deg);
}

/* Header */
.auth-modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-modal-logo {
    height: 60px;
    margin-bottom: 1rem;
}

.auth-modal-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #F5F4FF;
    margin: 0;
}

/* Tabs */
.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.375rem;
    border-radius: 0.75rem;
}

.auth-tab {
    flex: 1;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid transparent;
    color: rgba(245, 244, 255, 0.6);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.auth-tab:hover {
    color: #F5F4FF;
    background: rgba(124, 77, 255, 0.1);
}

.auth-tab.active {
    background: linear-gradient(135deg, rgba(124, 77, 255, 0.3), rgba(192, 132, 252, 0.2));
    border-color: rgba(124, 77, 255, 0.5);
    color: #F5F4FF;
    box-shadow: 0 4px 12px rgba(124, 77, 255, 0.2);
}

/* Form */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form-group {
    margin-bottom: 1.25rem;
}

.auth-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(245, 244, 255, 0.8);
    margin-bottom: 0.5rem;
}

.auth-form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.75rem;
    color: #F5F4FF;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.auth-form-input::placeholder {
    color: rgba(245, 244, 255, 0.4);
}

.auth-form-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(124, 77, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.15);
}

.auth-form-input:hover:not(:focus) {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Submit Button */
.auth-submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #7C4DFF, #9D6EFF);
    border: 1px solid rgba(124, 77, 255, 0.5);
    border-radius: 0.75rem;
    color: #F5F4FF;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(124, 77, 255, 0.3);
    margin-top: 0.5rem;
}

.auth-submit-btn:hover {
    background: linear-gradient(135deg, #8E5AFF, #AF7FFF);
    box-shadow: 0 6px 24px rgba(124, 77, 255, 0.4);
    transform: translateY(-1px);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

.auth-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Error Message */
.auth-error {
    display: none;
    padding: 0.875rem 1rem;
    background: rgba(248, 113, 113, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: 0.75rem;
    color: #FCA5A5;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    animation: shake 0.3s ease;
}

.auth-error.active {
    display: block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Footer */
.auth-modal-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: rgba(245, 244, 255, 0.6);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .auth-modal-content {
        padding: 2rem 1.5rem;
        border-radius: 1.25rem;
        width: 95%;
    }

    .auth-modal-title {
        font-size: 1.5rem;
    }

    .auth-modal-logo {
        height: 50px;
    }

    .auth-tab {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    .auth-form-input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem 0.875rem;
    }

    .auth-submit-btn {
        padding: 0.875rem;
        font-size: 0.9375rem;
    }
}

