/* Authentication Modal Styles */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.auth-modal {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    position: relative;
}

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

.auth-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

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

.auth-modal h2 {
    margin: 0 0 1.5rem 0;
    text-align: center;
    color: #333;
    font-size: 1.5rem;
}

.auth-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.auth-tab {
    flex: 1;
    padding: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.auth-tab.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

.auth-tab:hover {
    color: #007bff;
}

.auth-form {
    display: none;
}

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

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

.auth-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.auth-form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.auth-form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.auth-submit-btn {
    width: 100%;
    padding: 0.75rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 0.5rem;
}

.auth-submit-btn:hover {
    background: #0056b3;
}

.auth-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.auth-error {
    background: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border: 1px solid #f5c6cb;
    display: none;
}

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

.auth-success {
    background: #d4edda;
    color: #155724;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border: 1px solid #c3e6cb;
    display: none;
}

.auth-success.show {
    display: block;
}

.auth-loading {
    display: none;
    text-align: center;
    margin: 1rem 0;
}

.auth-loading.show {
    display: block;
}

.auth-spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Sign In Button Styles */
.signin-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-left: 1rem;
}

.signin-btn:hover {
    background: #0056b3;
}

/* User Info Styles */
.user-info {
    display: none;
    align-items: center;
    gap: 1rem;
    margin-left: 1rem;
}

.user-info.show {
    display: flex;
}

.username-display {
    color: #333;
    font-weight: 500;
}

.logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.logout-btn:hover {
    background: #c82333;
}

/* Responsive Design */
@media (max-width: 480px) {
    .auth-modal {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .signin-btn, .user-info {
        margin-left: 0.5rem;
    }
    
    .user-info {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Forgot Password Styles */
.auth-forgot-password {
    text-align: center;
    margin-top: 1rem;
}

.auth-forgot-password a {
    color: #4ecdc4;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.auth-forgot-password a:hover {
    color: #45b7aa;
    text-decoration: underline;
}

.auth-back-link {
    text-align: center;
    margin-top: 1rem;
}

.auth-back-link a {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.auth-back-link a:hover {
    color: #4ecdc4;
    text-decoration: underline;
}

/* Form transitions */
.auth-form {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.auth-form:not(.active) {
    opacity: 0;
    transform: translateX(20px);
    pointer-events: none;
}

.auth-form.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}