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

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

.auth-modal {
    background: rgba(15, 15, 25, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 2.5rem;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    position: relative;
}

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

.auth-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0.5rem;
    transition: color 0.2s;
}

.auth-modal-close:hover {
    color: #fff;
}

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

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

.auth-modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #4972F3, #D925D2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-modal-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

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

.auth-tab {
    flex: 1;
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.auth-tab.active {
    background: linear-gradient(135deg, rgba(73, 114, 243, 0.2), rgba(217, 37, 210, 0.2));
    color: #fff;
}

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

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

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

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

.form-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: #4972F3;
    box-shadow: 0 0 0 3px rgba(73, 114, 243, 0.1);
}

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

.form-error {
    color: #ff3b30;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none;
}

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

.form-success {
    color: #34c759;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none;
}

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

.form-submit {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #4972F3, #D925D2);
    border: none;
    border-radius: 0.75rem;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(73, 114, 243, 0.3);
}

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

.form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Additional options */
.auth-options {
    margin-top: 1.5rem;
    text-align: center;
}

.auth-link {
    color: #4972F3;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.auth-link:hover {
    color: #D925D2;
}

.form-checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.form-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-checkbox-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    cursor: pointer;
}

/* Loading state */
.form-submit.loading {
    position: relative;
    color: transparent;
}

.form-submit.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* OAuth Buttons */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.auth-divider::before {
    margin-right: 1rem;
}

.auth-divider::after {
    margin-left: 1rem;
}

.oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.oauth-btn {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    color: #333;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
}

.oauth-btn:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

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

.oauth-btn svg {
    width: 20px;
    height: 20px;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .auth-modal {
        padding: 2rem 1.5rem;
        width: 95%;
    }

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

    .auth-tabs {
        gap: 0.5rem;
    }

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