/* Authentication Styles */

/* Auth Container - Full page overlay */
.auth-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 20, 25, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

.auth-box {
    background: var(--bg-secondary);
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: authFadeIn 0.4s ease;
    position: relative;
}

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

.auth-close:hover {
    color: var(--text-primary);
}

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

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

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-header .header-logo {
    width: 36px;
    height: 36px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

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

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-form .form-group {
    margin-bottom: 0;
}

.auth-form .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.auth-form .form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.auth-form .form-group input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-primary);
}

.auth-form .form-group input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Auth Buttons */
.auth-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-btn-primary {
    background: linear-gradient(135deg, var(--accent), #7c3aed);
    color: white;
}

.auth-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.auth-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* OAuth Buttons */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--bg-card);
}

.oauth-buttons {
    display: flex;
    gap: 1rem;
}

.oauth-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.oauth-btn:hover {
    border-color: var(--accent);
    background: var(--bg-primary);
}

.oauth-btn.google-btn:hover {
    border-color: #ea4335;
}

.oauth-btn.github-btn:hover {
    border-color: #fff;
}

/* Auth Links */
.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-links a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.auth-links a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.forgot-password-link {
    display: block;
    text-align: right;
    margin-top: -0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-password-link:hover {
    color: var(--accent);
}

/* Auth Messages */
.auth-message {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: none;
}

.auth-message.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.auth-message.success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

/* User Menu in Navbar */
.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-email {
    color: var(--text-secondary);
    font-size: 0.85rem;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-btn {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* Loading Spinner */
.auth-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.auth-loading i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-box {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
    
    .oauth-buttons {
        flex-direction: column;
    }
    
    .user-email {
        display: none;
    }
}
