/* Authentication Styles */

/* Auth Container in Navbar */
#authContainer {
    display: flex;
    gap: 1rem;
    align-items: center;
}

#loginBtn {
    background: linear-gradient(135deg, var(--highlight), var(--violet));
    border: none;
    color: var(--primary);
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 209, 197, 0.3);
}

#loginBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 209, 197, 0.4);
}

#userMenu {
    display: none;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--highlight), var(--violet));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.1rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.user-status {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

#logoutBtn {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

#logoutBtn:hover {
    border-color: var(--error);
    color: var(--error);
}

/* Auth Modal */
#authModal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

#authModal.hidden {
    display: none;
}

.auth-modal-content {
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    max-width: 420px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease-out;
}

.auth-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.auth-modal-header h2 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--gold), var(--highlight));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

#closeAuthModal {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

#closeAuthModal:hover {
    color: var(--text-primary);
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border);
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 1rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

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

.auth-tab.active {
    color: var(--highlight);
    border-bottom-color: var(--highlight);
}

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

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

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

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

.form-group input {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--accent);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: var(--highlight);
    background: rgba(79, 209, 197, 0.1);
    box-shadow: 0 0 12px rgba(79, 209, 197, 0.2);
}

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

/* Submit Button */
.auth-submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--highlight), var(--violet));
    border: none;
    color: var(--primary);
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 209, 197, 0.3);
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 209, 197, 0.4);
}

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

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

.auth-link a {
    color: var(--highlight);
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-link a:hover {
    color: var(--gold);
}

/* Responsive */
@media (max-width: 768px) {
    .auth-modal-content {
        padding: 1.5rem;
        max-width: 95%;
    }
    
    .auth-modal-header h2 {
        font-size: 1.3rem;
    }
    
    .form-group input {
        padding: 0.75rem 0.85rem;
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

@media (max-width: 480px) {
    .auth-modal-content {
        padding: 1.2rem;
        width: 95%;
    }
    
    #authContainer {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    #loginBtn {
        width: 100%;
    }
    
    .user-info {
        display: none;
    }
}
